Filter Groups after Aggregation

WHERE filters individual rows before GROUP BY; HAVING filters groups after GROUP BY. HAVING COUNT(*) >= 2 keeps only city groups with at least two rows.

GOAL

Use WHERE and HAVING at the correct processing stage.

Which clause filters groups by COUNT(*) >= 2?