E-commerce & Retail Analytics Path · Mission 9 of 30Easy

Average order value by channel

Combine GROUP BY with AVG. The 'is web-AOV bigger than mobile-AOV' question that drives every channel-mix conversation in DTC ops.

The Brief

Yara OkekeDirector, E-commerceecom-ops

Channel-mix review. For each `channel` value in `ecom_orders`, compute the average `total_price`, plus the order count alongside (so we can sanity-check the small-N channels). Three columns: channel, aov, order_count. Order by aov descending, rounded to two decimals on the AOV. The fight at next month's exec review is whether mobile AOV is collapsing — I want the data ready before the meeting.

You'll practice

AVGGROUP BY

Tables & columns available

ecom_ordersfact13 columns
ColumnTypeKey
order_idINTPK
customer_idINTFK → ecom_customers
order_numberTEXT
financial_statusTEXT
fulfillment_statusTEXT
total_priceREAL
subtotalREAL
taxREAL
shippingREAL
discount_totalREAL
channelTEXT
created_dateTEXT
processed_dateTEXT

Hints (3)

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

Hint 1

`GROUP BY channel`, with `AVG(total_price)` and `COUNT(*)` as the two aggregates.

Hint 2

`ROUND(AVG(total_price), 2)` for the dollars-and-cents AOV.

Hint 3

Four channels: web (the bulk), mobile, draft (rare — admin-created orders), pos (rarer still). Draft AOV will look high because of small-N — flag that in the debrief, don't just present the number.