iwantcoding.com
🔥 Daily 👥 Rooms 🏆 Top Log in Sign up

SQL Exercises

Each SQL lesson has a fill-in-the-blank exercise. You complete a query with one or two missing tokens — and the grader checks the whole thing against the lesson's expected output.

How it works

  • Read the instruction at the top.
  • Click the blank, type your answer, and press Run.
  • A wrong answer triggers a hint; the second wrong try shows the solution.

Why fill-in-the-blank

FormatWhat it tests
Multi-choice quizRecognition — "I've seen this."
Fill-in-the-blankRecall — "I can produce this."
Open-endedSynthesis — "I can build it from scratch."

Recall is the strongest predictor of retention. The blanks are intentionally small so the cognitive load stays on the new concept.

Sample

SQL
-- Instruction: select every customer in Australia.
SELECT *
FROM customers
____ country = 'AU';

Answer: WHERE.

Where to go next

  • Finish all 70+ SQL exercises to unlock the "Built it from blanks" badge.
  • Try the SQL Bootcamp for daily challenges.
  • Pair every exercise with the matching Try it Yourself » — small variations build intuition.
Tip: If a blank stumps you, scroll up to the lesson's example — the answer is almost always demonstrated there.

Example

Example
-- Fill in the blank to complete the query:
SELECT *
FROM customers
____ country = 'AU';
Try it Yourself »

Exercise

The exercise format is…

-in-the-blank

Test yourself

Q1. Exercise format is…
Q2. Fill-in-the-blank trains…
Q3. Each lesson has…

Discussion

Loading…