Cumulative Customer Count by Month

hard
Unit 23 · Window Functions 110/0 to milestone

How many customers had placed their first order by the end of each month? For every month that has any orders, return month (YYYY-MM) and cumulative_customers: the number of distinct customers whose first order was in that month or earlier. Sort by month.

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
Cumulative Customer Count by Month · TechGradify