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
Top Titles by Signup Completion
00:00
5 left

Top Titles by Signup Completion

HardSQL · PostgreSQL

Problem

Netflix wants to identify which titles most effectively drive completed new memberships. Analyze activity from Q2 2025, using only viewers whose recorded event was their first-ever view of that title.

Write a PostgreSQL query to return the top ten titles by new-signup completion rate.

Requirements

  1. Include first-time title viewers whose viewing occurred from 2025-04-01 through 2025-06-30.
  2. Join signup attempts attributed to the same title and viewer, retaining viewers without a signup attempt.
  3. Calculate completion rate as completed signup attempts divided by first-time viewers. Return the top ten titles, ordered by rate descending, then viewer count descending, then title name ascending.

Schema

titles
ColumnTypeDescription
title_idPKINTUnique Netflix title identifier
title_nameVARCHAR(150)Display title
viewing_events
ColumnTypeDescription
viewing_event_idPKINTUnique viewing event identifier
viewer_idINTViewer identifier
title_idINTViewed title identifier
viewed_atTIMESTAMPTime of viewing
is_first_ever_viewBOOLEANWhether this was the viewer's first view of the title
signup_attempts
ColumnTypeDescription
signup_attempt_idPKINTUnique signup attempt identifier
viewer_idINTViewer identifier
title_idINTAttributed title identifier
signup_started_atTIMESTAMPTime the signup attempt started
signup_completed_atTIMESTAMPCompletion time, or NULL when incomplete
Tablestitlesviewing_eventssignup_attempts
Interviewer

Your question is Top Titles by Signup Completion. 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.