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
ExperiencesCoaching
New
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
Get started
Diagnosing Engagement Declines
00:00
5 left

Diagnosing Engagement Declines

MediumSQL · PostgreSQL

Problem

How would you approach analyzing a decline in user engagement for a specific lending product?

Use the provided tables to produce monthly engagement metrics for Trepp CRE Lending Analytics from January through April 2024.

Output

  1. One row per month, with engagement_month, active_users, engagement_events, events_per_active_user, active_users_pct_change, and engagement_events_pct_change
  2. Include the first month with NULL prior-month percentage changes
  3. Order by engagement_month ascending

Schema

lending_products
ColumnTypeDescription
product_idPKINTUnique lending product identifier
product_nameVARCHAR(120)Name of the lending product
product_statusVARCHAR(30)Current product status
users
ColumnTypeDescription
user_idPKINTUnique user identifier
user_nameVARCHAR(120)User display name
segmentVARCHAR(50)User business segment
engagement_events
ColumnTypeDescription
event_idPKINTUnique engagement event identifier
user_idINTUser who generated the event
product_idINTProduct associated with the event
event_dateDATEDate of the engagement event
event_typeVARCHAR(50)Type of engagement activity
Tablesengagement_eventslending_productsusers
Interviewer

Your question is Diagnosing Engagement Declines. 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
Sign up free to run your codeLog inLn 1
Run your query to see results here.