The GROUP BY statement groups rows that have the same values in one or more columns.
GROUP BY
The GROUP BY statement is often used with aggregate functions (COUNT(), MAX(), MIN(), SUM(), AVG()) to group the result-set by one or more columns.
COUNT()
MAX()
MIN()
SUM()
AVG()
SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s) ORDER BY column_name(s);
Last updated 11 months ago