For each customer with at least two orders, return customer_id and max_gap_days: the largest number of days between two of their consecutive orders (in date order, ties by id). Sort by max_gap_days descending, then customer_id.
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