Above Category Average
A easy SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- easy
- Seniority
- L5
Problem
The merchandising team wants to identify outperforming products ahead of the quarterly review. Find every product whose average transaction amount runs higher than the overall average transaction amount within its own category. Return the product name, its average transaction amount, and the category's average transaction amount.
Summary
The category average is one thing. These beat it.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.