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
Find Largest Funnel Step Drop-Off
00:00
5 left

Find Largest Funnel Step Drop-Off

HardSQL · PostgreSQL

Problem

StreamFlow tracks users moving through a signup funnel. Write a SQL query to identify the biggest drop-off between consecutive funnel steps for each funnel version.

Requirements

  1. Consider only events where completed_flag = true.
  2. Count distinct users who completed each step within each funnel version.
  3. Compare each step to the immediately previous step in the same funnel version.
  4. Return the step with the largest user drop-off per funnel version, including the previous step name, current step name, previous step users, current step users, drop_off_users, and drop_off_rate.

Schema

funnel_steps
ColumnTypeDescription
step_idPKINTUnique step identifier
funnel_versionVARCHAR(20)Funnel version label
step_nameVARCHAR(50)Name of the funnel step
step_orderINTStep position within the funnel
users
ColumnTypeDescription
user_idPKINTUnique user identifier
acquisition_channelVARCHAR(30)Marketing acquisition source
signup_dateDATEDate the user signed up
funnel_events
ColumnTypeDescription
event_idPKINTUnique event identifier
user_idINTUser who triggered the event
step_idINTFunnel step reached
event_timeTIMESTAMPTime of the event
completed_flagBOOLEANWhether the step was completed
Tablesfunnel_stepsusersfunnel_events
Interviewer

Your question is Find Largest Funnel Step Drop-Off. 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.