No setup, no install. A real database is running in your browser on this page. You're about to question it.
Ask for everything
The simplest possible query asks a table for everything it has. SELECT * means "every column", and FROM orders names the table. Press Run and watch:
That's it. You wrote SQL, the database answered. Five rows came back because the table holds five orders.
Ask for just what you need
Real questions rarely need every column. Name the columns you want after SELECT, separated by commas. The editor above is live — but here's the next step ready to run:
Try changing it. Ask for status instead. Ask for a column that doesn't exist and read the error — errors are how the database talks back, and they're never as scary as they look.
Ask a question with a condition
Here's where it gets powerful. WHERE keeps only the rows that pass a test. Remember the cancelled order from the last lesson? Let's keep only the real sales:
Four rows now. The 10-unit cancelled order — the biggest line in the table — is gone, because it never really happened. You just did, in one line, the thing that separates a right answer from a wrong one in real analytics.
You now know the shape of most queries you will ever write: SELECT the columns you want, FROM the table they live in, WHERE the rows pass your test. Everything else in SQL builds on this sentence.
Without the WHERE line, a "total units sold" number computed from this table would be…
Up next
You've run real SQL. The last lesson of this course shows you where this skill takes you — and hands you to your first client.