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

Data Modeling for Business

MediumSQL · PostgreSQL

Problem

Describe a time when you used data modeling to solve a business problem.

For this SQL exercise, demonstrate the modeling approach with the provided product dimension and event fact data. Return a concise monthly metric view that can support business analysis.

Output

  1. One row per TikTok product for January 2025, including products without qualifying events
  2. Columns: business_unit_name, reporting_month, completed_events, total_value, and performance_band
  3. Include only completed events dated in January 2025; treat missing qualifying activity as zero
  4. Order by total_value descending, then business_unit_name ascending

Schema

business_units
ColumnTypeDescription
business_unit_idPKINTUnique identifier for a TikTok product or business unit
business_unit_nameVARCHAR(100)Name of the TikTok product or business unit
business_events
ColumnTypeDescription
event_idPKINTUnique event identifier
business_unit_idINTProduct associated with the event
event_dateDATEDate on which the event occurred
event_statusVARCHAR(30)Processing status of the event
event_valueDECIMAL(12,2)Business value associated with the event
Tablesbusiness_unitsbusiness_events
Interviewer

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