Concept Flow - WHERE vs HAVING mental model
Start with Table Data
Apply WHERE filter
Group Data (if GROUP BY used)
Apply HAVING filter on groups
Return final result
Data is first filtered row-by-row using WHERE, then grouped, and groups are filtered using HAVING before final output.