Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Diagnose Invoice Discrepancies by Vendor

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

Your question is Diagnose Invoice Discrepancies by Vendor. 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

You are comparing staged invoice data against ERP invoice records used in Valmont Industries finance reporting. Write a PostgreSQL query that surfaces discrepancy patterns by vendor and invoice month, including missing ERP matches, amount mismatches, date mismatches, and duplicate staged invoices.

Schema

Tables
  • vendors
  • erp_invoices
  • staged_invoices
Tablesvendorserp_invoicesstaged_invoices
Your solutionPostgreSQL
You need to log in / sign up to run or submit.
Run a query to see results