SQL Detective Mystery Unblocked

Play SQL Detective Mystery online for free in your browser. No download, no sign-up.

SQL Detective Mystery gameplay screenshot
  • Partly works on mobile
Report a problem

SQL Detective Mystery is a detective case you solve by asking questions of a database. A murder happened in SQL City on January 15, 2018, and the only lead is that you once read the crime scene report. Every clue after that, from witness interviews to gym check-ins, sits in tables you can only reach with SQL. The queries run right in the page, so there is nothing to install.

How to Play SQL Detective Mystery

The page gives you several code boxes. Each one holds a starting query that you can edit and run, and the results appear as a table underneath. The first two boxes show how to list the tables and how to see the columns of one table.

From there you work like a detective. Find the report for the murder, read who the witnesses were, then look those people up in the person and interview tables. Their statements point at a gym membership, a car and other details you can match in further tables.

When you think you know the name, type it into the “Check your solution” box and run it. A wrong name gets a polite “try again”. The right one opens a second, harder step that asks who was really behind the crime.

SQL Detective Mystery Controls

Controls for SQL Detective Mystery
ActionKeyboardMouseTouch
Type or edit a queryType in the code boxClick inside a code boxTap a code box to bring up the keyboard
Run the query in a boxShift + EnterClick RunTap Run
Put the box back to its starting query—Click ResetTap Reset
Show the database diagram—Click the "click here" link above the last code boxTap the "click here" link
Reveal a suggested query (walkthrough page)—Click Show SolutionTap Show Solution

Tips for Cracking the Case

  • Read the schema first. The diagram shows how person, drivers_license, interview and the gym tables link by ID, which saves many blind guesses.
  • Filter early. A WHERE clause on date, city and crime type turns more than a thousand reports into the one you need.
  • Use LIKE for partial names. A witness may be known only by a first name, so name LIKE '%Annabel%' works better than an exact match.
  • Sort to find extremes. ORDER BY with DESC and LIMIT 1 is the quick way to find “the last house on a street”.
  • Join instead of copying IDs. Linking tables with JOIN lets one query check a license plate, a gym badge and a check-in date at once.
  • Write clues down. Names, IDs and dates scroll away quickly, and the page does not keep them.

Features

  • A real SQLite database with about 10,000 people, 1,228 crime scene reports and thousands of interviews, licenses and check-ins.
  • Beginner walkthrough on a second page with runnable examples and optional suggested queries.
  • Built-in answer checker that confirms the killer and then unlocks a bonus question.
  • Works fully offline once loaded, since the SQL engine runs inside your browser.

Tested and updated:

SQL Detective Mystery Unblocked: FAQ

Do I need to know SQL before I start?

No. Follow the "try the walkthrough" link near the top. It explains SELECT, WHERE, LIKE, aggregate functions and JOIN with example boxes, and you can solve the whole case from that page.

How do I know if my suspect is right?

Use the box under "Check your solution". Replace the placeholder with a full name and run it. The database answers with a message telling you whether you found the killer.

Is there more after naming the killer?

Yes. The success message points you to one more step, finding the person who hired the killer, and dares you to do it in two queries or fewer.

Will my queries be saved if I leave?

No. The database lives only in the page while it is open, so reloading resets every box. Keep notes of names and IDs as you go.

More Free Games to Play Online