Logistics & Transportation Analytics · Mission 11 of 30Medium

Monthly shipment volume trend

Extract a date substring for month-level aggregation using SUBSTR

The Brief

Maya ChenLogistics Analystlogistics-ops

I need a monthly volume trend using `planned_pickup_date`. Extract the YYYY-MM prefix as `pickup_month`, count shipments as `shipment_count`, sort chronologically. This shows seasonality patterns.

You'll practice

Date extract

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

Hints (3)

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

Hint 1

Dates are stored as TEXT in 'YYYY-MM-DD'. You can slice the year-month prefix from the string with a substring function.

Hint 2

GROUP BY the extracted month string, then count rows per group.

Hint 3

ORDER BY pickup_month ASC for chronological order.