How every question is made
- Written from scratch. All 255 questions, the 10 practice databases and every solution are original. Questions are tagged by pattern, role and difficulty, never by a company name.
- Three or more datasets each. A sample you can query, plus hidden datasets built to catch a specific mistake: ties, NULLs, empty groups, duplicate rows, dates on a boundary, joins that multiply rows.
- Checked by script on the same engine you use. Before a question goes live, a script runs the reference solution and at least two independently written alternative solutions on every dataset, and they must all agree. It also runs a set of known wrong answers, and each one has to fail somewhere, at least one of them only on hidden data.
- Solved again from the prompt alone. Every question is also solved by a separate solver who sees only what you see: the prompt, the tables and the sample. Where a correct reading of the prompt failed the checks, the prompt was rewritten.
Why PostgreSQL in the browser
Your queries run on PostgreSQL 19 compiled to WebAssembly, inside the page. That means real Postgres behaviour (types, NULLs, window functions, date math) with no install, no waiting for a server, and nothing you run can affect anyone else. The same build checks the question bank, so what passes our checks passes in your browser.
Contact
Found a question that grades a correct answer as wrong, or a prompt that reads two ways? Write to hello@analystsql.com with the question link and your query. We fix those first.