Sql how to use group by

This article is tagged with: Sql how to use group by and mysql

sql how to use group by

SELECT column1, function_name(column2)
FROM table_name
WHERE condition
GROUP BY column1, column2
ORDER BY column1, column2;
function_name: Name of the function used for example, SUM() , AVG().
table_name: Name of the table.
condition: Condition used.

This article is tagged with: Sql how to use group by and mysql