Multi-Category Buyers
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L4
Problem
The recommendations team is building a cross-category shopper segment. Ignoring products with no category on file, find users whose purchases span more than one product category. Return each qualifying username and how many categories they've bought from.
Summary
One-category shoppers are boring.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.