Query ran in 0.8s — 5 rows
Last run: just now
Revenue by Region — Last 12 Months
| Region |
Order Count |
Total Revenue |
% of Total |
| West | 4,821 | $1,350,000 | 33.2% |
| North | 3,604 | $1,010,000 | 24.8% |
| Central | 2,879 | $800,000 | 19.7% |
| East | 2,156 | $590,000 | 14.5% |
| South | 1,642 | $460,000 | 11.3% |
| Total |
15,102 |
$4,210,000 |
100.0% |
Show SQL
-- Generated by Looker · bigquery_prod · Explore: orders
SELECT
orders.region AS `orders.region`,
COUNT(DISTINCT orders.order_id) AS `orders.count`,
SUM(orders.order_total) AS `orders.total_revenue`,
SAFE_DIVIDE(
SUM(orders.order_total),
SUM(SUM(orders.order_total)) OVER()
) AS `orders.pct_of_total_revenue`
FROM `sales_prod.orders` AS orders
WHERE
orders.created_at >= DATE_TRUNC(DATE_SUB(CURRENT_DATE(), INTERVAL 12 MONTH), MONTH)
AND orders.created_at < DATE_TRUNC(CURRENT_DATE(), MONTH)
GROUP BY 1
ORDER BY 3 DESC
LIMIT 500