Omnichannel Retail Analytics Path · Mission 6 of 25Medium

Channel mix month-over-month — H2 FY26

Multi-key GROUP BY (month + channel), date_trunc, multi-column ORDER BY. The shape behind every channel-mix-shift exec briefing.

Back to Omnichannel Retail Analytics

The Brief

Sofia ReyesVP Operationsops-leadership

I need to see the channel mix shift Oct 2025 → Mar 2026 (last 6 months). Bucket by month and channel. Three columns: month (first of each month), channel, order_count. ORDER BY month ASC then channel ASC. We're trying to see whether store_ship_from_store is taking share from web_ship — eyeball the trend.

You'll practice

date_truncPivot-styleMulti-key GROUP BY

Tables & columns available

fact_ordersfact10 columns
ColumnTypeKey
order_idINTPK
sku_idINTFK → dim_skus
store_idINTFK → dim_stores
channelTEXT
customer_zipTEXT
order_tsTEXT
unitsINT
gross_amountREAL
discount_amountREAL
fulfillment_costREAL

Hints (4)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

Filter order_ts >= '2025-10-01' AND order_ts < '2026-04-01'.

Hint 2

DATE_TRUNC('month', order_ts::timestamp)::date for the month bucket.

Hint 3

GROUP BY both month and channel so each (month, channel) pair gets its own row.

Hint 4

ORDER BY month ASC, channel ASC.