SQL
from Scratch
Learn
SQLite
DuckDB
PostgreSQL
Start Learning
09 Problem Solving
Chapter 09
Problem Solving
Reusable patterns for the questions that show up again and again.
26
Top N
27
Top N per group
28
The second highest salary
29
Duplicate detection
30
Missing records
31
Consecutive dates
32
Conditional aggregation
33
Anti-joins and existence checks