Aggregate functions are used with MySQL GROUP BY clause to perform calculation on each group of records on return a single value for each row. Let’s say if you want to know how many orders in each status group you can use the COUNT function as follows:
SELECT status, count(*) FROM orders GROUP BY status
Display:
0 comments:
Post a Comment