Using a CTE named big_spenders that selects user_id and SUM(total_amount) AS total from transactions
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
Problem
Using a CTE named big_spenders that selects user_id and SUM(total_amount) AS total from transactions grouped by user_id with total over 100, return user_id and total from big_spenders ordered by total descending, limit 5.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.