Logistics & Transportation Analytics · Mission 6 of 30Easy

Carrier shipment volume

JOIN a fact table to a dimension table and GROUP BY a dim column

The Brief

Dario RuizNetwork Planning Managerlogistics-ops

I need total shipment volume by carrier. Join `fact_shipments` to `dim_carriers`, group by `carrier_name`, count shipments as `total_shipments`, sort descending. This tells us who's carrying the most freight.

You'll practice

GROUP BYJOINCOUNT

Tables & columns available

fact_shipmentsfact15 columns
ColumnTypeKey
shipment_idINTPK
carrier_idINTFK → dim_carriers
lane_idINTFK → dim_lanes
planned_pickup_dateTEXT
actual_pickup_dateTEXT
planned_delivery_dateTEXT
actual_delivery_dateTEXT
qty_orderedINT
qty_shippedINT
weight_lbsREAL
freight_costREAL
fuel_surchargeREAL
accessorial_costREAL
dwell_hours_at_originREAL
statusTEXT
dim_carriersdim6 columns
ColumnTypeKey
carrier_idINTPK
carrier_nameTEXT
scacTEXT
modeTEXT
on_time_target_pctREAL
hq_stateTEXT

Hints (3)

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

Hint 1

Carrier name lives on the dim, shipment volume on the fact — bridge them.

Hint 2

There's a clause that collapses rows so you get one per carrier.

Hint 3

Then rank the result by volume, biggest first.