File size: 371 Bytes
27ec678
 
 
1
2
3
4
-- Storefront orders placed, by market
-- Storefront orders (no wholesale account) by the month placed, cancelled ones included.
SELECT strftime(placed_at, '%Y-%m') AS month, market_code AS grp, count(*) AS value FROM commerce.order WHERE placed_at >= TIMESTAMP '2023-10-01' AND placed_at < TIMESTAMP '2026-10-01' AND (b2b_account_id IS NULL) GROUP BY 1, 2 ORDER BY 1, 2