SQL GROUP BY SYNTAXSELECT column_name1, column_name2, column_name3, ...
FROM table_name
WHERE [condition]
GROUP BY column_name1, column_name2,column_name3, ...
ORDER BY column_name1, column_name2, column_name3, ...;
SQL GROUP BY CLAUSE
GROUP BY clause is used to group rows with the SELECT statement to arrange identical data into groups.
The SQL GROUP BY clause is often used with aggregate functions like COUNT, MAX, MIN, SUM, AVG to group the result-set by one or more columns.