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 Planned vs Actual Delivery
00:00
5 left

SQL for Planned vs Actual Delivery

MediumSQL · PostgreSQL

Problem

Write a SQL query to track Nintendo of America retail rollout performance by location, comparing planned versus actual delivery dates and summarizing delays by region.

Use the provided location and delivery data. Include locations without a completed delivery, and treat missing planned or actual dates explicitly.

Output

  1. One row per rollout location, including location name and region.
  2. Columns: planned_delivery_date, actual_delivery_date, delay_days, delivery_status, region_avg_delay_days, and delayed_location_count.
  3. Include all locations, order by region, then location_name.

Schema

rollout_locations
ColumnTypeDescription
location_idPKINTUnique retail rollout location identifier
location_nameVARCHAR(100)Retail location name
regionVARCHAR(50)Nintendo of America operating region
rollout_deliveries
ColumnTypeDescription
delivery_idPKINTUnique delivery record identifier
location_idINTReferenced rollout location
planned_dateDATEScheduled delivery date
actual_dateDATEActual completed delivery date
Tablesrollout_locationsrollout_deliveries
Interviewer

Your question is SQL for Planned vs Actual Delivery. Start with the requirements and the two 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.