Measure first response after a ticket reopens Original fictional practice data · 2026-11-11 · CC BY 4.0 BRIEF A support lead needs one first-response measurement per opening episode. A response from an earlier episode cannot satisfy the SLA for a reopened ticket. CONTRACT 1. Join ticket_id AND episode. Only agent replies count, and only replies at or after opening. Timestamps are UTC. 2. SLA is 30 elapsed minutes inclusive; this exercise has no business-hours pause. No eligible response means WAITING. 3. Return ticket_id,episode,response_minutes,sla_status. Round SQLite elapsed minutes to the nearest integer for these exact-minute examples. METHOD Filter customer and bot messages before choosing MIN response timestamp. Group by the composite episode key so reopening starts a separate measurement. Use a LEFT JOIN for unanswered Z3 and keep its duration NULL. COMMON MISTAKE MIN reply per ticket would reuse Z1’s response from the previous day and conceal the reopened episode breach. INDEPENDENT CROSS-CHECK Two episodes meet SLA, one breaches, and one is waiting. Waiting is reported separately from completed response times. DELIVER A checked output CSV and a handoff note explaining the exception policy. Use setup.sql in SQLite or import each table CSV into your spreadsheet. expected.csv is the complete reference result; an empty CSV field represents SQL NULL. The browser executes SQLite, not Excel formulas. XLOOKUP is unavailable in Excel 2016 and 2019. Sources for function behavior: https://www.sqlite.org/lang_select.html and https://support.microsoft.com/en-us/excel/functions/xlookup-function (checked 2026-11-11). Rates, dates and policies here are exercise assumptions.