Do you have SQL experience?
Using the supplied tables, write a query that summarizes approved employee hours during the first quarter of 2025. Include departments even when they have no active employees or qualifying time entries.
Output
- One row per department with
department_name, approved_employee_count, total_approved_hours, and workload_status.
- Include all departments, order by
total_approved_hours descending, then department_name ascending.
Output details
- Group results by department identity, so distinct departments sharing a
department_name appear as separate rows.
- Count each active employee with qualifying approved timesheets, even when their summed hours equal
0.
- Treat missing summed hours as numeric
0 for total_approved_hours and workload classification.
- Classify totals of
0 as No approved hours, totals greater than 80 as Overtime, and all others as Standard.