WHERE vs HAVING
WHERE filters source rows before groups exist.
WHERE decides row by row before GROUP BY exists.
The row filter keeps 4 rows and drops 2 rows before grouping.
HAVING examples are tiny finite group-filter transforms; SQL dialect completeness, optimizer behavior, indexing, and product claims are out of scope.
A row dropped by WHERE never contributes to a later group total.
WHERE is the row boundary.