Revenue After a Customer's First Month

medium
Unit 20 · Cohorts & Recursive CTEs0/1 to milestone

For each customer with orders, return name, total_spend and later_spend: spend on orders placed in any month after their first order's month (0 if none). Sort by later_spend descending, then name.

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
Revenue After a Customer's First Month · TechGradify