Write a SQL query to perform a comparison between two customer transaction datasets to identify discrepancies.
Compare records by transaction_id, treating NULL values as equal when both datasets contain NULL. Return records that are missing from either dataset or have different customer, date, amount, or status values.
transaction_id ascending.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| customer_id | VARCHAR(20) | Customer identifier |
| transaction_date | DATE | Transaction date |
| amount | DECIMAL(12,2) | Transaction amount |
| status | VARCHAR(20) | Transaction status |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| customer_id | VARCHAR(20) | Customer identifier |
| transaction_date | DATE | Transaction date |
| amount | DECIMAL(12,2) | Transaction amount |
| status | VARCHAR(20) | Transaction status |