Loading...

Median Household Earnings

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

Domain
SQL
Difficulty
hard

Problem

Per team_name, compute AVG(amount) as team average. Also rank rows within each team by amount descending with a no-gaps rank. Return team_name and amount for rows whose amount is strictly greater than their team's average AND whose rank is strictly greater than 3.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.