📊
Beginner About 20 min
Aggregation & GROUP BY
Collapse rows into summaries with COUNT, SUM, AVG, MIN, MAX and group them by category.
What you'll learn
- Collapse rows into summaries with COUNT, SUM, AVG, MIN, MAX
- Group results by category with GROUP BY
- Filter grouped results with HAVING (not WHERE)
- Use COUNT(DISTINCT col) to count unique values
- Round numeric results with ROUND(value, decimals)