Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

CTE-Based TurboTax Growth Analysis

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is CTE-Based TurboTax Growth Analysis. Start with the requirements and the three tables on the right.

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.

Problem

You are given product usage and subscription data for TurboTax. Write a PostgreSQL query that uses a CTE to simplify a growth analysis for the 2024 calendar year. Return one row per month showing the number of users who started a paid subscription in that month, how many of those users were already active in the previous month, and the resulting month-over-month retained signup rate. Only include months with at least 2 paid subscription starts.

Schema

tt_users
ColumnTypeDescription
user_idPKINTUnique TurboTax user ID
signup_dateDATEDate the user created an account
country_codeVARCHAR(2)User country code
acquisition_channelVARCHAR(30)Marketing acquisition source
tt_activity
ColumnTypeDescription
activity_idPKINTUnique activity event ID
user_idINTTurboTax user ID
activity_dateDATEDate of product activity
surface_nameVARCHAR(30)TurboTax product surface where activity happened
tt_subscriptions
ColumnTypeDescription
subscription_idPKINTUnique subscription record
user_idINTTurboTax user ID
plan_nameVARCHAR(30)Subscription plan name
subscription_start_dateDATEDate the paid subscription started
subscription_statusVARCHAR(20)Current subscription status
Tablestt_userstt_activitytt_subscriptions
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results