Aggregation with GROUP BY and HAVING
By the end of this module you can state what one row of an aggregated result represents, choose between WHERE and HAVING for the right reason, and spot two errors that produce confident wrong numbers: averaging averages, and grouping on values that are not as tidy as they look.
Units
- Unit 04.00: GROUP BY changes the grain of your result
- Unit 04.01: COUNT(*) versus COUNT(column)
- Unit 04.02: WHERE before grouping, HAVING after
- Unit 04.03: The average-of-averages error
- Unit 04.04: Grouping on messy values and what it hides
