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
ExperiencesCoaching
New
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
Get started
Dynamic Fee Reconciliation in Sheets
00:00
5 left

Dynamic Fee Reconciliation in Sheets

MediumSQL · PostgreSQL

Problem

Create a dynamic reconciliation model in Google Sheets that highlights anomalies where the payment processor fee deviates from the contract rate at Rippling.

Write a PostgreSQL query that identifies payment records with fee mismatches, missing fees, or no applicable contract rate.

Output

  1. One row per reconciliation anomaly.
  2. Include payment, account, processor, contract rate, expected fee, actual fee, deviation, and anomaly type.
  3. Sort by payment date ascending, then payment ID ascending.

Schema

rippling_accounts
ColumnTypeDescription
account_idPKINTRippling customer account identifier
account_nameVARCHAR(120)Rippling customer account name
processor_contracts
ColumnTypeDescription
contract_idPKINTPayment processor contract identifier
account_idINTRippling account covered by the contract
processorVARCHAR(40)Payment processor named in the contract
contract_rate_pctDECIMAL(6,3)Contract fee percentage
effective_fromDATEContract start date
effective_toDATEContract end date, null for an active contract
payment_transactions
ColumnTypeDescription
payment_idPKINTPayment transaction identifier
account_idINTRippling account associated with the payment
processorVARCHAR(40)Processor that handled the payment
payment_dateDATEDate the payment was processed
gross_amountDECIMAL(12,2)Payment amount before processor fees
processor_feeDECIMAL(12,2)Fee charged by the payment processor
Tablesrippling_accountsprocessor_contractspayment_transactions
Interviewer

Your question is Dynamic Fee Reconciliation in Sheets. 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.