Learn SQL by running it · not by reading about it

SQL you can touch, break, and watch

Every page here has a live SQL sandbox powered by a real query engine running right in your browser. Type a query, drag a slider, and watch the exact rows appear and disappear. No install, no server, no internet — just you and a little cafe database called Byte Bites.

A calm place to begin

You do not need to memorise SQL.

Start with a question you can say in plain English. Then let SQL turn that question into rows. Each lesson follows the same rhythm: see it → change it → explain it back.

  1. 1
    Ask"Show me the products."
  2. 2
    ShapeAdd a filter, sort, or total.
  3. 3
    CheckRun it and read the rows.
Start with the basics
Try the idea before the syntax

Build a question. Watch SQL answer it.

Change the words below. The English request, SQL, and result move together.

Try it this second — no reading required Drag the slider and watch rows appear/vanish instantly. This is how the whole site works.
Live sandbox · the menu under a price cap
edit the SQL freely · Ctrl+Enter also runs · move a slider to see it live

Meet the database: Byte Bites cafe

Four small tables. You'll get to know them by heart because every example uses them. Click any card to jump into the browser sandbox on the Basics page.

👤 customers 8 rows

Who buys coffee. Columns: id, name, city, joined (date), vip (1 or 0).

🥐 products 8 rows

What's on the menu. Columns: id, name, category (Coffee/Tea/Bakery), price.

🧾 orders 22 rows

Who bought what. Columns: id, customer_id, product_id, qty, order_date. This table links the other two.

🧑‍🍳 employees 6 rows

The staff. Columns: id, name, role, salary, city. Handy for extra practice.

Your sandbox is yours Changes you make with INSERT/UPDATE/DELETE only affect your copy in this browser tab, and a Reset button (or reloading the page) restores the original data. Break things fearlessly — that's the point.

🗺️The journey

1 · SQL Basics start

What SQL is, how to read a query out loud, and a full tour of the four tables.

2 · SELECT

Pick columns, rename them, do math, and use DISTINCT — the verb you'll type most.

3 · WHERE — the filter

Keep only the rows you want. Sliders let you feel AND/OR, LIKE, IN, BETWEEN live.

4 · ORDER BY & LIMIT

Sort results and take the top N — "the 3 most expensive items" in one line.

5 · The Query Pipeline ★ visual

Watch rows flow FROM → WHERE → GROUP → HAVING → SELECT → ORDER → LIMIT, stage by stage.

6 · Aggregates & GROUP BY

Turn many rows into one number: totals, averages, counts — grouped and animated.

7 · JOINs

Stitch tables together. See rows match up, and why LEFT JOIN keeps the lonely ones.

8 · INSERT · UPDATE · DELETE

Change the data and watch the table update. With a safety net.

9 · CASE, Functions & more

Labels with CASE, text/number functions, and a peek at subqueries.

10 · Cheat Sheet & Challenges graded

A one-page reference plus puzzles the engine checks for you. Beat them all.

📈Your progress

Saved in your browser — close the tab and come back where you left off.

🔓 You're reading a free chapter of SQL — the first two are open.
Unlock the rest of this course with a one-time payment.
Unlock this course →
🔓 See course prices