Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Validate Monthly Financial Report Accuracy

MediumSQL · PostgreSQL00:00
Practice interviewer
In session
5 left
00:00

Your question is Validate Monthly Financial Report Accuracy. Start with the requirements and the three tables on the right.

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.

Problem

Validate January 2024 posted revenue reports by comparing each Sunshine Health business unit's reported amount to the sum of underlying revenue ledger entries. Return the reported amount, calculated amount, variance, and a status that distinguishes exact matches, mismatches, and missing ledger support.

Schema

financial_reports
ColumnTypeDescription
report_id
report_month
business_unit
reported_revenue
status
gl_entries
ColumnTypeDescription
entry_id
posted_date
business_unit
account_code
amount
account_map
ColumnTypeDescription
account_code
account_category

Representative Rows

gl_entries
22024-01-05Medicare40001000.00
32024-01-10Medicare4010500.00
52024-01-18Marketplace5000-50.00
account_map
4000Revenue
4010Revenue
5000Expense
financial_reports
1012024-01-01Medicare1500.00POSTED
1022024-01-01Marketplace1200.00POSTED
1042024-01-01Specialty700.00POSTED
Tablesfinancial_reportsgl_entriesaccount_map
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results