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
Identify Supply Chain Bottlenecks by Delay Rate
00:00
5 left

Identify Supply Chain Bottlenecks by Delay Rate

MediumSQL · PostgreSQL

Problem

You are given shipment data across suppliers, warehouses, and deliveries. Write a PostgreSQL query that identifies the supply chain stages with the highest bottleneck risk by comparing planned and actual dates, then aggregating delay rates by stage. Return only stages with at least 3 shipments and a delay rate above 30%, ordered by delay rate descending.

Schema

shipments
ColumnTypeDescription
shipment_idPKINTPrimary key for each shipment
supplier_idINTReferences the supplier that shipped the goods
warehouse_idINTReferences the warehouse handling the shipment
planned_ship_dateDATEPlanned outbound shipment date
actual_ship_dateDATEActual outbound shipment date, if shipped
stageVARCHAR(50)Supply chain stage name
suppliers
ColumnTypeDescription
supplier_idPKINTPrimary key for each supplier
supplier_nameVARCHAR(100)Supplier display name
warehouses
ColumnTypeDescription
warehouse_idPKINTPrimary key for each warehouse
warehouse_nameVARCHAR(100)Warehouse display name
Tablesshipmentssupplierswarehouses
Interviewer

Your question is Identify Supply Chain Bottlenecks by Delay Rate. 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.