Routine~11min

The Impossible Shift

Payroll flagged an issue in the shift records — some employees are being paid for shifts where the end time is before the start time, but they're not marked as overnight. A scheduling tool migration dropped the overnight flag on some records. Find the impossible shifts (end ≤ start, not overnight).

Tables you'll query

employeesshifts

What you'll learn

SELECT & FilteringDate & Time Functions
Investigate this case →