Getting Correct Answers
Get a correct answer out of a database you did not design.
$58
this phase
- Open1.1
The Relational Model
Free previewTables, rows, keys, and why the order of rows means nothing.
- 1.2
Your First Queries
SELECT, WHERE, ORDER BY, LIMIT, and reading the error message instead of guessing.
- 1.3
Joins and Join Predicates
INNER, LEFT, and the missing ON clause that quietly returns every pair of rows.
- 1.4
Duplicates, Grouping, and Aggregates
Why your COUNT is too high: join fan-out, GROUP BY grain, and DISTINCT as a symptom.
- 1.5
NULL Is Not a Value
Three-valued logic, IS DISTINCT FROM, and why NOT IN with a NULL returns nothing at all.
- 1.6
Subqueries and EXISTS
Scalar and correlated subqueries, EXISTS as the safe rewrite, UNION and EXCEPT.