Reconcile bank and ledger exceptions on both sides Original fictional practice data · 2026-11-11 · CC BY 4.0 BRIEF A treasurer has one bank export and one internal cash ledger. Deliver every payment reference with a signed bank-minus-ledger difference and an explanation status. CONTRACT 1. Each reference is unique within each source in this case. Preserve references present on either side. 2. Use MATCH only when both records exist and amounts agree. Other statuses are AMOUNT_DIFF, BANK_ONLY, or LEDGER_ONLY. 3. For difference arithmetic only, treat an absent side as zero. Output reference,bank_cents,ledger_cents,difference_cents,status; absent source amounts remain NULL. METHOD Build the union of reference keys; this avoids losing ledger-only T4. Join both sources to that key list and distinguish missing rows from zero amounts. Sum the differences and compare total bank minus total ledger. COMMON MISTAKE Checking only bank rows misses T4. Using amount=0 to detect absence incorrectly marks T6 as missing. INDEPENDENT CROSS-CHECK Bank total 14,650 less ledger total 15,700 equals the exception sum of -1,050 cents. DELIVER A checked output CSV and a handoff note explaining the exception policy. Use setup.sql in SQLite or import each table CSV into your spreadsheet. expected.csv is the complete reference result; an empty CSV field represents SQL NULL. The browser executes SQLite, not Excel formulas. XLOOKUP is unavailable in Excel 2016 and 2019. Sources for function behavior: https://www.sqlite.org/lang_select.html and https://support.microsoft.com/en-us/excel/functions/xlookup-function (checked 2026-11-11). Rates, dates and policies here are exercise assumptions.