Omnichannel Retail Analytics Path · Mission 4 of 25Easy

Inventory by store — snapshot date

Aggregate over a daily snapshot fact, JOIN to a dim, sort. The shape behind every weekly inventory review.

Back to Omnichannel Retail Analytics

The Brief

Devon ParkInventory Leadinventory

Monday morning. Pull total units on hand by store as of 2026-03-30 — only the 50 stores' hot SKUs (the 20 SKUs we track daily). Three columns: store_id, store_name, total_units. ORDER BY total_units DESC, store_id ASC. Top 10 only — that's the quick snapshot the regional VPs want first.

You'll practice

INNER JOINGROUP BY storeSUM units

Tables & columns available

fact_inventory_by_locationfact5 columns
ColumnTypeKey
snapshot_idINTPK
store_idINTFK → dim_stores
sku_idINTFK → dim_skus
snapshot_dateTEXT
units_on_handINT
dim_storesdim7 columns
ColumnTypeKey
store_idINTPK
store_nameTEXT
regionTEXT
cityTEXT
stateTEXT
sq_ftINT
opened_dateTEXT

Hints (4)

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

Hint 1

JOIN fact_inventory_by_location to dim_stores.

Hint 2

Filter snapshot_date = '2026-03-30' — the most recent date in the seed.

Hint 3

SUM(units_on_hand), GROUP BY store_id and store_name.

Hint 4

ORDER BY total_units DESC, store_id ASC, LIMIT 10.