Write a SQL query to measure monthly branch transaction volume, approval rate, and month-over-month change by region.
Use the provided branches and transactions tables. Include months with transactions, calculate approval rate as approved transactions divided by all transactions, and report the absolute change in transaction volume from the previous reported month for the same region.
region, month, transaction_volume, approval_rate, and mom_volume_change.region, then chronological month. The first month for each region should have a NULL month-over-month change.| Column | Type | Description |
|---|---|---|
| branch_idPK | INT | Unique branch identifier |
| branch_name | VARCHAR(100) | Branch name |
| region | VARCHAR(50) | Geographic operating region |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| branch_id | INT | Branch processing the transaction |
| transaction_date | DATE | Date the transaction was processed |
| status | VARCHAR(20) | Transaction approval status |