Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
SQL for SLA Breach Drivers
00:00
5 left

SQL for SLA Breach Drivers

HardSQL · PostgreSQL

Problem

Write a SQL query to track weekly operational performance by region at Binance, joining orders, support tickets, and refunds to identify the top drivers of SLA breaches.

Count a breach when the relevant completion or response timestamp is later than its SLA due timestamp. Use each table's operational timestamp to assign its week; unmatched support tickets and refunds should not contribute to a region.

Output

  1. One row per region and week, with week_start, operational volumes, breach counts, total_sla_breaches, top_driver, prior_week_breaches, and breach_change_pct.
  2. Include regions and weeks represented by any matched operational record. Order by region, then week_start.

Schema

orders
ColumnTypeDescription
order_idPKINTUnique Binance order identifier
regionVARCHAR(20)Operational region
created_atTIMESTAMPOrder creation timestamp
sla_due_atTIMESTAMPOrder fulfillment SLA deadline
fulfilled_atTIMESTAMPActual fulfillment timestamp
support_tickets
ColumnTypeDescription
ticket_idPKINTUnique support ticket identifier
order_idINTRelated order identifier
opened_atTIMESTAMPTicket opening timestamp
response_due_atTIMESTAMPFirst-response SLA deadline
first_response_atTIMESTAMPActual first-response timestamp
refunds
ColumnTypeDescription
refund_idPKINTUnique refund identifier
order_idINTRelated order identifier
requested_atTIMESTAMPRefund request timestamp
refund_due_atTIMESTAMPRefund processing SLA deadline
processed_atTIMESTAMPActual refund processing timestamp
Tablesorderssupport_ticketsrefunds
Interviewer

Your question is SQL for SLA Breach Drivers. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.