Loading...

Best-Selling Reps Each Month

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

Domain
SQL
Difficulty
easy
Seniority
mid, senior

Problem

The sales team is identifying top buyers within each product category for January. Within each category, find the 3 highest-spending users by total transaction amount. If users tie, they share the same position and all should be included. Show the user ID, total amount, category, and transaction date.

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.