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 Joins for Pricing Dashboard
00:00
5 left

SQL Joins for Pricing Dashboard

HardSQL · PostgreSQL

Problem

How would you design a SQL query with multiple joins to build a carrier pricing dashboard at Uber Freight?

Write a PostgreSQL query that summarizes valid carrier quotes for delivered loads during Q1 2025. Include fuel adjustments when available, carrier acceptance rates, monthly lane-level price rankings, and each carrier's prior monthly adjusted average where applicable.

Output

  1. One row per carrier, lane, and pickup month with valid quotes.
  2. Columns: carrier_name, origin, destination, pricing_month, quote_count, accepted_quote_count, acceptance_rate, average_adjusted_rate, price_rank, prior_month_average_adjusted_rate.
  3. Order by lane, month, rank, and carrier name.

Schema

carriers
ColumnTypeDescription
carrier_idPKINTUnique carrier identifier
carrier_nameVARCHAR(100)Carrier display name
is_activeBOOLEANWhether the carrier is active
lanes
ColumnTypeDescription
lane_idPKINTUnique freight lane identifier
originVARCHAR(80)Origin market
destinationVARCHAR(80)Destination market
loads
ColumnTypeDescription
load_idPKINTUnique load identifier
lane_idINTReferenced freight lane
pickup_dateDATEScheduled pickup date
load_statusVARCHAR(20)Operational load status
pricing_quotes
ColumnTypeDescription
quote_idPKINTUnique quote identifier
load_idINTReferenced load
carrier_idINTQuoted carrier
quoted_rateNUMERIC(12,2)Carrier quoted linehaul rate
quote_statusVARCHAR(20)Quote decision status
fuel_surcharges
ColumnTypeDescription
effective_monthPKDATEFirst day of effective month
surcharge_pctNUMERIC(6,4)Fuel surcharge as a decimal percentage
Tablescarrierslanesloadspricing_quotesfuel_surcharges
Interviewer

Your question is SQL Joins for Pricing Dashboard. Start with the requirements and the five 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.