Write a SQL query to analyze business performance by region and month at Criteo, joining operational data with revenue data to identify trends and outliers.
Return all region-month combinations represented in either source, including months with missing data. Calculate operational volume, revenue, revenue per operation, month-over-month revenue change, and an outlier indicator based on regional monthly revenue.
Output
- One row per region and month, ordered by
region_id, then month.
- Columns:
region_name, month, operational_count, revenue, revenue_per_operation, revenue_change_pct, and is_revenue_outlier.
- Preserve missing revenue as
NULL; use TRUE only when revenue is unusually high or low for its region.