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
Advanced Data Modeling for Performance
00:00
5 left

Advanced Data Modeling for Performance

HardSQL · PostgreSQL

Problem

Describe a time you utilized advanced data modeling techniques to solve a specific business performance issue at Citi.

For this hands-on version, use the supplied Citi performance tables to calculate monthly actuals against targets and identify performance gaps.

Output

  1. Return one row per business unit for January 2025.
  2. Include unit_name, actual_value, target_value, variance, performance_status, and shortfall_rank.
  3. Include business units without actual activity or a target, sort by largest shortfall first, and place units without targets last. Break ties alphabetically by unit_name.

Schema

business_units
ColumnTypeDescription
unit_idPKINTUnique business-unit identifier
unit_nameVARCHAR(100)Business-unit name
business_lineVARCHAR(80)Citi business line
performance_results
ColumnTypeDescription
result_idPKINTUnique performance result identifier
unit_idINTBusiness unit associated with the result
performance_monthDATEFirst day of the reporting month
metric_nameVARCHAR(80)Performance metric name
actual_valueNUMERIC(12,2)Observed performance value
performance_targets
ColumnTypeDescription
target_idPKINTUnique target identifier
unit_idINTBusiness unit associated with the target
performance_monthDATEFirst day of the target month
target_valueNUMERIC(12,2)Target performance value
Tablesbusiness_unitsperformance_resultsperformance_targets
Interviewer

Your question is Advanced Data Modeling for Performance. 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.