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.
The short version
- 7 in 10 queries are wrong. Only 12,834 of 44,763 were correct. That is normal. Players send about 3.5 queries for every correct answer
- JOINs are the wall. Players solve 48% of SELECT and WHERE questions on the first query. For JOINs it is 26%
- GROUP BY is harder than JOIN. Only 22% of GROUP BY questions are solved first try, the lowest of any skill
- The top error is a name, not logic. 27% of all database errors are a column that doesn't exist
- The quiet failure is worse. For every query that crashed, another one ran fine and returned the wrong rows
- SQL practice is a weekday habit. Thursday has almost 3 times the players of Sunday
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.
- Period: June 14 to November 14, 2026
- Who: 1,510 anonymous players in 2,278 play sessions. There are no accounts, so we count browsers, not people
- What counts as correct: the game compares the rows a query returns with the expected rows. Any query that returns the right rows passes
- Error details were recorded from September 5 (24,000 failed queries). First-try rates were recorded from October 24 (5,148 solved questions)
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.
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.
| Skill | Solved first try | Queries per solved question | Sessions that opened the answer |
|---|---|---|---|
| SELECT and WHERE | 48% | 2.8 | 28% |
| ORDER BY, DISTINCT | 54% | 2.6 | 28% |
| LIKE, BETWEEN, IN | 34% | 4.8 | 51% |
| GROUP BY, HAVING | 22% | 5.6 | 80% |
| JOINs | 26% | 7.1 | 78% |
- A JOIN question takes 7 queries to solve. A SELECT question takes fewer than 3
- On JOIN and GROUP BY questions, about 4 in 5 players open the answer at some point
- Subqueries and window functions looked easier (40% and 35% first try) but with fewer than 50 solves each. The players who reach those cases are the ones who didn't quit, so we left them out of the chart
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.
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:
- BETWEEN with no AND (496 times). People write
BETWEEN '01:00:00'and stop or put a comma where theANDgoes - A dangling AND or OR (170 times). The query ends on
ANDwith nothing after it, usually after deleting a condition
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.
- 10,492 queries ran without an error and returned the wrong answer. That is more than the 9,951 that crashed
- 27% of the wrong-result queries returned zero rows. The filter matched nothing, often because of capital letters (
'study'vs'Study') or a time written as'01:00'when the data says'01:00:00' - The rest returned rows that looked fine. Too many rows from a missing filter or the right rows with the wrong columns
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.
| Question | What it needs | Solved first try | Median tries |
|---|---|---|---|
| What are each suspect's alibi details? (Case 4) | A first JOIN | 11% | 6 |
| Which "Sheppard" family members were in the Study? (Case 2) | LIKE with wildcards | 15% | 4 |
| How many suspects claimed each alibi location? (Case 3) | COUNT with GROUP BY | 16% | 4 |
| Who never saw the victim alive? (Case 4) | LEFT JOIN and IS NULL | 19% | 8 |
| Who last saw Roger Ackroyd alive? (Case 2) | WHERE on an exact text value | 19% | 3 |
| Who was in the Drawing Room or the Garden? (Case 2) | IN or OR | 19% | 4 |
| Who was in Compartment 4? (Case 1) | BETWEEN on times | 21% | 4 |
- None of these needs a window function or a subquery
- Each one is the first time a player meets a new idea: the first JOIN, the first wildcard, the first GROUP BY
- "Who never saw the victim alive?" asks for something that is missing. Finding what isn't there (LEFT JOIN plus IS NULL) took a median of 8 tries, the most of any question on this list
6. When people practise SQL
Play sessions by day of the week (UTC). June 14 to November 14, 2026.
- Thursday has 2.9 times the sessions of Sunday. People learn SQL at work and in class, not on the sofa
- India has the most players (23%), then the United States (13%), Indonesia, Germany and the United Kingdom
- We see visits arrive from Google Classroom and Microsoft Teams, so some of those weekday sessions are whole classes
What to do with this
If you are learning SQL
- Expect to be wrong 2 times out of 3. Everyone is
- Read the column list before you type. It prevents the most common database error
- Single quotes for text. Always
- Spend your time on JOIN and GROUP BY. That is where the first-try rate halves
- Check the row count every time a query runs. Zero rows usually means a filter typo
If you teach SQL
- Budget about twice the time for the first JOIN lesson as for a filtering lesson
- Teach "find what is missing" (LEFT JOIN with IS NULL) as its own lesson
- Show a query that runs and is wrong. Students trust any result that isn't an error
- Our page for teachers explains how to run the cases in class
Limits of this data
- It is one game with one small database. Other courses will see different numbers
- Players are anonymous. We can't tell a student from a working analyst
- Hard cases are played by people who finished the easy ones, so the hard-skill numbers flatter the skill
- The game showed a hint or the answer when asked, which helps people finish
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.
Keep going: SQL JOINs explained | WHERE vs HAVING | More articles