Learn SQL by solving mysteries

A SQL detective game with a real course behind it. Crack cases and go from your first SELECT to window functions.

Free to start1,250+ detectives92 countries7,000+ solved
The Process

How It Works

Become a data detective in three steps. No prior experience required.

1
?

Pick an Investigation

Browse Cases by difficulty and SQL topic. Each is self-contained with real data and a mystery to crack.

2

Query the Database

Write SQL in the browser. No setup needed. Get hints from Chief Fox when you get stuck.

3

Crack the Case

Use your results to name the suspect and close the case. Earn XP and level up your rank.

THE JOURNEY

54 cases. Five ranks.
One detective: you.

A complete path from your first WHERE clause to window functions, told as one career on the force. Drills sharpen each skill, exams earn your promotions, and every rank comes with a certificate.

54CASES
12DRILLS
4EXAMS
4CERTIFICATES

Recruit

FIRST CASE

Rookie

SELECT · WHERE · LOGIC

Detective

AGGREGATES · NULLS · CAST

Senior

JOINS · SUBQUERIES · CTES

Chief

WINDOW FUNCTIONS

Concepts when the story needs them

JOINs show up when suspects and alibis stop matching. Nothing is taught in a vacuum.

Exams that mean something

Pass the level exam to earn your promotion and a shareable certificate for each rank.

Streaks and a global leaderboard

Daily streaks, XP rankings, public detective profiles. Friendly pressure included.

INVESTIGATIONS

Then prove it for real

Guided cases teach you. Investigations test you. A full mystery across six tables, three acts, and a ticking clock. When you think you have it, you make one accusation.

  • No hints, no training wheels. Just you, the schema, and the evidence.
  • Real multi-table schemas. Staff records, sensor logs, shipping manifests, phone records.
  • One accusation. Name the perpetrator and their role. Get it wrong, live with it.
THE LOUVRE AFFAIR
● ACT 1ACT 2ACT 3
00:15MAKE ACCUSATION
QUESTION 1 OF 6 · THE WRONG THEORY

The museum's sensor network flagged an anomaly on the night of November 28th. Which gallery room did it occur in?

Type your answer and press Confirm
TABLES ON FILE
  • staff
  • badge_events
  • sensor_logs
  • artwork_registry
  • shipping_manifests
  • communication_records
THE SANDBOX

Off duty? Query anything.

Seven real datasets, 44 tables, no objectives and no hints. The fastest way to make SQL stick is asking your own questions about data you actually care about.

IMDb Ratings

7 TABLES · 6,203 ROWS

Which director has the highest average rating across their films?

Metro Crime

7 TABLES · 2,239 ROWS

200 cases of homicide, fraud and theft. Which detective closes the most?

Spotify Wrapped

6 TABLES · 11,039 ROWS

A full year of listening history. Which artist gets skipped the most?

Pokemon

8 TABLES · 12,015 ROWS

All 1,025 base forms across 9 generations. Which type rules the stat charts?

NBA 2024-25

4 TABLES · 794 ROWS

Official season data. Which team has the biggest home-court advantage?

Steam Games

7 TABLES · 8,855 ROWS

424 of Steam's most popular games. Do free games really get worse reviews?

CAREER HUB

Then go and get the job

SQL interview practice for the interviews you are actually sitting. Data analyst interview questions tagged by company, a rapid SQL quiz for the concepts behind them, and a map of the data roles worth aiming at.

QUESTIONS MODELLED ON THE LOOPS AT
  • Google
  • Meta
  • Amazon
  • Netflix
  • Airbnb
  • Spotify
  • Twitter
  • Snapchat
  • Robinhood
  • Lyft
  • Coinbase

Interview Prep

SQL INTERVIEW QUESTIONS

Questions modelled on the loops at Google, Meta, Amazon and Netflix. Each opens in a real editor with the schema and a target output, checks your answer, then reveals a worked solution and the insight most candidates miss.

Quickfire

A RAPID SQL QUIZ

Multiple choice, one idea at a time, with an instant explanation for every answer. SQL behaviour and query performance through to statistics, A/B testing, data modelling and the modern data stack.

Data Roles

WHERE YOU ACTUALLY FIT

Data Analyst, BI Analyst, Analytics Engineer, Data Scientist, Data Engineer and ML Engineer. Where each sits on the analyze-to-build spectrum, the skill mix each one needs, and the SQL each one actually writes.

FROM THE CASE FILES

What detectives actually say

I know basic SQL and honestly I did not understand window functions and some advanced concepts until I started querying in QueryCase. You have put all the concepts up in a structured manner.
Data Engineer
Finished all 54 cases
This is my first approach to SQL in my life, and it is very intuitive. I finished the free cases already, and I was surprised when I looked at the price and saw it was one payment.
New to SQL
via Reddit
I am a second year data science student and it would have been great to have this in my relational database management systems unit. This website makes it feel easy, and most importantly, engaging.
Data science student
via Reddit
TAUGHT AT A US COLLEGE

Students strengthened their SQL skills through interactive challenges on QueryCase.

Used in a weekend lab at a community college in the United States, preparing students for the CompTIA Data+ certification. The cohort spent four hours working through cases together, with their licences sponsored.

Course instructor, CompTIA Data+ cohort 2026

US college
weekend lab
CompTIA Data+
exam cohort
4 hours
hands-on
54
Cases to Solve
100%
Free to Start
5
Ranks, Rookie to Chief
Zero
Setup. Runs in your browser.

Ready to join the precinct?

Your first case is waiting. Start learning SQL today. It's free and you'll be writing queries in minutes.

Try for free now · No credit card required · First case in minutes