· Skillz · SQL
SQL Sprint: free SQL game to learn queries block by block
A tiny database, a question from your boss. Snap the right query blocks together before time runs out.
What is SQL Sprint?
Your boss has a question about a tiny table: "Which books are cooking books?", "Total sales for each region?". Snap the right query blocks into place, in the right order, and run the query. The game runs it for real and shows the rows you got.
SQL Sprint is a free SQL game for beginners. SQL is the language people use to ask databases questions. Each round shows a tiny table (books, sales, plants or trips) and a question from your boss, like "The 2 cheapest books, cheapest first". Snap the right query blocks into the slots, in the right order, and run it before the clock runs out.
The game runs your query for real on the table and compares the rows with what the boss asked for. A wrong block shows what your query really returned, or a plain-English error like "Text values need single quotes". Puzzles ramp from SELECT and WHERE to ORDER BY and LIMIT, then GROUP BY, COUNT, SUM, AVG and HAVING.
At a glance
- Category
- Skillz
- Difficulty
- Medium
- Play time
- 3–5 min
- Price
- Free, in your browser, sign-up optional
How to play
- Read the question
- The boss asks about the small table on screen: books, sales, plants or trips.
- Snap the blocks
- Tap a block, then a slot (or press 1 to 5). Clauses go in SQL order: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT.
- Run it
- Your query runs for real. Same rows as the boss wanted? You score. Some blocks are traps.
- Score
- 100 per right query, +20 per slot above 3 and up to 50 for speed. A wrong query or the clock costs one of 3 lives.
Scoring
Each right query scores 100 points, plus 20 per slot above 3 and up to 50 for speed. The game runs your query and compares its rows with what the boss asked for.
A wrong query or the clock running out costs one of 3 lives. Ten queries, from 75 seconds down to 45.
What it trains
- SQL basics
- SELECT, FROM, WHERE, ORDER BY, LIMIT, GROUP BY and HAVING, in order.
- Reading questions precisely
- "Or less", "in total", "biggest first" turned into the right condition.
- Checking results
- Comparing the rows you got with the rows you wanted.
Strategy and tips
- Learn the clause order
- SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT. Out of order, the query won't run.
- Quote text, not numbers
- genre = 'Cooking' needs quotes; price < 10 doesn't.
- Read "or less" carefully
- "5 days or less" is <= 5. < 5 drops the row with exactly 5.
- WHERE before, HAVING after
- WHERE filters rows before grouping; HAVING filters the groups, so it can use COUNT and SUM.
- Top N = ORDER BY + LIMIT
- Sort the way the boss asked (DESC for biggest first), then LIMIT keeps the first rows.
Why play SQL Sprint?
SQL is one of the most useful skills at work: it answers questions straight from the data instead of waiting for a report. SQL Sprint trains the core of it, picking columns, filtering, sorting, grouping and counting, on tables small enough to check by eye, so every rule clicks.
Frequently asked questions
Is SQL Sprint free?
Yes. It is free and runs in your browser, with no download. Signing up is optional.
Do I need to know SQL already?
No. The how-to screen explains the clause order, and every answer explains the rule behind it.
Is it real SQL?
Yes. The blocks are standard SQL that works in common databases, and the game checks your query by running it on the table.
Is the data real?
No. The books, sales, plants and trips are made up for the game.