Your question is Top Categories by Shipping Growth. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
ShopSwift wants to identify which product categories are driving shipping cost increases. Write a SQL query to find the top categories contributing to shipping cost growth from February 2024 to March 2024.
shipments table.category, calculate total shipping cost in February 2024 and March 2024.march_total - february_total).| Column | Type | Description |
|---|---|---|
| shipment_idPK | INT | Unique shipment record ID |
| category | VARCHAR(50) | Product category for the shipped item |
| shipped_date | DATE | Date the shipment was sent |
| shipping_cost | DECIMAL(10,2) | Shipping cost for the shipment |
| carrier | VARCHAR(50) | Carrier used for the shipment |