Practice

SQL Practice

Basic

Hands-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

  1. Select specific columns
  2. Filter rows with WHERE
  3. Sort and limit results
  4. Count and summarize
  5. Group rows together
  6. Filter groups with HAVING
  7. Combine tables with JOIN
  8. Capstone: total spent per customer
  9. Subqueries: a query inside a query
  10. Rank rows with a window function
  11. Messy data: NULLs and duplicate names
  12. Transactions: all or nothing
  13. Capstone: rank customers, gaps included