Level 1 of 13 · about 2 weeks
SQL fundamentals
The core of SQL: filtering and sorting rows, the relational algebra and calculus behind a query, every kind of join, grouping and aggregation, subqueries, set operations, three-valued logic with NULL, and changing data safely.
Modules
Core: everyone needs it. Common: most jobs use it. Specialist: optional depth, safe to skip on a first read.
1
SELECT, WHERE, ORDER BY, LIMIT
the basic shape of a query, filtering rows, sorting them, and reading back only a page at a time
Core 5 parts · about 3 hours
2
Relational algebra
selection, projection, union, set difference, Cartesian product, join and rename, as named operators behind SQL
Common 5 parts · about 3 hours
3
Relational calculus
tuple relational calculus and domain relational calculus, and how describing what you want differs from describing how to get it
Common 5 parts · about 3 hours
4
Joins
inner, left, right, full and cross joins, and what each one does with rows that don't match
Core 5 parts · about 3 hours
5
Aggregate functions and GROUP BY
COUNT, SUM, AVG, grouping rows together, and why HAVING exists separately from WHERE
Core 5 parts · about 3 hours
6
Subqueries
scalar, correlated and nested subqueries, and choosing between IN and EXISTS
Core 5 parts · about 3 hours
7
Set operations
UNION, UNION ALL, INTERSECT and EXCEPT, and the rule every one of them shares
Common 5 parts · about 3 hours
8
NULL and three-valued logic
why comparisons against NULL are neither true nor false, and what that breaks if ignored
Core 5 parts · about 3 hours
9
Modifying data
INSERT, UPDATE and DELETE in depth, and wrapping a multi-step change in a transaction
Core 5 parts · about 3 hours