Skip to main content
All Problems
easy0% acceptance

Top 10 Spending Customers

Find the top 10 customers by total spending. Return their first name, last name, and total amount spent (sum of order total_amount), sorted by total spent descending. Only include non-cancelled orders.

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