SQL Lesson Plans
18 ready-made lessons. Each one is a murder case your students solve with SQL.
- Free. No student accounts, no installs, works on school Chromebooks
- Timed with real data. Lesson lengths come from how long players took, not from a guess
- Mapped to skills. Each lesson lists the SQL keywords its five questions need
- Printable. Print this page for your planning folder
All 18 lessons at a glance
| Lesson | Level | SQL it teaches | Time to solve | Right first try |
|---|---|---|---|---|
| Case 1: Murder on the Orient Express | Easy | WHERE, ORDER BY, DISTINCT, BETWEEN | 17 min | 38% |
| Case 2: The Murder of Roger Ackroyd | Easy | WHERE, IN, LIKE | 20 min | 31% |
| Case 3: The Mysterious Affair at Styles | Easy | WHERE, ORDER BY, DISTINCT, BETWEEN, IN, COUNT, GROUP BY | 21 min | 45% |
| Case 14: The Murder at the Vicarage | Easy | WHERE, ORDER BY, LIKE | 15 min | 62% |
| Case 15: The A.B.C. Murders | Easy | WHERE, ORDER BY, LIKE, IS NULL | 16 min | 74% |
| Case 16: A Murder is Announced | Easy | WHERE, ORDER BY, LIKE | 7 min | 78% |
| Case 4: Murder in Mesopotamia | Medium | WHERE, ORDER BY, DISTINCT, GROUP BY, CASE, JOIN, LEFT JOIN, IS NULL | 27 min | 44% |
| Case 5: Evil Under the Sun | Medium | WHERE, ORDER BY, LIKE, GROUP BY, CASE | 22 min | 46% |
| Case 6: Crooked House | Medium | WHERE, ORDER BY, LIKE, COUNT, GROUP BY, HAVING, JOIN | 41 min | 41% |
| Case 10: Lord Edgware Dies | Medium | WHERE, ORDER BY, DISTINCT, IN, JOIN | 43 min | 56% |
| Case 11: Cards on the Table | Medium | WHERE, ORDER BY, DISTINCT, LIMIT, IN, COUNT, GROUP BY, JOIN, UNION | n/a | n/a |
| Case 12: The Clocks | Medium | WHERE, ORDER BY, IN, GROUP BY, CASE, JOIN | 19 min | 38% |
| Case 7: And Then There Were None | Hard | WHERE, ORDER BY, DISTINCT, LIMIT, IN, COUNT, GROUP BY, JOIN, LEFT JOIN, IS NULL, ROW_NUMBER | 26 min | 32% |
| Case 8: Death on the Nile | Hard | WHERE, ORDER BY, DISTINCT, LIMIT, IN, LIKE, COUNT, GROUP BY, HAVING, CASE, JOIN, LEFT JOIN, IS NULL, CTE | 46 min | n/a |
| Case 9: Five Little Pigs | Hard | WHERE, ORDER BY, DISTINCT, LIKE, COUNT, SUM, GROUP BY, HAVING, CASE, JOIN, LEFT JOIN, IS NULL, COALESCE, CTE, RECURSIVE, UNION, ROW_NUMBER, LAG, LEAD | n/a | n/a |
| Case 13: Appointment with Death | Hard | WHERE, ORDER BY, LIKE, GROUP BY, JOIN | n/a | n/a |
| Case 17: Murder is Easy | Hard | WHERE, ORDER BY, LIMIT, IN, LIKE, COUNT, GROUP BY, JOIN, ROW_NUMBER | n/a | 40% |
| Case 18: Endless Night | Hard | WHERE, ORDER BY, DISTINCT, LIKE, JOIN, IS NULL | 48 min | 65% |
Time to solve is the median for players who finished all five questions (cases with at least 8 finishes). Right first try is the share of solved questions answered with the first query. Data to November 14, 2026. A pair of students new to SQL will take longer, so allow about double.
Three ready-made plans
One lesson (50 to 60 minutes): the taster
- 10 min. Put Case 1 on the projector. Read the story and run question 1 together
- 30 min. Pairs finish Case 1. One types, one checks the table list. Swap every question
- 10 min. Compare two different queries that both passed. Ask why both are right
- Extension. Fast pairs start Case 14
Three lessons: from filtering to JOINs
| Lesson | Cases | Focus | Talk about |
|---|---|---|---|
| 1 | 1 and 14 | SELECT, WHERE, ORDER BY | Why text needs single quotes |
| 2 | 2 and 3 | LIKE, IN, BETWEEN, COUNT with GROUP BY | A query that runs and returns nothing |
| 3 | 4 | JOIN, LEFT JOIN and IS NULL | Finding the suspect with no record |
Six weeks: a full SQL unit
| Week | Cases | Focus |
|---|---|---|
| 1 | 1, 14, 16 | SELECT, WHERE, ORDER BY |
| 2 | 2, 15 | LIKE, IN, BETWEEN, NULL |
| 3 | 3, 5 | COUNT, GROUP BY, CASE |
| 4 | 4, 10 | JOIN and LEFT JOIN |
| 5 | 6, 12 | JOIN with GROUP BY and HAVING |
| 6 | 7 or 8 | Subqueries, CTEs and a first window function |
Where students get stuck
From the queries players have sent us:
- The first JOIN. Case 4, question 3 is solved on the first try by about 1 player in 9. Plan extra time for it
- Column names. The most common database error is a column that doesn't exist. Have students read the table list aloud before typing
- Quotes. Double quotes around text cause a confusing error. Single quotes for text, always
- Capital letters.
'study'does not match'Study'. The query runs and returns nothing
Student worksheet
Ask each pair to fill this in for every question. It turns guessing into thinking and gives you something to mark.
| Question | What are we looking for? | Tables and columns we need | The query that worked | What the result told us |
|---|---|---|---|---|
| 1 | ||||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 |
Before the lesson
- Laptops or desktops only. The game doesn't run on phones
- Question 5 names the killer. Ask early finishers to keep it quiet
- Every question has a Reveal Answer button. Decide whether it's allowed
- Progress is lost when the browser closes, so finish a case within one lesson
- Share the link to the case page (for example querythemurder.com/case1.html) in Google Classroom or Teams
Every lesson in detail
Case 1: Murder on the Orient Express
- Identify the Passengers
- When and where was everyone?
- Who Was in Compartment 4?
- Who Had a Motive?
- Who Stabbed Samuel Ratchett?
Case 2: The Murder of Roger Ackroyd
- Identify the Key Parties Involved
- Who was in the Drawing Room or the Garden?
- Which "Sheppard" family members were in the Study?
- Who last saw Roger Ackroyd alive?
- Who murdered Roger Ackroyd?
Case 3: The Mysterious Affair at Styles
- Identify the Key Parties Involved
- How many suspects claimed each alibi location between 4:45 and 5:15 AM
- Who was in the bedroom between 4:45 to 5:15 AM?
- Who was not in the bedroom when Emily died?
- Who murdered Emily Inglethorp?
Case 14: The Murder at the Vicarage
- Meet the suspects
- Who was at the vicarage?
- Who is the artist?
- Who confessed to the murder?
- Who killed Colonel Protheroe?
Case 15: The A.B.C. Murders
- Meet the suspects
- Where did each murder happen?
- Who was wrongly accused?
- Who stood to gain from the third victim's death?
- Who committed the A.B.C. murders?
Case 16: A Murder is Announced
- Meet the suspects
- Who was at Little Paddocks that night?
- Who was paid to stage the fake hold-up?
- Who stood to inherit if Miss Blacklock died?
- Who committed the murder?
Case 4: Murder in Mesopotamia
- Identify the Key Parties Involved
- What is the timeline of alibis from earliest to latest?
- What are each suspect's alibi details?
- Who never saw the victim alive?
- Who murdered Louise Leidner?
Case 5: Evil Under the Sun
- Identify the Key Parties Involved
- Group Suspects by Their Alibi Timings
- Who never claimed to be at Pixy Cove?
- Who shared alibi locations?
- Who strangled Arlena Marshall?
Case 6: Crooked House
- Identify the Key Parties Involved
- Which family roles repeat?
- What were the first names of every Leonides family member?
- Which Leonides family members have an explicit motive?
- Who killed Aristide Leonides?
Case 10: Lord Edgware Dies
- Meet the Suspects
- Who Had Alibis at Key Locations?
- Which Suspects Have Recorded Events?
- Who Was First at Each Location?
- Who Killed Lord Edgware?
Case 11: Cards on the Table
- How Many Suspects vs Investigators?
- How Many Times Was Each Suspect the Dummy?
- Which Guests Were Suspected of Past Murders?
- Which Round Had the Highest Bid, and Who Was the Dummy?
- Who Killed Mr. Shaitana?
Case 12: The Clocks
- Meet the people involved
- Who appears in the timeline of events?
- What motives or connections were recorded?
- Who was linked to the inheritance?
- The full reveal, murder and espionage
Case 7: And Then There Were None
- List All Accusations
- Determine the Sequence of Deaths
- Cross-Reference Accusations with Death Events
- Find Guests Without Orchestration Events
- Who Orchestrated the Killings?
Case 8: Death on the Nile
- Identify Passengers
- Who Was Where?
- Cross-Reference Alibis
- Find the Jewel Thief
- Who Had Multiple Event Types?
Case 9: Five Little Pigs
- Build the Testimony Chain
- Analyze Testimony Consistency
- Timeline Gaps - Who Has Unaccounted Time?
- Find Who Was Mentioned Most
- Identify the Killer
Case 13: Appointment with Death
- Meet the suspects and their relation to the victim
- First and last appearance in the timeline
- Who had a recorded motive?
- Whose motive was tied to the victim's past?
- Who killed Mrs. Boynton?
Case 17: Murder is Easy
- Meet the villagers
- Sequence of "accidents"
- Who appears in the most events?
- Whose motive points to revenge or framing?
- Who committed the murders?
Case 18: Endless Night
- Meet the cast
- Key events at Gipsy's Acre
- Who are the victims?
- Whose motive mentions wealth, marriage, or the land?
- Who killed Ellie?
Tell us how it went
Using these in a class? We'd love to hear what worked and what didn't: querythemurder@gmail.com. If you list classroom resources on a school or course page, you're welcome to link to this one.