Department Snapshot
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- L3
Problem
The HR analytics team is building a department performance summary for the all-hands. For each department, show the lowest recorded metric, the highest, the average, and the spread between the two extremes. Rows with a missing metric has no value on file should be left out of all calculations. Only include departments that have contributed more than five valid readings , a smaller sample isn't reliable enough to surface. Order results from the widest performance spread to the narrowest.
Summary
Who is underperforming and who is excelling?
Practice This Problem
Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a real database and grades it automatically.