Find Zoho Desk Tickets Breaching First Response SLA

Last updated: November 29, 2026

Quick Overview

Given a tickets table and a per-organization SLA policy table keyed by priority, write SQL that lists every ticket that breached its first-response target, including tickets still waiting for a first reply, and then the breach rate per organization for the last 30 days.

Zoho
Data Manipulation (SQL/Python)
Data Engineer
Zoho
November 29, 2026
Data Engineer
Technical Screen
Data Manipulation (SQL/Python)
Easy

0

0

0 solved


Given a tickets table and a per-organization SLA policy table keyed by priority, write SQL that lists every ticket that breached its first-response target, including tickets still waiting for a first reply, and then the breach rate per organization for the last 30 days.

SLA tracking is central to Zoho Desk, where support managers see breach counts on dashboards and escalations fire off them. The interviewer checks join correctness, handling of NULL first responses and interval arithmetic.

What the Interviewer Expects
  • Join each ticket to the SLA row for its org and priority
  • Treat a NULL first response as breached once the deadline has passed
  • Compute the deadline with interval arithmetic, not string math
  • Aggregate a breach rate with a correct denominator
  • Call out business-hours SLAs as a complication
Key Topics to Cover
Joins
NULL handling
Date arithmetic
Aggregation
How to Approach This
  1. Clarify the schema and expected output format before writing queries.
  2. Use CTEs (WITH clauses) to break complex queries into readable steps.
  3. Consider window functions (ROW_NUMBER, RANK, LAG, LEAD) for ranking and sequential analysis.
  4. Watch for NULLs, duplicates, and edge cases in JOINs and GROUP BY.
  5. For pandas, prefer vectorized operations over row-by-row iteration.
Possible Follow-up Questions
  • How would you handle SLAs that count only business hours?
  • What if a ticket's priority changes after creation?
  • How would you make this incremental for a dashboard that refreshes every minute?
  • How would you handle tickets with no matching policy?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice SQL Problems
Sample Answer
Clarify the Data

tickets(ticket_id, org_id, priority, created_at, first_response_at) where first_response_at is NULL until an agent replies. sla_policies(org_id, priority, first_response_minutes). Times are UTC....

Approach

Deadline = created_at + first_response_minutes * interval '1 minute'. A ticket breaches if it replied after the deadline, or has not replied and now is past the deadline. Tickets not yet due and not...


Submit Your Answer
Markdown supported

Related Questions