THE IDEA
Understand the concept
COUNT, SUM, and AVG turn many rows into summary values. GROUP BY partitions rows by one or more fields before the aggregate runs, which is useful for comparing categories.
WORKED EXAMPLE

LESSON 04 ยท SQL
Aggregate functions summarize rows, and GROUP BY creates one summary per group.
THE IDEA
COUNT, SUM, and AVG turn many rows into summary values. GROUP BY partitions rows by one or more fields before the aggregate runs, which is useful for comparing categories.
WORKED EXAMPLE