Gaps and Islands: Consecutive Order Days

hard
Unit 23 · Window Functions 110/0 to milestone

Find runs of consecutive calendar days with at least one order (an "island"). Return start_date, end_date and days (the length of the run) for each run, sorted by start_date.

Pro problem

Unlock this and every premium problem across all tracks — plus hidden-test grading, advanced AI engineering modules and new content every week.

Start 7-day free trial
query.sql · SQLite
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Gaps and Islands: Consecutive Order Days · TechGradify