Download answer_key/kpis/discount_rate.sql from misatadata/pepperwind: direct link, hf CLI and curl.
- Browser
- Download file 500 Bytes
-
https://huggingface.co/datasets/misatadata/pepperwind/resolve/main/answer_key/kpis/discount_rate.sql
- Command line
-
hf download hf://datasets/misatadata/pepperwind/answer_key/kpis/discount_rate.sql
-
curl -L -o discount_rate.sql https://huggingface.co/datasets/misatadata/pepperwind/resolve/main/answer_key/kpis/discount_rate.sql
500 Bytes
| -- Discount as a share of storefront subtotal, by currency | |
| -- Discounts over subtotals of storefront orders not cancelled, by the month placed. | |
| SELECT strftime(placed_at, '%Y-%m') AS month, currency AS grp, sum(discount_total) AS num, sum(subtotal) AS den, sum(discount_total) / NULLIF(sum(subtotal), 0) AS value FROM commerce.order WHERE placed_at >= TIMESTAMP '2023-10-01' AND placed_at < TIMESTAMP '2026-10-01' AND ((b2b_account_id IS NULL) AND (cancelled_at IS NULL)) GROUP BY 1, 2 ORDER BY 1, 2 | |