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
Schema for Simulation Datasets
00:00
5 left

Schema for Simulation Datasets

HardSQL · PostgreSQL

Problem

How would you design a schema for a new simulation dataset that needs to be queried by multiple ML teams at Waymo?

Define a normalized PostgreSQL schema for teams, datasets, simulation runs, and team access. Then write a query that returns the latest completed run for every team and dataset access record, while retaining accessible datasets with no completed run.

Output

  1. One row per team and accessible dataset.
  2. Columns: team_name, dataset_name, access_level, latest_run_id, latest_completed_at, and scenarios_simulated.
  3. Include datasets without a completed run with NULL run fields. Order by team_name, then dataset_name.

Schema

ml_teams
ColumnTypeDescription
team_idPKINTUnique ML team identifier
team_nameVARCHAR(100)ML team name
simulation_datasets
ColumnTypeDescription
dataset_idPKINTUnique simulation dataset identifier
dataset_nameVARCHAR(150)Human-readable dataset name
owner_team_idINTTeam responsible for the dataset
modalityVARCHAR(50)Primary simulated sensor or data modality
created_atTIMESTAMPTZDataset creation timestamp
simulation_runs
ColumnTypeDescription
run_idPKINTUnique simulation run identifier
dataset_idINTDataset produced by the run
run_statusVARCHAR(20)Run lifecycle status
started_atTIMESTAMPTZRun start timestamp
completed_atTIMESTAMPTZRun completion timestamp
scenarios_simulatedINTNumber of scenarios produced by the run
dataset_team_access
ColumnTypeDescription
dataset_idPKINTAccessible dataset identifier
team_idPKINTTeam granted access
access_levelVARCHAR(20)Permission level granted to the team
granted_atTIMESTAMPTZAccess grant timestamp
Tablesml_teamssimulation_datasetssimulation_runsdataset_team_access
Interviewer

Your question is Schema for Simulation Datasets. 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.