Practice
SQL Practice
BasicHands-on SQL lessons - write real queries against a live in-browser database and get checked instantly. No setup, no account.
SQL Practice
Thirteen short, hands-on SQL lessons, from a single SELECT all the way past
joins into subqueries, window functions, messy real-world data, and
transactions. Each lesson gives you a task, a live database, and a Run
button - you write the query, run it, and get checked instantly. Everything
runs in your browser.
Start with lesson 1. You can leave and come back any time - your code is saved locally.
Lessons
- Select specific columns
- Filter rows with WHERE
- Sort and limit results
- Count and summarize
- Group rows together
- Filter groups with HAVING
- Combine tables with JOIN
- Capstone: total spent per customer
- Subqueries: a query inside a query
- Rank rows with a window function
- Messy data: NULLs and duplicate names
- Transactions: all or nothing
- Capstone: rank customers, gaps included