Loading...
Senior to Junior Ratio
A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.
- Domain
- SQL
- Difficulty
- medium
- Seniority
- mid
Problem
For each department, compute the ratio of senior employees (fiscal year before 2021) to junior employees (fiscal year 2026 or later). Show the department, senior count, junior count, and the ratio.
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.