SQL Course
SQL (Structured Query Language) is how you ask a database questions — which rows to see, how to filter them, and how to combine data from multiple tables.
What you'll learn
Every example runs against a small real database, right in this page — powered by sql.js, a real SQLite engine compiled to WebAssembly. Click "Run query" to execute your edited SQL and see actual results.
Lessons
- Introduction
- Filtering with WHERE
- Sorting
- Aggregate Functions
- Insert, Update, Delete
- Joins
- Creating Tables
- LIKE & Wildcards
- DISTINCT & LIMIT
- Handling NULL
- Subqueries
- UNION
- Constraints & Keys
- Views
Note: each example starts from a fresh, isolated database, so feel free to experiment — including with
INSERT, UPDATE, and DELETE — nothing you do here can break anything.