Loading...

Top Spender

A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
medium

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.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.