Home Cases Blog About

What 44,763 Beginner SQL Queries Got Wrong

Five months of real queries from 1,510 learners. Where they got stuck, in numbers.

Most advice about learning SQL comes from people who already know it. We have something better: every query that players typed into a SQL game, including the 71% that were wrong.

44,763queries submitted
1,510learners
103countries
29%of queries were correct

The short version

Where the data comes from

Query the Murder is a free game where you solve Agatha Christie murder cases by writing SQL. It has 18 cases and 90 questions. Players type real queries and they run on a real PostgreSQL database.

1. Seven in ten queries are wrong

Players submitted 44,763 queries and 12,834 were correct. That is 29%.

It sounds bad. It isn't. In more than 9 of 10 sessions, a player who starts a question gets to the answer. The failed queries are the practice. On an easy case, the median player needs 15 queries and 17 minutes to answer 5 questions.

If you are learning SQL and most of your queries fail, you are doing what everyone else is doing.

2. JOINs and GROUP BY are where beginners hit the wall

We grouped the 90 questions by the SQL their answer needs. Then we counted how often players got a question right on their very first query.

ORDER BY, DISTINCT54%
SELECT and WHERE48%
LIKE, BETWEEN, IN34%
CASE WHEN32%
JOINs26%
GROUP BY, HAVING22%

Share of solved questions that were right on the first query. October 24 to November 14, 2026. 5,148 solved questions. A question counts under every skill its answer uses.

The drop is steep and it shows up in three other ways.

SkillSolved first tryQueries per solved questionSessions that opened the answer
SELECT and WHERE48%2.828%
ORDER BY, DISTINCT54%2.628%
LIKE, BETWEEN, IN34%4.851%
GROUP BY, HAVING22%5.680%
JOINs26%7.178%

3. The most common SQL errors

Between September 5 and November 14, PostgreSQL (or our parser) rejected 9,951 queries. Here is what went wrong.

Syntax slip39%
Column does not exist27%
GROUP BY rule broken4.3%
Not a SELECT3.7%
Wrong value for the type3.5%
Ambiguous column3.4%
WHERE without a test2.2%
Table does not exist1.6%
Everything else15%

Share of 9,951 rejected queries. September 5 to November 14, 2026.

Syntax slips: 39%

Typos, missing commas and clauses left unfinished. Two patterns stand out:

Column does not exist: 27%

The single most common database error. 863 different sessions hit it. Most of the time the column is misspelled or belongs to the other table.

About 1 in 11 of these (239) is the quote mix-up. In PostgreSQL, double quotes mean a column name and single quotes mean text:

-- Fails: PostgreSQL looks for a column called Compartment 4
WHERE location = "Compartment 4"

-- Works
WHERE location = 'Compartment 4'

The GROUP BY rule: 4.3%

431 queries selected a column that was neither grouped nor inside COUNT or SUM. PostgreSQL answers with "column must appear in the GROUP BY clause or be used in an aggregate function". Our guide to WHERE vs HAVING covers the idea behind it.

Ambiguous column: 3.4%

336 queries joined two tables that both have a case_id or id column and didn't say which one they meant. This error only exists once you JOIN, which is part of why JOIN questions take 7 tries. See SQL JOINs explained.

4. The quiet failure: it ran but it was wrong

Errors are loud. The database tells you what broke. The other kind of failure is quiet.

At work, nobody tells you the result is wrong. This is the habit worth building early: check the row count and ask if it makes sense.

5. The hardest questions look easy

These are the questions with the lowest first-try rate among those with at least 50 solves.

QuestionWhat it needsSolved first tryMedian tries
What are each suspect's alibi details? (Case 4)A first JOIN11%6
Which "Sheppard" family members were in the Study? (Case 2)LIKE with wildcards15%4
How many suspects claimed each alibi location? (Case 3)COUNT with GROUP BY16%4
Who never saw the victim alive? (Case 4)LEFT JOIN and IS NULL19%8
Who last saw Roger Ackroyd alive? (Case 2)WHERE on an exact text value19%3
Who was in the Drawing Room or the Garden? (Case 2)IN or OR19%4
Who was in Compartment 4? (Case 1)BETWEEN on times21%4

6. When people practise SQL

Monday293
Tuesday314
Wednesday437
Thursday459
Friday360
Saturday270
Sunday159

Play sessions by day of the week (UTC). June 14 to November 14, 2026.

What to do with this

If you are learning SQL

If you teach SQL

Limits of this data

Use these numbers

You are free to quote any number or chart on this page. Please link to this page as the source. The data is shared under a CC BY 4.0 licence. If you'd like the numbers as a spreadsheet, write to querythemurder@gmail.com.

See where you land

Case 1 takes the median player 17 minutes and 15 queries. See if you can beat that.

Start Case 1 →

Keep going: SQL JOINs explained  |  WHERE vs HAVING  |  More articles