Start from scratch

New here? Start with one query.

LearnSQL is a free place to practise SQL against real sample databases — no sign-up, no install, nothing to break. You can run your first query about ninety seconds from now. Here's the shortest path in, wherever you're starting from.

Where are you starting?

Your first fifteen minutes

If you'd rather just be told what to do, do these five things in order.

2 minutes

Run a query you didn't write

Open the SQL Editor and press Run. There's already a query in the box. It returns real rows from a real database — nothing to set up, and you cannot break anything, because it's read-only.

3 minutes

Understand what it did

The editor explains your query in plain English as you type, clause by clause. Change a column name, change the sort order, run it again. This is the whole loop — read, tweak, run.

5 minutes

Learn the four words that matter

SELECT, FROM, WHERE, ORDER BY. That's a genuinely useful SQL vocabulary, and Learn SQL from scratch walks you through them with exercises that check your answer as you type.

5 minutes

Total something up

Counting and summing is where SQL starts beating a spreadsheet. Aggregate functions covers SUM, AVG and COUNT using real cash-receipts data — with the Excel equivalents beside each one.

Whenever you're ready

Bring it into your own tools

Once the browser feels small, connect a proper client. Install DBeaver for a real SQL workbench, or pull the data straight into Excel. Same databases, your tools.

Stuck on what to type? The sample queries page has ten levels of working SQL — from one table up to five joined together — that you can copy straight into the editor.

What's free, and what isn't

Most of this site needs nothing from you. Being straight about the line:

✅ Free, no sign-up

The free browser tools and the open API never need a login — you can learn the whole language without spending anything.

Common questions