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

HardSQL · PostgreSQL

Problem

Write a SQL query to analyze operational performance by joining incident, workflow, and KPI tables to identify the highest-impact bottlenecks.

Use the provided tables to evaluate monthly workflow impact and return only the three highest-impact workflows for each month.

Output

  1. One row per workflow and month, with workflow_id, workflow_name, period_start, incident_count, total_downtime_minutes, avg_severity, sla_gap_pct, throughput_gap_pct, impact_score, previous_month_score, and impact_rank.
  2. Include only the top three workflows per month, ordered by period_start, impact_rank, and workflow_id.

Schema

workflows
ColumnTypeDescription
workflow_idPKINTUnique workflow identifier
workflow_nameVARCHAR(100)Operational workflow name
operational_areaVARCHAR(80)Area responsible for the workflow
incidents
ColumnTypeDescription
incident_idPKINTUnique incident identifier
workflow_idINTAffected workflow
incident_tsTIMESTAMPIncident occurrence timestamp
severityINTIncident severity from 1 to 5
downtime_minutesINTOperational downtime attributed to the incident
statusVARCHAR(20)Incident lifecycle status
kpis
ColumnTypeDescription
kpi_idPKINTUnique KPI record identifier
workflow_idINTMeasured workflow
period_startDATEFirst day of the KPI month
target_sla_pctDECIMAL(5,2)Monthly SLA target percentage
actual_sla_pctDECIMAL(5,2)Monthly achieved SLA percentage
target_throughputINTMonthly throughput target
actual_throughputINTMonthly achieved throughput
Tablesincidentsworkflowskpis
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.