detectiveSQL

EST. 1888 · LONDON

A dim detective office at night

CONFIDENTIAL · FOR THE EYES OF THE DETECTIVE ONLY

The city is full of dirty data.
Only a true detective can crack it.

Welcome to the agency, detective. The cases are filed below. Each one hides the truth inside a database, and the only way in is a well-written query. Pour yourself a drink. Light a cigarette. Let's get to work.

12
CASE FILES
4
DIFFICULTY TIERS
1888
AGENCY EST.
∞
QUERIES PENDING

/ THE DOSSIER

Active Case Files

Apprentice

Start here if you have never written a query. Four short cases, one new idea each, ending where the first Misdemeanor begins.

Misdemeanor

Felony

Capital

/ THE METHOD

Three steps to a confession.

  1. I.

    Read the file

    Every case opens with a briefing — the crime, the players, the patterns to look for. Read it twice. Detail matters.

  2. II.

    Study the evidence

    You'll be shown the schema of the database in evidence. Tables, columns, foreign keys. The truth is in there somewhere.

  3. III.

    Submit your query

    Write the SQL that exposes the culprit. One query. One answer. Get it right and the case closes.

/ BEHIND THE CASE

A side project that got out of hand.

detectiveSQL is an open-source SQL mystery game. Each case gives you a database full of evidence and a blank query editor. The files run from 1879 to 1991, from a London antique shop to a hospital ward in Leeds and a bank archive in Brazil. Your job is to follow the clues, connect the dots, and uncover what happened.

The idea is simple: make SQL fun to explore. Every query can reveal a clue, challenge a suspicion, or lead you somewhere unexpected. You learn by chasing answers, one discovery at a time.

BUILT BY

Rodrigo da Rosa

LINKEDIN