0/8 core exercises
SQL correctness
Build reliable grain, joins, windows, deduplication, change detection, and late-data reasoning.
Top salary bands per department
Partitioned ranking and tie handling
Beginner · 20 min
Daily revenue running total
Aggregate before applying a window
Beginner · 18 min
Month-over-month revenue change
Time-grain aggregation and LAG
Beginner · 20 min
Detect duplicate business keys
Unlock Premium to open this exercise.
Sessionize events by inactivity gap
Unlock Premium to open this exercise.
Keep the latest row per business key
Unlock Premium to open this exercise.
Detect SCD Type 2 changes
Unlock Premium to open this exercise.
Find late facts in the wrong partition
Unlock Premium to open this exercise.
Ready to move on when you can
- Return the correct business grain without duplicates
- Handle ties, NULLs, and deterministic row selection
- Explain why the query stays correct on edge cases