Reading performance & plans
Exercise · SQL & Querying

Predict, then run it

Predict the output

tallies(day, n) = (1,5),(7,3),(8,9). One day's tally through a CTE — DuckDB pushes the filter into the scan:

WITH t AS (SELECT day, n FROM tallies) SELECT n FROM t WHERE day = 7;

Predict the exact output.