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 Mixed-Frequency Data
00:00
5 left

Modeling Mixed-Frequency Data

HardSQL · PostgreSQL

Problem

How would you model a dataset that requires both high-frequency sensor updates and long-term historical analysis at Waymo?

For this exercise, write a SQL query that summarizes readings during the specified two-day period while retaining vehicles without qualifying readings. The result must also identify the most recent qualifying reading for each vehicle.

Output

  1. One row per vehicle, ordered by vehicle_id ascending.
  2. Columns: vehicle_id, vehicle_name, reading_count, average_speed_mps, maximum_temperature_c, and latest_reading_at.
  3. Include all vehicles, including those with zero qualifying readings. Exclude readings outside the period and readings that do not belong to a listed vehicle.

Schema

vehicles
ColumnTypeDescription
vehicle_idPKINTUnique Waymo vehicle identifier
vehicle_nameVARCHAR(80)Human-readable vehicle label
fleet_statusVARCHAR(30)Current fleet status
sensor_readings
ColumnTypeDescription
reading_idPKBIGINTUnique sensor reading identifier
vehicle_idINTVehicle associated with the reading
recorded_atTIMESTAMPTZUTC timestamp when the reading was recorded
sensor_typeVARCHAR(40)Sensor stream that produced the reading
speed_mpsNUMERIC(8,2)Vehicle speed in meters per second
temperature_cNUMERIC(6,2)Sensor temperature in degrees Celsius
Tablesvehiclessensor_readings
Interviewer

Your question is Modeling Mixed-Frequency Data. 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.