Write. Run. Check.

Practise SQL online

Pick a challenge, write your query and check the result. From your first SELECT to a complete project.

We may earn a commission if you purchase through these links. Details

If you are just starting, practise with the first lesson.

8
solved exercises
30
SQL Quest levels
45
lessons with exercises
No registration
practice on this site
A good starting point

One question.
Your query. One result.

Work with StoreSQL: customers, products and orders. Solve twenty challenges of increasing difficulty and compare your answer with an explained solution.

  • Filters
  • Sorting
  • Aggregates
  • JOIN
See the 20 exercises
StoreSQL / a first query

Which active customers live in London?

SELECT name, city
FROM customers
WHERE city = 'London'
  AND active = 1
ORDER BY name;
Example query result: active customers in London
namecity
Amy WilsonLondon
Megan ReedLondon
Nia SmithLondon
Your way

Choose your next session

Test my level
30 levels · 3 worlds

Learn by playing

Complete missions with real SQL in Arcane Academy, Mission Cosmos or District 404. Your progress is shared across all three worlds.

Start SQL Quest
52 lessons · step by step

Practise with a guide

Understand the concept and apply it in each lesson's lab. Work your way from SELECT to table design.

Go to the SQL course
Editor · free-form queries

Explore on your own

Try queries on the teaching database. Change a filter, join tables and see how the result changes.

Open the editor
20 minutes well spent

A routine for making progress

The goal: understand why your query answers the question.

  1. 2 min

    Choose a question

    Pin down one skill and the result you want to get.

  2. 3 min

    Predict the result

    Work out which columns and rows should appear.

  3. 10 min

    Write and check

    Run it, compare and explain any differences.

  4. 5 min

    Try a variation

    Change one condition and predict what will change.

Take the data with you

Your next practice session,
outside the browser too

Download the teaching database as SQL or SQLite and keep practising in your own environment. It includes fictional shop, employee and library data.

Store

customers · orders · products · payments

Staff

employees · departments · managers

Library

authors · books · loans

Guides for revising

More ways to practise and prepare for interviews

Supporting material with examples run on the same practice database.