← Support SLA & Evidence Handoff My saved work →
Independent practice · SQLite
Assign one follow-up action per ticket
Practice dataset
Your work
Active 0:00 · Paused 0sKeep a handoff you can replay
Check your current answer, then download the output and its report. The report includes the source, answer and each check so you can review what passed and what needs work.
To replay your work, open this task with the same dataset, import your answer and check it again.
Show the reference answer
WITH cohort AS (SELECT t.*,p.limit_minutes,CASE WHEN t.first_reply_min<=1800 THEN t.first_reply_min ELSE NULL END AS observed_reply FROM tickets t JOIN policies p ON t.priority=p.priority WHERE t.opened_min>=0 AND t.opened_min<1440), checked AS (SELECT c.*,CASE WHEN observed_reply<opened_min THEN 'invalid_time' WHEN COALESCE(observed_reply,1800)-opened_min>limit_minutes THEN 'breached' WHEN observed_reply IS NOT NULL THEN 'met' ELSE 'awaiting' END AS sla_status,(SELECT MIN(e.evidence_id) FROM evidence e WHERE e.ticket_id=c.ticket_id AND e.kind='public_reply' AND e.recorded_min=c.observed_reply AND e.recorded_min>=c.opened_min AND e.recorded_min<=1800) AS evidence_id FROM cohort c) SELECT ticket_id,CASE WHEN sla_status='invalid_time' THEN 'repair timestamps' WHEN sla_status='breached' THEN 'escalate' WHEN observed_reply IS NOT NULL AND evidence_id IS NULL THEN 'attach reply evidence' WHEN owner IS NULL THEN 'assign owner' WHEN sla_status='awaiting' THEN 'watch deadline' ELSE 'ready' END AS follow_up FROM checked ORDER BY ticket_id
Use the first matching action only. Alphabetical or severity guesses do not implement the declared handoff policy.