Back to Practice
#0391
SLA Breached Tickets
EasySQL15 min10 XP
Problem
Return ticket_id values where first_response_minutes is greater than sla_minutes.
Why This Matters
SQL interviews usually test whether you can turn a business question into the right rows, grouping level, join type, and edge-case behavior.
Schema
tickets(ticket_id INTEGER, first_response_minutes INTEGER, sla_minutes INTEGER)
Examples
Example 1
Inputticket 2 responded after SLA
Outputticket 2
Equal to the SLA is not a breach in this prompt.
Constraints
- Return only the requested columns.
- Use deterministic ORDER BY when multiple rows are returned.
- Assume SQLite-compatible SQL unless the prompt states otherwise.
CodeSQL
Visible browser tests run here when available.
Testcases1 visible / 3 hidden categories
Core SQL case
Inputticket 2 responded after SLA
Expected[[2]]
Equal to the SLA is not a breach in this prompt.
Hidden Test Categories
Empty or missing matchesDuplicate rows or tiesNULL values where the pattern commonly breaks