SQL: ask questions of data
The language behind almost every app. Query a real SQLite database in your browser, from SELECT to joins, grouping and window functions.
Start the track- Your first query BeginnerAsk a database for data with SELECT and FROM.5 min
- Filtering with WHERE BeginnerKeep only the rows you want with WHERE, AND and OR.7 min
- Sorting and limiting BeginnerPut results in order with ORDER BY and take the top few with LIMIT.6 min
- Counting and totals BeginnerSummarise a whole table with COUNT, SUM, AVG, MIN and MAX.7 min
- Grouping with GROUP BY and HAVING IntermediateGet one summary row per group, and filter the groups themselves.9 min
- Joining tables IntermediateCombine rows from several tables with JOIN, following the ids that link them.10 min
- Joins with totals IntermediateJoin tables and summarise the result to answer real business questions.10 min
- LEFT JOIN and missing data IntermediateKeep rows that have no match, and find what is missing using NULL.9 min
- Subqueries IntermediateUse the result of one query inside another.9 min
- Changing data IntermediateAdd, change and remove rows with INSERT, UPDATE and DELETE.10 min
- Designing tables AdvancedCreate your own tables with column types, keys and constraints that protect your data.12 min
- CTEs and window functions ExpertBreak big queries into named steps with WITH, and rank and run totals with window functions.15 min