Write a SQL query to analyze financial data and validate assumptions in a real scenario at T-Mobile. Compare posted transaction totals with monthly assumptions, treating missing actual totals as zero. Use the financial_transactions, accounts, and monthly_assumptions tables.
account_type, period_start, actual_amount, assumed_amount, variance, variance_pct, and validation_status.account_type and period_start, and report Match only when actual and assumed amounts are equal.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique financial transaction identifier |
| account_id | INT | Account associated with the transaction |
| transaction_date | DATE | Date the transaction was recorded |
| amount | NUMERIC(12,2) | Transaction amount |
| status | VARCHAR(20) | Transaction processing status |
| Column | Type | Description |
|---|---|---|
| account_idPK | INT | Unique account identifier |
| account_type | VARCHAR(30) | Financial account classification |
| Column | Type | Description |
|---|---|---|
| assumption_idPK | INT | Unique assumption identifier |
| account_type | VARCHAR(30) | Account classification for the assumption |
| period_start | DATE | First day of the assumption month |
| assumed_amount | NUMERIC(12,2) | Expected amount for the account type and month |