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
SQL: Top Engaged Save Interactors
00:00
5 left

SQL: Top Engaged Save Interactors

MediumSQL · PostgreSQL

Problem

Meta's Product Growth team is evaluating Instagram Save engagement across regions. Using quarterly interaction and engagement data, write a PostgreSQL query to find the top three users in each region who interacted with an Instagram Save feature during Q2 2025.

Requirements

  1. Filter instagram_save_interactions to completed Instagram Save interactions from 2025-04-01 through 2025-06-30, inclusive.
  2. Aggregate each qualifying user's engagement score and engagement event count during the same quarter. Users with no engagement events must remain eligible with a score of zero.
  3. Rank users independently within each non-null region by engagement score descending, breaking ties with user_id ascending, and return ranks 1 through 3.

Schema

users
ColumnTypeDescription
user_idPKINTUnique Meta user identifier
user_nameVARCHAR(100)User display name
regionVARCHAR(50)User's geographic region
instagram_save_interactions
ColumnTypeDescription
interaction_idPKINTUnique Save interaction identifier
user_idINTUser who performed the interaction
feature_nameVARCHAR(100)Instagram feature involved in the interaction
interacted_atDATEDate of the interaction
engagement_events
ColumnTypeDescription
event_idPKINTUnique engagement event identifier
user_idINTUser associated with the event
event_dateDATEDate of the engagement event
engagement_scoreINTWeighted engagement score for the event
Tablesusersinstagram_save_interactionsengagement_events
Interviewer

Your question is SQL: Top Engaged Save Interactors. 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.