SQL Murder Mystery
Solve a murder by querying a city’s database — interrogate tables, follow leads and write the JOIN that names the killer.

// About this game
SQL Murder Mystery is best understood as code puzzles built around code as the main verb, not as a normal game with a small programming minigame attached. SQL Murder Mystery hands you a crime and a database and lets you crack the case purely through queries — joining crime reports, witness interviews and licence records to track down the culprit. It is open-ended detective work that doubles as genuinely good SQL practice. The useful question for a new player is not simply "is it about programming?", but what kind of thinking it asks for: SQL, sql, detective and free, and a willingness to test an idea by letting the simulation run. Released in 2019 by Knight Lab, it sits in the catalog because the program you write is the thing that actually changes the game state.
The challenge is close to a programming exercise, but the framing gives it stakes and feedback. You read a rule set, infer the important constraints and produce the smallest bit of logic that makes the next situation work. In SQL Murder Mystery, that means the fun is in the gap between an intention and a working implementation. You start with a rough plan, translate it into the tools the game provides, then watch the result expose every missing condition. A direct solution may pass the first level or match, but the better solutions usually come from noticing a pattern: repeated movement, wasted work, poor targeting, bad routing, a race condition, a blocked path, or a decision that should have been stored as state instead of hard-coded.
The language side is centered on SQL, but the transferable skill is broader than syntax. You practice decomposition, debugging, iteration and the habit of reading the rules before blaming the machine. The beginner rating does not mean it is trivial; it means the first useful program arrives quickly, before the game asks you to optimize or generalize. Because it is online, the game also has a social or persistent edge: your code has to survive contact with leaderboards, shared state, other players or changing live conditions instead of only beating a frozen puzzle once. The best sessions are usually not the ones where everything works immediately; they are the ones where a failed run gives you a clear hypothesis for the next version. If the game has leaderboards, ratings or community solutions, those become useful mirrors rather than just bragging rights, because they show how many different shapes a correct program can take.
SQL Murder Mystery is strongest for players who like the feeling of making a system slightly smarter each time they touch it. It will be less satisfying if you want fast reflex challenges, cinematic spectacle or a puzzle with only one intended answer. The reward is more specific: seeing your own instructions harvest, fight, route, query, build, solve or survive without your hand on the controls. It is also easy to recommend as a trial because the entry cost is low: you can open it, test whether the programming model clicks, and only then decide how deep you want to go. Taken on its own terms, it is a practical way to turn programming concepts into a visible loop, where every bug is part of the play and every improvement has a concrete effect on the world in front of you.
// What you’ll write
The mystery is solved by joining evidence tables. You follow the data trail instead of choosing dialogue options.
SELECT * FROM crime_scene_report WHERE type = 'murder' AND city = 'SQL City' AND date = 20180115;
// Related games

Elevator Saga
★4.5Write JavaScript to control a bank of elevators and move people efficiently. A free, focused optimisation puzzle.

Untrusted
★4.5Escape a roguelike by editing the JavaScript source of each level live, bending the world’s own rules to find a way out.

The Deadlock Empire
★4.5Play the scheduler against threads of buggy code, forcing race conditions and deadlocks to learn how concurrency really breaks.
// Related guides

Best JavaScript Coding Games for Automation, Bots and Browser Practice
The best JavaScript coding games for learning automation, bot logic, browser scripting and long-running systems without another dry tutorial.

Coding Games for Classroom Lessons: How to Teach Programming Through Play
A teacher-friendly guide to using coding games in school: lesson structure, age fit, reflection prompts, classroom routines and the best games for each objective.

Geometry Dash in Scratch: A Beginner Guide to Building a Rhythm Platformer
How beginners can build a Geometry Dash-inspired Scratch game: scrolling ground, cube jumping, obstacles, collision, variables and fair level design.