WHERE vs HAVING
COUNT and SUM are computed for remaining groups.
COUNT and SUM are computed from the remaining rows inside each bucket.
The compiler computes 2 aggregate facts for each of 3 groups.
HAVING examples are tiny finite group-filter transforms; SQL dialect completeness, optimizer behavior, indexing, and product claims are out of scope.
HAVING can read these group facts because they now exist.
In this tiny model, aggregate facts are COUNT rows and integer SUM.