5 MIN · 2026-10-31

How to practice SQL online for free

A practical guide to learning SQL by writing queries: what a good practice setup needs, a 20-minute routine, and three queries you can run right now.

How to practice SQL online for free

Watching a tutorial feels like learning. It isn't. SQL is closer to a motor skill: you get better by writing queries, breaking them, and fixing them. The good news is that you don't need a paid course or a local install to do that.

This is a practical guide to building a free practice habit, using the record-store database that powers every SQLazo exercise.

What a good practice setup needs

Four things, in order of importance:

  1. A real database. One with several tables, NULLs and messy values — not a single users table with three rows.
  2. Instant feedback. Run the query, see the rows, compare them with what you expected.
  3. A path. Random exercises teach random facts; a sequence builds on itself.
  4. Zero setup. If opening the editor takes five minutes, you won't do it on a Tuesday night.

A browser tab with SQLite covers all four. No server, no Docker, no account.

A 20-minute routine

Short sessions beat heroic weekends. Try this four-step loop:

  1. Warm-up (3 min). Re-run a query you already know. It gets your eyes on the schema.
  2. One new idea (7 min). Read one section, then write the smallest query that uses it.
  3. One stretch exercise (7 min). Pick something you can't solve at first glance. Struggle for a minute before asking for a hint.
  4. Explain it back (3 min). Say out loud why the query works. If you can't, you've found the next thing to review.

Three queries to try right now

Start with the whole table, then narrow it:

SELECT * FROM artists LIMIT 5;

Filter with a condition:

SELECT name, country
FROM artists
WHERE country = 'Spain'
ORDER BY name;

Group and count:

SELECT g.name AS genre, COUNT(*) AS tracks
FROM genres g
JOIN tracks t ON t.genre_id = g.id
GROUP BY g.name
ORDER BY tracks DESC;

The last query returns eight rows, one per genre, sorted from Rock (11 tracks) down to the three-track genres. It uses a join, an aggregate and a sort — three ideas in one result.

Why browser-based practice works

SQLite compiled to WebAssembly runs the same engine that ships inside phones and browsers. The database is rebuilt from scratch on every run, so you can DELETE or UPDATE freely and the next attempt starts clean. Queries never leave your machine, and there is no server to wait for.

That combination — a real engine, instant reset, no setup — is what makes a five-minute session possible at all.

Where to go next

Keep exploring: open the first-queries chapter and run the first exercise. One query is enough to start.

Questions and answers

Do I need to install anything to practice SQL?

No. SQLazo runs SQLite in your browser with WebAssembly, so there is no database server to install and nothing to configure.

Is SQLazo really free?

Yes — all 14 chapters, the 98 exercises and the cheat sheet are free. An account is optional and only syncs progress across devices.

How long should I practice each day?

Twenty focused minutes beat two passive hours. One warm-up query, one new idea and one exercise you have to think about is enough to make progress.

Keep learning