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.
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.
Change the words below. The English request, SQL, and result move together.
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.
Who buys coffee. Columns: id, name,
city, joined (date), vip (1 or 0).
What's on the menu. Columns: id, name,
category (Coffee/Tea/Bakery), price.
Who bought what. Columns: id, customer_id,
product_id, qty, order_date. This table links the other two.
The staff. Columns: id, name, role,
salary, city. Handy for extra practice.
What SQL is, how to read a query out loud, and a full tour of the four tables.
Pick columns, rename them, do math, and use DISTINCT — the verb you'll type most.
Keep only the rows you want. Sliders let you feel AND/OR, LIKE, IN, BETWEEN live.
Sort results and take the top N — "the 3 most expensive items" in one line.
Watch rows flow FROM → WHERE → GROUP → HAVING → SELECT → ORDER → LIMIT, stage by stage.
Turn many rows into one number: totals, averages, counts — grouped and animated.
Stitch tables together. See rows match up, and why LEFT JOIN keeps the lonely ones.
Change the data and watch the table update. With a safety net.
Labels with CASE, text/number functions, and a peek at subqueries.
A one-page reference plus puzzles the engine checks for you. Beat them all.
Saved in your browser — close the tab and come back where you left off.