0
Challenge · 81Production & the Interview Gauntlet
SQL live-coding gauntlet
Interviewused in ~75% of apps
The SQL round is not a trivia quiz — it's a shared editor, a schema you've never seen, and someone watching you type. The questions are almost always one of four shapes wearing a different table name. Candidates who freeze aren't missing SQL knowledge; they're pattern-matching from zero instead of recognizing the shape and reaching for the move that solves it.
Core idea. Nearly every live SQL prompt reduces to one of four shapes — one row per group (top-N), rows with no partner (anti-join), a number that accumulates or ranks with ties (Nth-highest / running total), and the join that silently multiplies a scalar you're aggregating (the fan-out trap). Recognize the shape out loud, build the query inside-out in evaluation order, and predict the row count before you run it.
poke it, drag it,
try to break it
try to break it
no slides here.
you drive.
you drive.
Playground, this isn't a screenshot
Real Postgres · in your browseridle
Shape 1, live: each author's single most-liked post. Predict the row count first — 4 profiles exist, but only 2 have ever posted — then run it and confirm.
Cmd/Ctrl + Enter
↑ play a little first, then dig in