First Among Many
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant feedback.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L4
Problem
We group users by account status, and every segment leans toward one product category more than the rest. For each status, surface the category with the most purchases, where a purchase is a single transaction regardless of how many units it moved.
Summary
Each segment has a favorite category.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and checks it automatically.