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
Commission Calculation Verification
00:00
5 left

Commission Calculation Verification

MediumSQL · PostgreSQL

Problem

What steps do you take to verify the integrity and accuracy of a commission calculation before sending it to payroll at Adobe?

Using the provided Adobe commission tables, write one PostgreSQL query that validates active representatives' April 2025 commission records. Include representatives with no eligible deals so the output also exposes missing activity.

Output

  1. One row per active representative, ordered by rep_name, then rep_id.
  2. Return rep_name, eligible_deal_count, eligible_sales, expected_commission, recorded_commission, variance, and verification_status.
  3. Include closed deals dated in April 2025 only. Flag missing rates, missing recorded commissions, negative amounts, mismatched totals, and representatives with no eligible deals.

Schema

representatives
ColumnTypeDescription
rep_idPKINTUnique sales representative identifier
rep_nameVARCHAR(100)Sales representative name
planVARCHAR(30)Commission plan assigned to the representative
is_activeBOOLEANWhether the representative is active for payroll processing
commission_deals
ColumnTypeDescription
deal_idPKINTUnique deal identifier
rep_idINTRepresentative responsible for the deal
close_dateDATEDeal close date
deal_statusVARCHAR(20)Deal lifecycle status
amountNUMERIC(12,2)Commissionable deal amount
recorded_commissionNUMERIC(12,2)Commission currently recorded for payroll
commission_rates
ColumnTypeDescription
planPKVARCHAR(30)Commission plan name
commission_rateNUMERIC(5,4)Commission rate as a decimal fraction
Tablesrepresentativescommission_dealscommission_rates
Interviewer

Your question is Commission Calculation Verification. 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.