Mockbit/#49
SQLeasyJoins~12m

You're an HR analyst at TechCorp

Problem

You're an HR analyst at TechCorp. The company wants to identify all departments that have employees who haven't taken any vacation days in the current year (2024), along with the count of such employees per department. Include only departments that actually have employees with zero vacation days taken. Return the department name and the count of employees with no vacation days, ordered by department name.

Examples

Example 1

Example 2

Constraints
  • Return department_name and employees_with_no_vacation columns
  • Only include departments that have at least one employee with zero vacation days in 2024
  • Count only vacation leave_type, ignore sick days and personal days
  • Order results by department name alphabetically
Reference solution

Reference solution available after you attempt the question.

Ready to solve it?

Start a session on Mockbit #49. Write your SQL, run it against real data, and get graded on correctness, efficiency, query structure, and business understanding.

Related SQL questions
← Back homemockbit.io/q/49
PrivacyTerms© 2026 Mockbit