Loading...
Top Buyers of Premium Products
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- mid
Problem
Rank all products by rating, keeping only those with a known rating, and take the top 10 tier. Then find every user who purchased one of those products and count how many unique purchases each user made from that tier. Show the top 10 users by purchase count.
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.