Exercise · SQL & Querying
Predict, then run it
Predict the output
plays(machine, score) has 5 rows; only 'b' scored over 900. The plan for the selective filter reads every row to keep one — the two-count probe makes that SEQ_SCAN smell measurable:
SELECT COUNT(*) AS scanned, (SELECT COUNT(*) FROM plays WHERE score > 900) AS kept FROM plays;
Predict the exact output.