// 2026-08-05 · Learning & Education · by Bob Smith

SQLZoo: Learn SQL by Actually Writing SQL

SQLZoo teaches SQL through graded exercises you run against real tables in the browser. No videos, no signup, no database to install, just queries and results.

Screenshot of SQLZoo
SQLZoo: what you'll see when you land there

SQLZoo teaches SQL the only way it ever really sticks: by making you write queries against real tables and refusing to be impressed until the right rows come back. There is no video. There is no slide deck. There is a question, a text box, a results grid, and the quiet judgment of a query that returns nothing at all.

What is SQLZoo?

SQLZoo began as teaching material at Edinburgh Napier University, assembled by lecturer Andrew Cumming, and it has been sitting on the open web for the better part of two decades. It looks it, in the best possible way. Plain pages, plain tables, a text box, a Submit button. Nothing has been redesigned into a learning journey with progress rings.

The structure is a sequence of tutorials, each one built around a single small dataset. SELECT basics runs against a table of countries with area, population and GDP. The next tutorial hands you Nobel prize winners. Joins are taught using match and goal data from a football tournament, which is a genuinely inspired choice, because a join that is subtly wrong produces a scoreline that is obviously wrong. More joins arrive via a movie database of films, actors and casting. Nulls are taught with teachers and departments, where the whole lesson is that a missing department is not the same as a department named nothing. Self joins use Edinburgh bus routes.

That dataset choice is most of the pedagogy. Each table is small enough to hold in your head and structured enough that a mistake shows up as a visibly stupid answer rather than a plausible one. You do not need someone to tell you your query is wrong when it claims a country has a population of four.

Everything runs server-side, so there is nothing to install and nothing to configure. Most tutorials also carry an engine dropdown, letting you run the same exercise against MySQL, PostgreSQL, SQL Server or Oracle and watch the dialects diverge.

Alongside the tutorials there are quizzes, a reference section, and material on the parts nobody teaches you: creating tables, inserting and updating rows, permissions, and the general business of not destroying a production database.

What can you do with SQLZoo?

  • Work through the tutorials in order. They are sequenced deliberately, from a bare SELECT to nested subqueries and aggregation with HAVING. Skipping ahead mostly produces confusion.
  • Run real queries against real tables. Type SQL, hit Submit, see rows. The feedback loop is measured in seconds.
  • Switch database engines. Use the dropdown to run the same problem against a different dialect and find out which bits of your SQL were never standard in the first place.
  • Take the quizzes. Each tutorial has a matching multiple-choice quiz that tests whether you understood the concept or just pattern-matched the previous answer.
  • Learn the write side. Separate sections cover CREATE, INSERT, UPDATE, DELETE and table design, not just querying.
  • Use it as a scratchpad. The query boxes accept anything valid, so you can poke at a dataset freely instead of only answering the question asked.
  • Check the reference pages. Short, dry summaries of functions and syntax, useful long after you have finished the tutorials.

Tips to get the most out of it

Write the query before you read the hint. The temptation to peek is enormous and it converts an exercise into a reading comprehension test. Wrong answers here cost nothing.

Look at the table first. Every tutorial opens with a sample of the data. Thirty seconds spent understanding the columns saves five minutes of guessing why your join produced 40,000 rows.

Pick one engine and stay there. The dropdown is great for exploration and terrible for consistency. Choose whichever dialect you actually use at work, and only switch deliberately.

Do the join tutorials twice. Joins are where most people quietly give up on SQL. The football and movie datasets are the best explanation of them on the internet, and they reward a second pass more than any other section.

Break things on purpose. Drop the WHERE clause. Join on the wrong column. Watch what a cartesian product actually looks like. Understanding failure modes is most of the skill.

Treat it as practice, not a course. SQLZoo will not hold your hand or explain relational theory. Pair it with a book or a reference if you want the why, and use the site for the reps.

If you like SQLZoo, also try…

  • SQL Murder Mystery: the same skills wrapped in a whodunit, and a great victory lap after finishing SQLZoo.
  • Learn X in Y Minutes: whole languages compressed into a single annotated code sample.
  • regex101: the same instant-feedback approach applied to the other syntax everyone pretends to understand.
  • BetterExplained: for when you want the intuition behind a concept rather than another exercise.

More things worth learning properly in Learning & Education, and more daily-driver software in Tools & Utilities.

Frequently asked questions

What is SQLZoo?

SQLZoo is a free interactive SQL tutorial site that grew out of university teaching material. It presents a series of exercises built around small real datasets, and you answer each one by typing a query into a box and running it. The site checks the result and tells you whether the rows you returned are correct.

Is SQLZoo free?

Yes. Every tutorial, quiz and reference page is free to use and no account is required. You do not need to install a database or sign up for anything, since the queries run on the site's own servers.

Is SQLZoo good for complete beginners?

It works well for beginners who want practice rather than theory. The first tutorial starts with a single SELECT statement against a table of countries and builds up gradually to joins, subqueries and aggregation. It does assume you are willing to experiment, since the site shows you the result of your query rather than explaining the answer up front.

Which SQL dialect does SQLZoo use?

Most tutorials let you pick an engine from a dropdown, covering common options such as MySQL, PostgreSQL, SQL Server and Oracle. The syntax differences show up in things like string functions and date handling, so switching engines partway through an exercise can change what a working query looks like.

Visit SQLZoo →

← All posts · Browse the directory