Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Identify Funnel Bottlenecks in Onboarding

MediumSQL · PostgreSQL00:00
I
Practice interviewer
Your interviewer
In session
I
Interviewer

Welcome to the SQL screen.

The question is on your right: Identify Funnel Bottlenecks in Onboarding. Read through the requirements and the three tables first.

Run and submit your code as often as you need. You also have five interviewer messages this session - want to talk through your approach, or are you ready to start coding?

You need to log in / sign up to run or submit.

Problem

You are given event data for a Revolut-style customer onboarding funnel. Write a SQL query that returns, for each day in January 2024, the number of users who reached each funnel step, the conversion rate from the previous step, and the estimated number of users lost at that step. Only include users whose acquisition source is Paid Search or Referral, and treat the funnel as ordered from signup to kyc_submitted to kyc_approved to card_ordered.

Your result should help identify the main operational bottleneck by showing where the largest drop happens on each day. If a user triggers the same step multiple times on the same day, count that user only once for that step-day combination.

Schema

users
ColumnTypeDescription
user_idPKINTUnique user identifier
signup_dateDATEDate the user signed up
acquisition_sourceVARCHAR(50)Marketing source for the user
funnel_events
ColumnTypeDescription
event_idPKINTUnique event identifier
user_idINTUser who triggered the event
step_nameVARCHAR(50)Name of the funnel step
event_timeTIMESTAMPTimestamp of the funnel event
step_order
ColumnTypeDescription
step_namePKVARCHAR(50)Name of the funnel step
step_rankINTSequential order of the step in the funnel
Tablesusersfunnel_eventsstep_order
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results