Complex~35min
The Carrier Rate That's Cheaper Only on Paper
CheapFreight's quoted rate (5,000) has looked cheaper than PremiumLogistics's (6,000) every month. But CheapFreight's fuel surcharge climbed steadily every month — 200 to 2,200 — while PremiumLogistics's stayed flat at 100. By month 6, CheapFreight's true cost (7,200) is well above PremiumLogistics's (6,100). Some CheapFreight shipments also carry a one-off oversize handling fee in months 5-6, but the fuel surcharge alone was already climbing from month 1.
Tables you'll query
shipmentsaccessorial_fees
What you'll learn
CTEs (WITH clause)Window FunctionsAggregations & GROUP BY