Back to problems

Reconcile ledgers with SQL/Python and late events

SQL · Capital One · Hard

You are responsible for a daily reconciliation pipeline that compares raw payment events with two downstream ledger copies. A ledger posting can settle within 48 hours, but longer delays also occur and must be identified. The input tables use the following schema: fx_rates.usd_rate gives the USD value of one unit of currency. A small illustrative sample: Task 1 — SQL reconciliation query Write one SQL query that returns exactly one row per payment_id, containing these…

Checking your access…