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
Modeling Drone Lifecycle Data
00:00
5 left

Modeling Drone Lifecycle Data

HardSQL · PostgreSQL

Problem

How would you design a relational data model to track the lifecycle of an autonomous drone at Anduril from manufacturing, through testing, to active deployment?

Write a PostgreSQL query against the model below that identifies drones manufactured, fully tested with passing results, and currently active at their latest deployment. Ignore deployments with a NULL active_since value.

Output

  1. One row per qualifying drone with drone_id, serial_number, model, manufactured_at, latest_test_at, passed_tests, deployment_site, active_since, and days_to_active_deployment.
  2. Include only drones with manufacturing records, at least one test, all tests passing, and a valid active deployment.
  3. Order by active_since ascending, then drone_id ascending.

Schema

drones
ColumnTypeDescription
drone_idPKINTUnique drone identifier
serial_numberVARCHAR(30)Manufacturing serial number
modelVARCHAR(50)Drone model name
lifecycle_events
ColumnTypeDescription
event_idPKINTUnique lifecycle event identifier
drone_idINTReferenced drone
event_typeVARCHAR(30)Lifecycle event category
event_timestampTIMESTAMPTime the event occurred
test_runs
ColumnTypeDescription
test_run_idPKINTUnique test run identifier
drone_idINTTested drone
test_typeVARCHAR(40)Type of test performed
completed_atTIMESTAMPTest completion timestamp
resultVARCHAR(20)Test result
deployments
ColumnTypeDescription
deployment_idPKINTUnique deployment identifier
drone_idINTDeployed drone
deployment_statusVARCHAR(20)Deployment status
site_nameVARCHAR(60)Deployment site
active_sinceDATEDate the deployment became active
Tablesdroneslifecycle_eventstest_runsdeployments
Interviewer

Your question is Modeling Drone Lifecycle Data. Start with the requirements and the four 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.