Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Warehouse Performance SQL Analysis
00:00
5 left

Warehouse Performance SQL 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 provided warehouse, shift, and operation data. Include only valid site and shift combinations with positive processed units.

Output

  1. One row per site, shift, and operation date.
  2. Columns: site_name, shift_name, operation_date, throughput, accuracy_pct, and labor_cost_per_unit.
  3. Sort by site name, operation date, and shift name.

Schema

warehouse_sites
ColumnTypeDescription
site_idPKINTUnique warehouse site identifier
site_nameVARCHAR(100)Warehouse site name
warehouse_shifts
ColumnTypeDescription
shift_idPKINTUnique shift identifier
shift_nameVARCHAR(50)Shift label
warehouse_operations
ColumnTypeDescription
operation_idPKINTUnique operation record identifier
site_idINTWarehouse site identifier
shift_idINTShift identifier
operation_dateDATEDate of the operation
units_processedINTUnits processed during the operation
accurate_unitsINTUnits processed accurately
labor_costDECIMAL(12,2)Labor cost for the operation
Tableswarehouse_siteswarehouse_shiftswarehouse_operations
Interviewer

Your question is Warehouse Performance SQL 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
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.