SQL COUNT, SUM and GROUP BY
Aggregate functions summarise rows: COUNT, SUM, AVG, MIN, MAX. GROUP BY runs them once per group.
Try it yourself
Loading editor…
AS gives a result column a friendly name.
Aggregate functions summarise rows: COUNT, SUM, AVG, MIN, MAX. GROUP BY runs them once per group.
Loading editor…