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 for Launch Performance
00:00
5 left

SQL for Launch Performance

MediumSQL · PostgreSQL

Problem

Write a SQL query to analyze launch performance by region and week, joining content launch data with subscription and engagement tables to identify the top-performing markets.

Use the seven-day period beginning on each content launch date and treat Monday as the first day of the launch week. Return only markets whose weekly performance rank is at most 2, including ties.

Output

  1. One row per qualifying launch week and region.
  2. Columns: week_start, region, launched_titles, subscribed_viewers, engagement_hours, and market_rank.
  3. Sort by week_start, market_rank, then region.

Schema

content_launches
ColumnTypeDescription
content_idPKINTUnique identifier for launched content
regionVARCHAR(20)Market where the content launched
launch_dateDATEContent launch date in the region
subscriptions
ColumnTypeDescription
user_idPKINTUnique subscriber identifier
regionVARCHAR(20)Subscriber market
subscription_dateDATEDate the subscription began
planVARCHAR(20)Disney+ subscription plan
engagement
ColumnTypeDescription
engagement_idPKINTUnique engagement event identifier
user_idINTSubscriber associated with the event
content_idINTContent associated with the event
engagement_dateDATEDate of engagement
engagement_minutesINTMinutes watched or otherwise engaged
Tablescontent_launchessubscriptionsengagement
Interviewer

Your question is SQL for Launch Performance. 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.