Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started
Funnel Drop-off SQL Query
00:00
5 left

Funnel Drop-off SQL Query

MediumSQL · PostgreSQL

Problem

Write a SQL query to find the monthly active users who engaged with our marketing landing pages but did not complete a registration form.

Treat a user as active in a month when they have at least one marketing landing-page engagement. Exclude users who completed a registration form during that same calendar month.

Output

  1. One row per month with activity_month and monthly_active_users.
  2. Include only months with qualifying users.
  3. Order by activity_month ascending.

Schema

users
ColumnTypeDescription
user_idPKINTUnique user identifier
created_atTIMESTAMPTZTimestamp when the user account was created
is_activeBOOLEANWhether the user account is active
landing_page_engagements
ColumnTypeDescription
engagement_idPKINTUnique engagement identifier
user_idINTUser who engaged with the page
engaged_atTIMESTAMPTZTimestamp of the engagement
page_typeVARCHAR(50)Category of page where the engagement occurred
landing_page_nameVARCHAR(100)Name of the landing page
registration_forms
ColumnTypeDescription
registration_idPKINTUnique registration form identifier
user_idINTUser associated with the form
started_atTIMESTAMPTZTimestamp when the form was started
completed_atTIMESTAMPTZTimestamp when the form was completed
Tablesuserslanding_page_engagementsregistration_forms
Interviewer

Your question is Funnel Drop-off SQL Query. 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
You need to log in / sign up to run or submit.Ln 1
Run your query to see results here.