SQL Tutorial

Learn SQL step by step, from your first SELECT to JOINs, CTEs and window functions. Every example runs on small sample databases, and you can see the exact result each query returns.

1. SELECT basics

2. Filter with WHERE

3. Sort with ORDER BY

4. Count and group

5. Join tables

6. Subqueries and CTEs

7. CASE, text and dates

8. Window functions

9. Change data

Learn by writing SQL, not just reading it

Each tutorial has a matching interactive lesson. Write the query yourself, run it on real data and get instant feedback.

Start the free SQL course