The meaning of java aggregate numbers_The meaning of aggregate numbers: avg,sum,max,min,count,count(*)
9. Tell the meaning of the following aggregate numbers:avg,sum,max,min, count,count(*) AVG: average value SUM :Sum MAX: Find the maximum value MIN: Find the minimum value COUNT(*): Return the number of all rows *************************************************** *************** Transaction trigger TRIGGER continue continue unique unqiue Primary key primary key identity column identity foreign key foreign key check check Constraint ********************************** ******************************* 10. Description:Randomly take out 10 pieces of data select top 10 * from tablename order by newid() 11. Query the student ID and average score of students whose average score is greater than 60 points; select stuId,avg(score) from Scores group by stuId having avg(score) >60;
COUNT, GROUPBY, INNERJOIN, php, mysql – COUNT, GROUPBY, INNERJOIN, php, mysql
I am currently (trying to) develop a forum. Now I’ve run into a small obstacle. I’ve four tables in my database; “categories”, “forums”, “topics” and “replies”. all have an id, a parent id and a name. I am currently (trying to) develop a forum. Now I’ve run into a small snag. I have four tables in my database; ‘categories’, ‘forums’, ‘topics’ and ‘replies’. They both have an id, a parent id and a name. My problem is now how I should store and get the amount of topics and replies for each category and forum. At first I thought of saving all the topics and replies in every category and forum, as well as save all the replies in every topic. My problem now is how to store and get the number of topics and replies for each category and forum. At first I thought of saving all topics and replies in each category and forum, and saving all replies in each thread. But that is something I’d rather try to avoid seeing as I have to do 1x insert and 3x update for every reply made; 1 to category, 1 to forum, 1 to topic and finally the reply…
count(1), count(*), orderby1,2,3,4 difference
Count(1), count(*), order by 1,2,3,4 difference the 1 make NULL data; the the 2 directly use the column name to COUNT to see the result the the 3 Use 1 2 3 4 5 * to COUNT to look at the results and find that they are all the same data and are equal to all functions. www.2cto.com the 4 ORDER BY 1 does use the first column to sort the the 5 ORDER BY 2 See if the result is correct the the result: the count(1)=count(2)=count(3)=count(*); the count(provcode)count(areacode)count(statedate)count(*); the order by 1order by 2oreder by 3; the order by 1=order by provcode the Additional results: the the the Author ZengMuAnSha