New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
Marketing keeps asking for the top spenders, then the middle group, then everyone else, as three separate lists.
What you'll have at the end
One column labelling every customer 1 through 10 by spend, ready to filter for any group marketing wants
You need
An orders table with a customer id, an order date, and an order amount on each row, covering however far back the campaign should count spending.
Not covered
Scoring customers on how recently or how often they buy alongside spend; this recipe ranks by one number, total spend, and nothing else.
Best sellers by category, ranked without a manual count
go there when the ask is ranking products inside a category, not bucketing every customer into equal-sized spending groups
Flag lapsed customers who've gone quiet
go there when marketing's real question is which customers stopped buying, not how much every customer has spent
Checked 26 Aug 2026
Part of the SQL for Data Analysis cookbook