Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
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 feedbackSuccess 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
MoM Active Borrower Growth
00:00
5 left

MoM Active Borrower Growth

MediumSQL · PostgreSQL

Problem

Write a query to find the month-over-month growth rate of active borrowers on the Happy Money platform.

Use the provided borrower and activity data. Treat a borrower as active for a month when they have an activity row marked active and a matching platform borrower record with platform_status = 'active'.

Output

  1. One row per calendar month represented in the activity data.
  2. Columns: month, active_borrowers, prior_month_active_borrowers, and growth_rate_pct.
  3. Calculate growth as the percentage change from the immediately preceding calendar month. Return NULL when no prior-month count exists.
  4. Order by month ascending.

Schema

borrowers
ColumnTypeDescription
borrower_idPKINTUnique Happy Money borrower identifier
created_atDATEDate the borrower joined the platform
platform_statusVARCHAR(20)Current platform status of the borrower
borrower_activity
ColumnTypeDescription
activity_idPKINTUnique activity record identifier
borrower_idINTBorrower associated with the activity
activity_dateDATEDate of the borrower activity
activity_statusVARCHAR(20)Whether the activity qualifies as active
Tablesborrowersborrower_activity
Interviewer

Your question is MoM Active Borrower Growth. 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.