subquestPlay free
Real Postgres · in your browser

Learn SQL by breaking it on purpose.

Subquest is a SQL adventure for future data analysts. Explore worlds of realistic data, defeat boss queries, and unmask NULL — the ghost that haunts every database.

Free to play. No install. No account needed for world 1.

NULL, the ghost mascot, looking smug
Quest 302 · the vanishing rows
-- quest 302: where did everyone go?
SELECT name, last_seen
FROM adventurers
WHERE last_seen = NULL;
Encounter · 0 rowsA ghost stirs in the adventurers table. Your WHERE clause came back empty-handed.Hint: NULL slipped through your =. Try IS NULL.
+60 XP when you banish it
NULL, the ghost mascot, peeking over a data table
The villain

Meet NULL.

Small, pale, and living in the gaps of your data. NULL isn't equal to anything — not even to itself — and it will quietly eat your rows, your averages, and your confidence. Every world hides it somewhere. Learning to catch it is the whole game.

NULL = NULL → NULL. Yes, really.

How you learn

Playful about the journey. Dead serious about the craft.

Real Postgres, zero setup

Every query runs on a real Postgres engine inside your browser. No toy SQL, no watered-down dialect — the same engine you'll use on the job.

Watch your query think

A live pipeline view replays your query step by step — FROM, WHERE, GROUP BY — so you can see rows flow and find exactly where they vanish.

Mistakes planted on purpose

Duplicate joins, NULL comparisons, off-by-one dates: every classic trap is hidden in the data, waiting. Failure costs nothing here. It's where the XP is.

The campaign

Worlds of realistic data.

Each world is a database with a story: a tavern chain, a guild ledger, a shipping fleet. Clear quests to earn XP, take side quests for extra loot, and face the boss query at the gate.

LVL 12
340 / 500 XP
World 3The orders catacombs
111
Your first SELECT
+30 XP
202
Joins of the twin tavernsSide quest
+45 XP
302
The vanishing rowsNULL
+60 XP
404
The boss of GROUP BYBoss
+120 XP
501
Window functions awaken
+80 XP
NULL, the ghost mascot, defeated
Rewards

Every scar becomes a badge.

XP for every quest, achievements for the traps you survive. Your progress reads like an adventurer's log — and like a data analyst's CV.

Ghost hunter+50 XP

Used IS NULL for the first time. NULL hissed and fled.

Boss slayer+120 XP

Defeated a boss query on the first attempt. The tavern cheers.

Join master+200 XP

Survive a five-table join without duplicating a single row.

For the humans

The AI writes the query. Someone still has to know when it's lying.

The models draft your SQL now — and confidently hand back the wrong rows, join the same table twice, and never notice NULL slipped through your =. Subquest is where you stay the one who catches it: read the query, predict the rows, find where they vanish. That instinct doesn't come from autocomplete — it comes from breaking things on purpose.

-- job security is a WHERE clause that actually works

NULL, the ghost mascot, scheming
NULL, the ghost mascot, waving hello

Every query is a quest.

World 1 is open and the ghost is already waiting in the data. Bring nothing — Postgres, quests, and NULL are all in the browser.

Start playing