Loading...

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
senior

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.

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.