Write a SQL query to analyze sales performance by region and month at Twilio, joining opportunities, accounts, and rep tables and calculating conversion rate.
Use all available opportunity records whose account and assigned rep can be matched. Treat opportunities with a Closed Won stage as converted.
Output
- One row per region and calendar month.
- Columns:
region, month, total_opportunities, won_opportunities, and conversion_rate.
- Return the conversion rate as won opportunities divided by total opportunities, rounded to four decimal places.
- Order by
region, then month ascending.