SELECT student, AVG(score) AS average
FROM assignments
WHERE submitted_at IS NOT NULL
GROUP BY student
HAVING AVG(score) >= 90
ORDER BY average DESC;Learn SQL.
Six chapters covering relational thinking, querying, aggregation, joins, data design, transactions, CTEs, windows, views, and performance.
SQL curriculum
Ask precise questions of structured data and design reliable databases.
Relational Data & SELECT
Understand tables, rows, columns, keys, and types, then retrieve and shape data with clear SELECT statements.
Open chapter โSQL02Filtering, Sorting & NULL
Return exactly the rows you need using predicates, ranges, pattern matching, NULL rules, ordering, and limited results.
Open chapter โSQL03Aggregation, GROUP BY & CASE
Summarize many rows into useful measures using aggregate functions, groups, group filters, conditional logic, and careful treatment of NULL.
Open chapter โSQL04Joins & Multi-Table Questions
Connect related tables with reliable join conditions, preserve unmatched rows when needed, model many-to-many relationships, and use subqueries deliberately.
Open chapter โSQL05Changing Data & Database Design
Insert, update, and delete safely; enforce integrity with constraints; normalize designs; and group related changes into transactions.
Open chapter โSQL06CTEs, Windows, Views & Performance
Write readable analytical queries with common table expressions and window functions, package logic in views, and reason about indexes and execution plans.
Open chapter โ