TheAnalyst / SQL
SQL Zero → Advanced

Learn SQL.
One step at a time.

One small idea. Recall it without looking. Practice immediately. Get feedback. Repeat tomorrow.

Day 0

Start with the question, not the syntax.

Today's skill is simple: identify the table you need, choose the columns you want, filter the right rows, and sort the result.

Learn

Think in tables

A table is a collection of rows. A row is one record. A column is one attribute. SQL asks the database to produce a result set from those rows.

Learn

Four building blocks

SELECT name
FROM customers
WHERE country = 'India'
ORDER BY name;
Why it works

Read it like a sentence.

  • FROM — start with this table.
  • WHERE — keep only matching rows.
  • SELECT — return these columns.
  • ORDER BY — choose the output order.
Worked example

Find the largest orders.

SELECT order_id, amount
FROM orders
ORDER BY amount DESC
LIMIT 3;

First understand the question. Then identify the columns. Then write the smallest query that answers it.

Recall before practice

Without looking at the example: How would you find the names of customers from India, sorted alphabetically?

Day 0 mastery

Do one final question without help.

Write a query that returns order_id and amount for orders above 2000, highest amount first.

Practice

Write. Run. Check. Try again.

Hints are available, but use them only after an honest attempt. The engine runs in your browser; no account is required.

Beginner

Available tables: customers · orders · employees

SQL engine

Loading…

Progress

Small steps. Keep going.

Progress is saved on this device. No sign-in is needed.

Course
0 / 31 days
Day 0 is ready
Day 0 is unlocked now. Future daily lessons unlock as they are published.
Spaced review

Your first review comes after mastery.

Complete the Day 0 mastery question. Then revisit the idea after a short gap and solve a fresh question without looking at the lesson.