Top Spender
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Problem
The VIP team wants customers whose lifetime spending outstrips the price of the single most expensive product. Join users to transactions, sum spending per user, and keep only those whose total exceeds the maximum product price. Return the username and their total spend.
Summary
When your spending exceeds the priciest item on the shelf.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.