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
Star vs Snowflake for Uber Data
00:00
5 left

Star vs Snowflake for Uber Data

MediumSQL · PostgreSQL

Problem

Explain the differences between star schema and snowflake schema; when would you choose one over the other for Uber-scale data?

Using the provided Uber trip and location tables, produce the requested aggregate as a concrete SQL example. Keep the explanation focused on dimensional modeling, query behavior, and scale-related trade-offs.

Output

  1. One row per city, with city_name, region_name, completed_trips, and gross_bookings
  2. Include completed trips requested from 2025-01-01 through 2025-01-31
  3. Sort by gross_bookings descending, then city_name ascending

Schema

trips
ColumnTypeDescription
trip_idPKINTUnique trip identifier
zone_idINTPickup zone identifier
statusVARCHAR(20)Trip lifecycle status
requested_atDATETrip request date
fare_amountNUMERIC(10,2)Trip fare before adjustments
zones
ColumnTypeDescription
zone_idPKINTUnique pickup zone identifier
zone_nameVARCHAR(80)Pickup zone name
city_idINTParent city identifier
cities
ColumnTypeDescription
city_idPKINTUnique city identifier
city_nameVARCHAR(80)City name
region_nameVARCHAR(80)Operating region name
Tablestripszonescities
Interviewer

Your question is Star vs Snowflake for Uber Data. 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
Sign up free to run your codeLog inLn 1
Run your query to see results here.