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
Modeling Sales Incentive Effectiveness
00:00
5 left

Modeling Sales Incentive Effectiveness

MediumSQL · PostgreSQL

Problem

Explain how you would design a model to test the effectiveness of a new sales incentive plan.

Use the tables below to compare sales performance before and after the plan starts. Return one row per rep with pre-plan and post-plan sales, plus the change in performance.

Output

  1. One row per sales rep who appears in both periods
  2. Columns: rep_id, rep_name, pre_plan_sales, post_plan_sales, sales_lift, lift_pct
  3. Include only reps with at least one sale in both the pre-plan and post-plan periods
  4. Sort by lift_pct descending, then sales_lift descending, then rep_id ascending

Schema

sales_reps
ColumnTypeDescription
rep_idPKINTUnique sales representative identifier
rep_nameVARCHAR(255)Sales representative name
regionVARCHAR(100)Primary region for the rep
sales
ColumnTypeDescription
sale_idPKINTUnique sale identifier
rep_idINTSales representative identifier
sale_dateDATEDate the sale was booked
sale_amountNUMERIC(12,2)Booked sale amount
Tablessalessales_reps
Interviewer

Your question is Modeling Sales Incentive Effectiveness. 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.