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
Rolling 30-Day MAU Actions Query
00:00
5 left

Rolling 30-Day MAU Actions Query

MediumSQL · PostgreSQL

Problem

Write a SQL query to find the monthly active users (MAU) who have performed a specific set of actions on New Relic's platform over a rolling 30-day period.

Use users, platform_events, and action_catalog. Treat rows marked is_required = TRUE as the required action set. Evaluate each calendar month represented in the events, using the month end as the rolling 30-day window end.

Output

  1. One row per calendar month.
  2. Columns: month_start and mau_user_count.
  3. Include users who completed every required action in that month's rolling window, and order by month_start ascending.

Schema

users
ColumnTypeDescription
user_idPKINTUnique New Relic user identifier
emailVARCHAR(255)User email address
account_tierVARCHAR(50)New Relic account tier
platform_events
ColumnTypeDescription
event_idPKINTUnique platform event identifier
user_idINTUser who performed the action
action_idINTPerformed platform action
event_timestampTIMESTAMPTimestamp when the action occurred
event_metadataTEXTOptional event details
action_catalog
ColumnTypeDescription
action_idPKINTUnique action identifier
action_nameVARCHAR(100)Platform action name
is_requiredBOOLEANWhether the action is required for MAU qualification
descriptionTEXTAction description
Tablesusersplatform_eventsaction_catalog
Interviewer

Your question is Rolling 30-Day MAU Actions 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
Sign up free to run your codeLog inLn 1
Run your query to see results here.