Skip to main content
All Problems
medium0% acceptance

Total Revenue Per Customer with Name

Calculate the total revenue generated by each customer. Join orders with customers to show the customer's full name (first_name || ' ' || last_name), their total number of orders, and their total spending. Only include customers who have spent more than 500 in total. Sort by total spending 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