DETECTIVE LAB

Use the steps below to investigate the missing laptop.

Step 2: Identify who entered the room

Next, we check badge logs to see who accessed the IT Storage Room during the incident window.

SQL Query

SELECT 
    e.first_name,
    e.last_name,
    b.action,
    b.log_time
FROM badge_logs b
JOIN employees e ON b.employee_id = e.employee_id
JOIN locations l ON b.location_id = l.location_id
WHERE l.location_name = 'IT Storage Room'
  AND b.log_time BETWEEN '2026-03-18 13:00:00' AND '2026-03-18 15:00:00'
ORDER BY b.log_time;

Results

[
  {
    "first_name": "Sarah",
    "last_name": "Chen",
    "action": "IN",
    "log_time": "2026-03-18T19:10:00.000Z"
  },
  {
    "first_name": "Sarah",
    "last_name": "Chen",
    "action": "OUT",
    "log_time": "2026-03-18T19:25:00.000Z"
  },
  {
    "first_name": "Jason",
    "last_name": "Miller",
    "action": "IN",
    "log_time": "2026-03-18T20:00:00.000Z"
  },
  {
    "first_name": "Jason",
    "last_name": "Miller",
    "action": "OUT",
    "log_time": "2026-03-18T20:20:00.000Z"
  }
]

Explanation

Only Sarah Chen and Jason Miller entered the room during the incident window, making them persons of interest.