How do you utilize XLOOKUP and VLOOKUP for large-scale financial or operational data reconciliation?
Translate the lookup-based reconciliation approach into PostgreSQL. Compare corresponding records from two financial sources and classify matches, discrepancies, and records missing from either source.
| Column | Type | Description |
|---|---|---|
| transaction_idPK | VARCHAR(20) | Transaction identifier from the ERP source |
| transaction_date | DATE | Date recorded by the ERP source |
| amount | NUMERIC(12,2) | Transaction amount recorded by the ERP source |
| currency | VARCHAR(3) | ISO currency code |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | VARCHAR(20) | Transaction identifier from the finance source |
| posted_date | DATE | Date posted by the finance source |
| amount | NUMERIC(12,2) | Transaction amount recorded by the finance source |
| currency | VARCHAR(3) | ISO currency code |