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 Warehouse Performance Analysis
00:00
5 left

SQL Warehouse Performance Analysis

MediumSQL · PostgreSQL

Problem

Write a SQL query to analyze warehouse performance by site, shift, and day, including throughput, accuracy, and labor cost per unit.

Use the supplied warehouse, shift performance, and labor tables. Include valid warehouse-site records across all available dates.

Output

  1. One row per site, shift, and work date.
  2. Columns: site_code, work_date, shift_name, throughput_units, accuracy_percentage, and labor_cost_per_unit.
  3. Sort by site_code, work_date, and shift_name ascending. Return NULL when a metric cannot be calculated.

Schema

warehouse_sites
ColumnTypeDescription
site_idPKINTUnique warehouse identifier
site_codeVARCHAR(10)Operational warehouse code
site_nameVARCHAR(100)Warehouse name
shift_performance
ColumnTypeDescription
performance_idPKINTUnique performance record identifier
site_idINTWarehouse identifier
shift_nameVARCHAR(20)Operational shift name
work_dateDATEDate of the shift
units_processedINTUnits processed during the shift
units_accurateINTUnits processed accurately
labor_entries
ColumnTypeDescription
labor_entry_idPKINTUnique labor entry identifier
site_idINTWarehouse identifier
shift_nameVARCHAR(20)Operational shift name
work_dateDATEDate of the labor entry
labor_hoursNUMERIC(8,2)Paid labor hours
hourly_rateNUMERIC(8,2)Hourly labor rate
Tableswarehouse_sitesshift_performancelabor_entries
Interviewer

Your question is SQL Warehouse Performance Analysis. 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.