Introduction
The GROUP BY clause helps you organize data into groups so you can summarize or count things easily.
When you want to count how many items belong to each category.
When you want to find the total sales for each product.
When you want to see the average score for each student.
When you want to group data by date to see daily totals.