1/8
Exam
COUNT(*), SUM(), AVG(), MAX(), MIN()
The Five Aggregate Processing:
COUNT(*)
It counts whole rows.
COUNT(column)
It counts whole rows that have values only.
GROUP BY
It collapses many rows into one summary row per group value.
grouped or aggregated
THE GOLDEN RULE (chant it): "Every column in the SELECT list must be either ______________________."
1055 (ONLY_FULL_GROUP_BY)
What kind of error is the engine asking which student_id you want from a collapsed group? There is no honest answer.
FROM-WHERE-GROUP BY-HAVING-SELECT-ORDER BY
The pipeline diagram:
WHERE
_______ filters rows before grouping
HAVING
_______ filters groups after grouping