WHERE and HAVING start from the same pinned rows.
Base rows
WHERE and HAVING both start from the same pinned rows.
same base rows
Show the rows
The input has 6 rows before any row or group filter runs.
input rows=6
HAVING examples are tiny finite group-filter transforms; SQL dialect completeness, optimizer behavior, indexing, and product claims are out of scope.
Read the pipeline
The diagram keeps base rows, WHERE, groups, aggregates, HAVING, and output visible.
visible pipeline
Summary
The rest of the book changes the boundary where filtering happens.
boundary matters