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
Showroom Performance SQL Analysis
00:00
5 left

Showroom Performance SQL Analysis

HardSQL · PostgreSQL

Problem

Write a SQL query to analyze Peloton interactive showroom performance by location, including revenue, conversion rate, and week-over-week trends.

Use the provided showroom, visit, and order data. Include every showroom for every week between the earliest and latest visit week, including weeks with no visits or orders.

Output

  1. One row per showroom and week, ordered by showroom name and week.
  2. Columns: showroom_name, week_start, visit_count, completed_order_count, revenue, conversion_rate, and revenue_wow_change.
  3. Conversion rate is completed orders divided by visits. The first week per showroom should have a NULL week-over-week change.

Schema

showrooms
ColumnTypeDescription
showroom_idPKINTUnique showroom identifier
showroom_nameVARCHAR(100)Peloton showroom name
cityVARCHAR(100)Showroom city
showroom_visits
ColumnTypeDescription
visit_idPKINTUnique showroom visit identifier
showroom_idINTShowroom visited
visit_started_atTIMESTAMPVisit start timestamp
visit_statusVARCHAR(30)Visit lifecycle status
showroom_orders
ColumnTypeDescription
order_idPKINTUnique order identifier
visit_idINTVisit associated with the order
order_statusVARCHAR(30)Order lifecycle status
order_totalNUMERIC(12,2)Order revenue in dollars
Tablesshowroomsshowroom_visitsshowroom_orders
Interviewer

Your question is Showroom Performance SQL Analysis. 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.