How would you use VLOOKUP or XLOOKUP to reconcile two datasets?
For this SQL exercise, treat each row as a record aligned by record_key, with values from both datasets stored in the same table. Write a PostgreSQL query that returns only records whose amounts do not reconcile, including cases where one dataset has a NULL amount.
record_key, dataset_a_amount, dataset_b_amount, and reconciliation_statusrecord_key in ascending order| Column | Type | Description |
|---|---|---|
| record_keyPK | VARCHAR(20) | Identifier used to align records from both datasets |
| dataset_a_amount | DECIMAL(12,2) | Amount reported by dataset A |
| dataset_b_amount | DECIMAL(12,2) | Amount reported by dataset B |