Learn SQL from scratch with hands-on, interactive tutorials. Master SELECT queries, JOINs, aggregates, subqueries, indexes, and transactions — write and run real SQL in your browser. Free beginner lessons included.
What SQL is, how databases work, and your first SELECT query.
Filter rows with WHERE conditions, comparison operators, LIKE, IN, and BETWEEN.
Sort query results with ORDER BY and retrieve top N rows with LIMIT and OFFSET.
COUNT, SUM, AVG, MIN, MAX — summarize groups of rows into single values.
Combine data from multiple tables with INNER JOIN, LEFT JOIN, and RIGHT JOIN.
Modify data in your database — add rows, change values, and remove records safely.
Use the result of one SELECT query inside another — in WHERE, FROM, and SELECT clauses.
Write cleaner, readable queries with WITH clauses — reusable named subqueries.