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
Month-over-Month Creator Retention
00:00
5 left

Month-over-Month Creator Retention

MediumSQL · PostgreSQL

Problem

Given a database of user video interactions, write a SQL query to calculate the month-over-month retention rate of active creators.

Use the creators and video_interactions tables. A creator is active in a month when they have at least one recorded interaction during that month.

Output

  1. One row per month after the first observed month, with columns month_start, previous_month_active_creators, retained_creators, and retention_rate.
  2. Include creators active in both the current month and immediately preceding month in retained_creators.
  3. Order by month_start ascending. Return retention_rate as a percentage rounded to two decimal places.

Schema

creators
ColumnTypeDescription
creator_idPKINTUnique creator identifier
creator_nameVARCHAR(100)Creator display name
video_interactions
ColumnTypeDescription
interaction_idPKINTUnique interaction identifier
creator_idINTCreator associated with the interaction
interaction_atTIMESTAMPTimestamp when the interaction occurred
Tablescreatorsvideo_interactions
Interviewer

Your question is Month-over-Month Creator Retention. Start with the requirements and the two 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.