Day 8 of 14 30 minCOUNT / SUMGROUP BYHAVING
Summarise data. Count, sum and average with aggregate functions, group rows with GROUP BY, filter groups with HAVING, and know when to use WHERE instead.
By the end of today you can
- Use COUNT, SUM, AVG, MIN and MAX
- Group rows with GROUP BY and aggregate each group
- Filter groups with HAVING
- Explain the difference between WHERE and HAVING
- Count correctly with COUNT(*) vs COUNT(column)
What's inside
- 5 sections
- 3 diagrams and mind maps
- 6 code examples you can run
- 4-question quiz
- 1Aggregate functions
- 2GROUP BY: one row per group
- 3HAVING: filter the groups
- 4WHERE vs HAVING
- 5A common error
Sign in free to read this lesson
Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.
Sign in free