Write a SQL query to analyze branch operations performance by joining transactions, employees, and branch tables, then aggregating key metrics by month at U.S. Bank.
Use completed transactions only. Return monthly metrics for branches with matching employee and transaction records.
Output
- One row per branch and calendar month
- Columns:
branch_name, month, transaction_count, employees_involved, total_amount, average_amount, high_value_transactions
- Include completed transactions with null amounts in the transaction count, but exclude null amounts from amount aggregates
- Order by month ascending, then branch name ascending