SQL pattern · P19 · 8 problems

Gaps, islands and streaks

Graded problems on gaps, islands and streaks, from easy to hard.

8 problems · about 1 h 30 min in all
Start with problem 01Flag each login row as consecutive or not · 6 min
Learn it first · P19The streak that secretly counts twiceTwo events on one day inflate an active-day streak unless you fix the grain first.Read the lesson →