SQLExercisesStart free

Runs 100% in your browser · no signup

Get job-ready in SQL by writing it. Not by watching videos.

Interactive SQL exercises built on real business questions. Write a query, hit run, and see exactly which rows match. Practice SELECT, JOINs, GROUP BY and window functions until they're muscle memory.

query.sql
SELECT name, email
FROM customers
WHERE country = 'Canada'
  AND active_status = 'active'
ORDER BY name;
Correct! All 4 rows match. · 0.8 ms

Why interactive micro-drills beat 40-hour video courses

Most people who "learned SQL" from a video course freeze when handed a blank editor. Watching is recognition; writing is recall. Learning research consistently finds that retrieval practice, actively producing an answer, builds far more durable skill than re-watching or re-reading. SQLExercises is built entirely around that loop.

Active recall, every drill

You never watch a solution being typed. Each exercise gives you a business question and an expected result, and you produce the query.

Feedback in milliseconds

Your query and the reference solution run side by side in an in-browser database. Wrong rows light up red, with a hint about which clause to check.

Zero setup, zero friction

No Postgres install, no Docker, no sample-data download. Open the page and start typing. Five minutes on a coffee break counts.

Video courses compared with SQLExercises
Typical video courseSQLExercises
Time to first query45+ minutes of setup videosUnder 10 seconds
How you learnWatching someone else typeWriting every query yourself
FeedbackNone, or a quiz at the endInstant row-by-row diff
SetupInstall a DB server and clientNothing: runs in your browser
Session length40 hours, start to finish5-minute drills you can stack

How each SQL drill works

  1. 01

    Learn one concept, fast

    Each drill opens with a 30-second explanation and a tiny example, then a realistic request from marketing, finance or product.

  2. 02

    Write and run your query

    A full SQL editor with autocomplete for table and column names. Press Ctrl/⌘ + Enter to run.

  3. 03

    Get corrected, not just graded

    Wrong cells are highlighted and the feedback names your likely mistake. Hints come one at a time, and the solution unlocks after 3 tries.

SQL practice curriculum

From your first WHERE clause to the window-function questions interviewers love.

Module 3

Interview Drills

Module 4

Analytics Patterns

Simple pricing

Free

$0

  • First 21 exercises
  • Progress and streaks saved in your browser
  • No account required
Start free
Lifetime

Pro

$39 once

  • Every Interview and Analytics drill (39 more on top of the free 21)
  • Window functions, CTEs, self-joins
  • Every drill we add later, no subscription
Unlock every drill

One SQL interview question a day

Every day one Pro drill is free for everyone. Get it in your inbox and keep your streak going in five minutes a day.

One SQL question a day, nothing else. Unsubscribe with one click in any email.

Frequently asked questions

Do I need to install a database to practice SQL?

No. SQLExercises runs real PostgreSQL, compiled to WebAssembly, inside your browser. There is nothing to install, no account to create, and your queries never leave your machine.

How is this different from a SQL video course?

Video courses teach by showing. We teach by making you write the query. Every drill is a realistic business question with a target result, and you get instant feedback on exactly which rows and columns are wrong.

Is it good preparation for SQL interviews?

Yes. The Interview Drills and Analytics Patterns modules cover what data, analytics and backend interviews test: window functions like DENSE_RANK and LAG, recursive CTEs, retention cohorts, sessionization, gaps and islands, and tricky NULL handling.

Which SQL dialect do the exercises use?

PostgreSQL, the dialect most data and analytics interviews use. Everything you practice (SELECT, JOINs, GROUP BY, HAVING, window functions, CTEs, date math) transfers directly to Snowflake, Redshift and BigQuery, and mostly to MySQL.

What do I get with Pro?

Lifetime access to every Interview Drill and Analytics Pattern for a one-time $39 payment. No subscription, and all future modules are included.