SQL games guide
The best SQL games to actually learn SQL, ranked.
Most SQL games are fun once. We played all nine and scored each one on five things you can check, from how much SQL you write per minute to how far the game takes you.
We played every game end to end and recorded which SQL each one teaches. Every score is in the table below, and the order comes from the scores and four tie-break rules. Then each game has a full review. Full disclosure: we make two of these games (SQL Block Game and Station Zero). We say where the others beat us, and when we tie with another game, the other game ranks higher.
Play our SQL games
We make these two. Both are free, run in your browser and need no account.
A SQL practice game
SQL Block Game
Query cards fall into a well. Answer each one before it lands. Fast practice on WHERE, ORDER BY, aggregates and GROUP BY.
Play SQL Block Game →
A SQL escape game
Station Zero
Wake on a dying space station and query your way out. Three acts, from your first SELECT to recursive CTEs.
Play Station Zero →The ranking
Nine games, tested live. Each axis scores 0 to 2 points. The order follows the total, then the tie-break rules under "How we scored them".
| # | Game | Score | Best for | SQL per min | Come back | Real DB | Says why | How far |
|---|---|---|---|---|---|---|---|---|
| 1 | SQL Block Game Ours | 7/10 | Fast daily practice | 2 | 2 | 2 | 1 | 0GROUP BY |
| 2 | SQL Case Files | 7/10 | The most levels | 1 | 1 | 2 | 1 | 2Window functions, CTEs |
| 3 | Lost at SQL | 7/10 | Feedback that explains | 1 | 0 | 2 | 2 | 2Window functions |
| 4 | Station Zero Ours | 7/10 | A story that goes deep | 1 | 0 | 2 | 2 | 2Recursive CTEs |
| 5 | SQL Squid Game | 5/10 | A laugh, interview prep | 1 | 0 | 2 | 0 | 2Chained CTEs |
| 6 | SQLNoir | 4/10 | Polish and story | 1 | 0 | 2 | 0 | 1Joins, subqueries |
| 7 | SQL Island | 4/10 | Learning to change data | 1 | 0 | 2 | 1 | 0GROUP BY, one join |
| 8 | SQL Murder Mystery Solution and hints | 3/10 | Your first hour | 1 | 0 | 2 | 0 | 0One join |
| 9 | SQL Police Department | 2/10 | Click-to-build drills | 1 | 0 | 0 | 1 | 0One join (paid) |
Not games, but useful: SQLBolt and SQLZoo for short interactive lessons, Postgres Exercises for problems up to recursive CTEs and window functions, and GalaXQL, which teaches table building and triggers in a 3D galaxy. SQL Protocol, a story game with 15 chapters, was offline when we checked on October 19, 2026 (its server returned "Application not found"). We will test it again when it is back.
How we scored them
Five axes, 0 to 2 points each, so the maximum score is 10. All five axes have the same weight. The first two reward practice: you learn SQL by writing it, and you keep it when you write it again on another day.
- 01
SQL per minute. How much of your time goes into writing SQL. 2: a new task every minute or less, with no story, map or menu between tasks. 1: SQL is the main activity, but story, clues or one long task come between your queries. 0: most of the time goes to other things.
- 02
Come back tomorrow. Whether you get new practice when you play again. 2: every run is new and the game does not end. 1: a large free set, 50 levels or more, to work through. 0: one story or a short set that you finish once.
- 03
Real database. Whether a real SQL engine runs your query. 2: yes. 0: a homemade engine, which can accept SQL that a real database rejects, and the reverse.
- 04
Tells you why. What happens when your query is wrong. 2: it shows what is wrong, for example the missing columns or rows. 1: it gives hints. 0: it only says correct or incorrect.
- 05
How far it goes. The most advanced SQL that the game asks for. 2: window functions or CTEs. 1: multi-table joins or subqueries. 0: one join or GROUP BY.
When two games have the same score
- More SQL per minute ranks higher.
- Then a higher Come back tomorrow score ranks higher.
- If two games still tie and we made one of them, the game we did not make ranks higher.
- Then a higher How far it goes score ranks higher.
Every game, reviewed
1. SQL Block Game The most SQL per minute, and a new run every time
Best for: daily practice of the SQL you already know, until you write it fast and without errors.
Query cards fall into a pixel-art well. Write the SQL that answers a card before it lands, and the card clears. Cards that land stay on the stack, and the cards fall faster at each level. Every query runs on real Postgres in your browser and is checked by the rows it returns, so any correct query counts.
It covers WHERE, ORDER BY with LIMIT, COUNT, SUM and AVG, and GROUP BY, in a Fill the blank mode and a Full query mode. In the runs that players finished in October 2026, the median run lasted about three minutes and cleared about ten cards. No other game here asks you for SQL that often.
Each run shuffles the cards into a new order, and a daily leaderboard gives you a reason to play again tomorrow. You can play as a guest. Each tier links to the free lesson for it.
Where others beat us. It stops at GROUP BY on one table: no joins, no subqueries, no window functions. It drills what you already learned and teaches no new concept. To learn new SQL, SQL Case Files, Lost at SQL and Station Zero all go much further.
Play SQL Block Game →2. SQL Case Files The most levels, behind a name-gate
Best for: a large volume of detective challenges with real depth.
About 100 levels on a real in-browser database, and it genuinely climbs, all the way to window functions and CTEs across its later seasons. It grades by matching your output and enforces column names, with light hints. It asks for a detective name before you can play.
Visit SQL Case Files3. Lost at SQL Charming, and clear about why you are wrong
Best for: one relaxed sitting with real feedback.
A sinking-submarine text adventure that quietly goes further than it looks, reaching window functions inside multi-step queries. Its grader is one of the two most helpful here: it tells you which columns and rows are off, and tracks your time and mistakes as a score. It is a single experience with nowhere to go after.
Visit Lost at SQL4. Station Zero The deepest story, and the best help when you are stuck
Best for: a story-driven game that goes from your first SELECT to recursive CTEs.
You wake on a dying space station. The only system online is CORA, the station computer, and you talk to it in SQL. Across three acts, Station Zero goes from your first SELECT through anti-joins, GROUP BY, HAVING and subqueries to window functions and recursive CTEs.
When your query is wrong, CORA tells you what is wrong and why, and the help gets more specific the longer you are stuck. When the story ends, it opens into a free 66-lesson SQL course.
Where others beat us. Story scenes and act breaks take time that is not SQL, so it scores lower than SQL Block Game on SQL per minute. It is one story, and when you finish it, it is done. SQL Case Files has more levels. Lost at SQL explains a wrong query as well as we do, and it ranks above us because a tie goes to the game we did not make. Station Zero is SELECT-only, where SQL Island teaches you to change data.
Play Station Zero →5. SQL Squid Game The funny one that sells you a course
Best for: a laugh, and a nudge toward structured interview prep.
Nine levels of Squid Game parody that get surprisingly deep, with chained CTEs and correlated subqueries, but skip window functions. It grades by matching output with a plain Incorrect, no explanation, and level one is already hard for a true beginner. The smartest funnel in the category, straight into DataLemur’s tutorials.
Play SQL Squid Game6. SQLNoir The most polished game on the list
Best for: a beautiful, story-first detective game when you already have a little SQL.
Takes you through filtering, multi-table joins, and subqueries across six cases, and it is the best-made game here. It stops at intermediate: no window functions, no CTEs, and it never explains a wrong query. You run queries to surface clues, then submit the culprit and it is right or it is not.
Visit SQLNoir7. SQL Island The original, and the only one that teaches data-editing
Best for: nostalgia, and learning to change data, not just read it.
Crash-land and use SQL to survive. Alone among these games it teaches INSERT, UPDATE, and DELETE, and you literally delete the villains to win, alongside filtering, grouping, and a join. It runs real SQL and advances the story when your result is right. It shows its age and tops out at group-by.
Visit SQL Island8. SQL Murder Mystery The classic first hour
Best for: your first taste of SQL, or a one-hour classroom activity.
The iconic on-ramp. You explore a database from scratch and query your way to a killer, which gives you the real feeling that querying is investigating. It only ever needs one join and a bit of filtering, gives no feedback, and once you solve it in about 45 minutes you are done.
Stuck? Read our full walkthrough, with hints for each step
Solve the mystery9. SQL Police Department Clean drills, but paid and not a real database
Best for: guided, click-to-build beginner practice.
Introduces filtering, sorting, and eventually one join at a steady pace with helpful nudges like asking whether you used DISTINCT. Two catches: after a few free cases you must pay, and it runs a homemade SQL engine rather than a real database, so it never goes past a single INNER JOIN.
Visit SQL Police DepartmentWhich SQL game should you play?
- Want to practice every day SQL Block Game.
- Never written SQL SQL Murder Mystery for a first hour. Then take the free lessons and practice them in SQL Block Game.
- Want the most levels SQL Case Files.
- Want the most beautiful experience SQLNoir.
- Prepping for an analyst or data interview SQL Block Game for speed on the basics, SQL Case Files or Station Zero for window functions and CTEs, then SQL Squid Game to test yourself.
- Want a story that goes deep Station Zero, or Lost at SQL for one shorter sitting.
Are SQL games actually a good way to learn?
Yes, with two conditions. A game gives you a reason to write real queries, and that is better than dry exercises. But most SQL games end after one story, and you forget what you do not practice again. The games that make you good tell you why you were wrong and give you a reason to come back the next day. That is why our scorecard rewards SQL per minute and new practice on each visit.
For that path, go to the SQL course behind the game. Its lessons come in order, and each lesson has graded practice.
To compare other free courses, read "can you learn SQL for free".
For sets of problems instead of games, read our list of sites to practice SQL.
SQL games FAQ
What is the best game to learn SQL?
By our scorecard, SQL Block Game: it asks for the most SQL per minute, and every run is new. It covers only the basics, up to GROUP BY. To learn joins, window functions and CTEs in a game, play SQL Case Files, Lost at SQL or Station Zero.
Is there a game that teaches you SQL?
Yes. SQLNoir, SQL Case Files and Station Zero start from zero and teach SQL as you play. SQL Block Game is for practice: it drills what you already learned.
What is the best free SQL game?
Eight of the nine games here are free. SQL Police Department lets you try a few cases, then asks you to pay. Of the free games, SQL Block Game has the highest score on our scorecard.
What are some good SQL mystery games?
SQL Murder Mystery, SQLNoir and SQL Case Files are detective games. SQL Murder Mystery is one case of about 45 minutes. SQLNoir has six cases. SQL Case Files has about 100 levels.
Is SQL Island good?
Yes, for one thing that no other game here does: it teaches INSERT, UPDATE and DELETE. It is old, and it stops at GROUP BY and one join, so it has a low score on our scorecard.
Is there a fast-paced SQL game for practice?
Yes. SQL Block Game is an arcade game: query cards fall, and you answer each one before it lands. It drills WHERE, ORDER BY, aggregates and GROUP BY at speed, on real Postgres in your browser.
Can you learn SQL by playing games?
Yes, if the game tells you why you are wrong and you play it on many days. A game that you play once is fun, but you forget most of it.
Can I practice SQL on my phone?
SQL Block Game and Station Zero need a keyboard, so play them on a laptop or a desktop computer.
Do these run in the browser with no install?
Yes. Every game here runs in your browser with no download, and none needs an account to start.
The verdict
Most of these games are worth an evening. SQL Block Game is the one you can play every day.
Answer falling SQL cards before they land, on real Postgres in your browser. Free, no signup. When you want new SQL, Station Zero takes you to window functions and recursive CTEs.
Play SQL Block Game, free