Learn SQL with SQLite: query, filter, sort, summarise and join tables, then change data and build a small report.
8 lessons, 16 exercises. Runs SQL SQLite 3.
Not started
SELECT basics
Ask a table for data with SELECT, choose and rename columns, and compute new values.
Filtering with WHERE
Keep only the rows you want with WHERE, comparisons, AND/OR/NOT, BETWEEN, IN, LIKE and IS NULL.
Sorting and limiting
Put rows in a reliable order with ORDER BY, keep the first few with LIMIT and OFFSET, and drop duplicates with DISTINCT.
Aggregates
Summarise many rows into one answer with count, sum, avg, min and max.
GROUP BY and HAVING
Split rows into groups, get one summary row per group with GROUP BY, and filter the groups with HAVING.
Joining tables
Combine rows from two tables with INNER JOIN and LEFT JOIN, using table aliases to keep queries short.
Changing data
Add rows with INSERT, change them with UPDATE and remove them with DELETE, always aiming with WHERE.
Subqueries and a small report
Use a query inside another query, label values with CASE, and combine everything into a small report.
Your progress is saved in this browser. Sign in to keep it on every device.