How to Identify Employees with the Highest Number of Overtime Hours in SQL


This query identifies employees who have worked the highest number of overtime hours.

Build SQL Database Dashboards & Alerts
SELECT
employee_id,
employee_name,
SUM(overtime_hours) AS total_overtime
FROM
timesheets
GROUP BY
employee_id,
employee_name
ORDER BY
total_overtime DESC
LIMIT
5;

Run this SQL Query

Use-case: An HR manager wants to recognize and reward employees who frequently work overtime.




Ready to build Dashboards
and set Alerts?

This website uses cookies to ensure you get the best experience.