Median Household Earnings
A hard SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- hard
- Seniority
- L5
Problem
Finance is auditing outlier allocations within each team. For every team, identify allocations that are both above the team's own average and outside the team's top three by amount (rank by amount, biggest first, no skipped ranks). Return the team name and amount for each such allocation.
Summary
Household earnings. The median reveals the middle.
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.