Download answer_key/kpis/carrier_share.sql from misatadata/pepperwind: direct link, hf CLI and curl.
- Browser
- Download file 593 Bytes
-
https://huggingface.co/datasets/misatadata/pepperwind/resolve/main/answer_key/kpis/carrier_share.sql
- Command line
-
hf download hf://datasets/misatadata/pepperwind/answer_key/kpis/carrier_share.sql
-
curl -L -o carrier_share.sql https://huggingface.co/datasets/misatadata/pepperwind/resolve/main/answer_key/kpis/carrier_share.sql
593 Bytes
| -- Share of storefront parcels by carrier | |
| -- Storefront order parcels shipped in the window by carrier code, as shares of all of them. | |
| SELECT coalesce(c.code, 'None') AS grp, count(*) AS parcels, count(*)::DOUBLE / sum(count(*)) OVER () AS value FROM (SELECT s.*, o.market_code, o.pincode_tier FROM logistics.shipment s JOIN commerce.order o USING (order_id) WHERE s.shipment_type = 'order' AND o.b2b_account_id IS NULL) p LEFT JOIN logistics.carrier c ON c.carrier_id = p.carrier_id WHERE p.shipped_at >= TIMESTAMP '2023-10-01' AND p.shipped_at < TIMESTAMP '2026-10-01' GROUP BY 1 ORDER BY 1 | |