Skip to main content
All Problems
hard0% acceptance

Customer Lifetime Value Tiers

Classify customers into lifetime value tiers. First compute each customer's total spend. Then assign: 'Platinum' if spend >= 1000, 'Gold' if >= 500, 'Silver' if >= 100, else 'Bronze'. Return first_name, last_name, total_spend, and tier. Sort by total_spend descending.

Schema

🔑idINT
first_nameTEXT
last_nameTEXT
emailTEXT
phoneTEXTNULL
cityTEXT
stateTEXT
countryTEXT
created_atTIMESTAMP
postgresql

Run your query to see results

Press Ctrl + Enter to execute