Loading…
Identify employees whose work shifts overlap with at least 3 Unauthorized Access incidents. An incident overlaps a shift when it was logged in the same lab as the shift (security_logs.lab_id = work_shifts.lab_id) and its timestamp falls between the shift's start_time and end_time (inclusive). Count every overlapping incident across all of the employee's shifts. Return employee_id, name, and overlapping_incidents (the number of overlapping incidents). Sort by overlapping_incidents descending, then employee_id ascending.
Create a free account to save your progress and reveal the worked answer for this free exercise. The complete practice library is available with Practice Pass or Mastery.