Best SQL Games to Learn SQL in 2026
Updated October 2026
SQL games teach you to query a database by giving you a reason to: a murder to solve, an island to escape, a submarine to save. We tried the most popular free SQL games and compared what each one costs, who it suits and which SQL it actually teaches.
Full disclosure: we make SQL Side Quest, so it is listed first. Every other game here is one we would happily recommend, and the descriptions say where each one is stronger than ours.
SQL games compared
| Game | Price | Level | SQL covered |
|---|---|---|---|
| SQL Side Quest | Free | Complete beginner to intermediate | SELECT, WHERE, LIKE, ORDER BY, LIMIT, JOIN, GROUP BY |
| SQL Murder Mystery | Free | Some SQL helps; a walkthrough exists for beginners | SELECT, WHERE, JOIN, subqueries |
| SQL Island | Free | Complete beginner | SELECT, WHERE, UPDATE, JOIN, GROUP BY |
| SQL Noir | 3 free cases, then a one-time license | Beginner to advanced | Filtering, JOIN, aggregates, subqueries |
| Lost at SQL | Free | Beginner to advanced | Filtering, GROUP BY, CASE, CTEs, window functions |
| SQL Police Department | About 10 free cases, then a paid license | Complete beginner | SELECT, DISTINCT, ORDER BY, LIMIT, then WHERE, IN, BETWEEN |
The games
1. SQL Side Quest
Story adventure, lessons and murder mystery · Free
Our own game, so judge it accordingly. It combines three things: guided video lessons with a live editor, a post-apocalyptic story where each chapter is a mission you finish by querying the database, and a standalone murder mystery set in Blackwater Bay. Queries run against a real PostgreSQL database, with no account needed to start.
Best for: Beginners who want lessons and a story in one place.
Start the SQL lessonsPlay the SQL story gamePlay the SQL murder mystery
2. SQL Murder Mystery
Single detective puzzle · Free
The classic from Northwestern University's Knight Lab. There has been a murder in SQL City and you have to find the killer from the police database. Its own site describes it as practice more than a full tutorial, and it is one well-designed case rather than a series.
Best for: A one-evening puzzle once you know the basics.
3. SQL Island
Text adventure · Free
Built at RPTU Kaiserslautern. You survive a plane crash and query the island's villages, inhabitants and items to find a way home. The commands you need are shown next to each task, there is no signup, and it is available in several languages. There is also a sandbox mode and a completion certificate.
Best for: Your very first hour of SQL.
4. SQL Noir
Detective cases · 3 free cases, then a one-time license
A 1980s noir detective agency where every clue sits in a database. Cases are open-ended: you explore the tables yourself and submit the suspect's name. There are no hints or official solutions, which makes it a good test of whether you can work through data on your own.
Best for: Practising open-ended investigation.
5. Lost at SQL
Story game · Free
Made by Robin Lord. You captain a sinking submarine and fix it with queries. It has strong atmosphere, and the difficulty climbs quickly, reaching CTEs and window functions in later levels, which few SQL games cover.
Best for: Going beyond the basics in a game format.
6. SQL Police Department
Short crime cases · About 10 free cases, then a paid license
Short cybercrime cases where you assemble queries from clause blocks, with a built-in guide. It is very approachable but heavily guided, and the free tier covers only the first set of cases.
Best for: Younger learners or a classroom warm-up.
How to choose an SQL game
- Never written SQL? Start with SQL Island or the SQL Side Quest lessons. Both explain each command before asking you to use it.
- Know SELECT and WHERE? Try a mystery: SQL Murder Mystery, SQL Noir or the Murder in the Bay case. You will need joins to crack them.
- Want a longer story? The SQL Side Quest story mode and Lost at SQL both run across many levels instead of a single case.
- Preparing for an interview? Games build fluency, but also practise GROUP BY, subqueries and window functions on their own. Lost at SQL goes furthest here.
SQL games FAQ
- What is the best free SQL game for beginners?
- For a first hour of SQL, SQL Island and SQL Side Quest are the easiest starts: both are free, need no setup and explain each command as you go. SQL Murder Mystery is better once you know SELECT and WHERE.
- Can you actually learn SQL by playing games?
- Yes, as long as the game makes you write real queries. All the games on this page do. A game keeps you practising long enough for the syntax to stick, but pair it with lessons that explain why a query works, not just that it works.
- Are these SQL games free?
- SQL Side Quest, SQL Murder Mystery, SQL Island and Lost at SQL are free. SQL Noir and SQL Police Department let you play the first cases free and charge for the rest.
- Which SQL game covers advanced topics like window functions?
- Lost at SQL reaches CTEs and window functions in its later levels. Most other SQL games focus on SELECT, filtering, joins and aggregation.
- Do SQL games use real SQL?
- Yes. SQL Side Quest runs your queries on PostgreSQL, and most browser games use SQLite. The core syntax (SELECT, WHERE, JOIN, GROUP BY) is the same across databases, so the skill transfers to work.