Explain group By clause in SQL?
Group By clause in SQL: The GROUP BY clause can be used in a SELECT statement to collect data across multiple records and group the results through one or more columns.
The syntax for the GROUP BY clause is:
SELECT column1, column2, ... column_n, aggregate_function (expression)
FROM tables
WHERE predicates
GROUP BY column1, column2, ... column_n;
aggregate_function could be a function like as SUM, COUNT, MIN, or MAX.