Cumulative Distribution of Customer Spend

medium
Unit 15 · Window Functions VIII0/2 to milestone

For each customer with orders, return customer_id, spend (their total) and cume_dist: the fraction of buying customers whose spend is less than or equal to theirs, rounded to 3 decimals. Sort by spend, then customer_id.

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 Distribution of Customer Spend · TechGradify