Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
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 feedbackCoaching1:1 coaching with people at your target companiesSuccess 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 Operational Bottlenecks
00:00
5 left

SQL for Operational Bottlenecks

MediumSQL · PostgreSQL

Problem

Write a SQL query to identify the top 5 operational bottlenecks by region using orders, SLA breaches, and support tickets. Treat each SLA breach and support ticket as one issue, and calculate a bottleneck score as their combined count. Include regions with orders even when they have no breaches or tickets.

Output

  1. One row per region, limited to the five highest scores
  2. Columns: region, order_count, sla_breach_count, support_ticket_count, bottleneck_score
  3. Sort by bottleneck_score descending, then region ascending to break ties

Schema

orders
ColumnTypeDescription
order_idPKINTUnique order identifier
regionVARCHAR(50)Operational region handling the order
order_dateDATEDate the order was placed
customer_referenceVARCHAR(50)Customer reference associated with the order
sla_breaches
ColumnTypeDescription
breach_idPKINTUnique SLA breach identifier
order_idINTOrder associated with the breach
breach_dateDATEDate the SLA breach was recorded
severityVARCHAR(20)Severity classification of the breach
support_tickets
ColumnTypeDescription
ticket_idPKINTUnique support ticket identifier
order_idINTOrder associated with the ticket
created_dateDATEDate the ticket was created
statusVARCHAR(20)Current ticket status
Tablesorderssla_breachessupport_tickets
Interviewer

Your question is SQL for Operational Bottlenecks. 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.