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, Graphs, and Stats
00:00
5 left

SQL, Graphs, and Stats

MediumSQL · PostgreSQL

Problem

Tell me about a time you used SQL, graphs, and basic statistics to answer a business question at Booking.

Use the provided Booking search and booking data to demonstrate the SQL portion of your answer. Produce analysis-ready metrics that could support a chart and a concise business interpretation.

Output

  1. One row per month and acquisition channel
  2. Include month, channel, searches, converted_searches, conversion_rate, avg_revenue_per_search, and revenue_stddev
  3. Include channels with no bookings, sort by month ascending and channel ascending, with NULL channels last

Schema

booking_searches
ColumnTypeDescription
search_idPKINTUnique search event identifier
searched_atTIMESTAMPTimestamp when the search occurred
channelVARCHAR(50)Acquisition channel associated with the search
bookings
ColumnTypeDescription
booking_idPKINTUnique booking identifier
search_idINTSearch that led to the booking
booking_amountNUMERIC(10,2)Booking revenue amount
Tablesbooking_searchesbookings
Interviewer

Your question is SQL, Graphs, and Stats. 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.