Procurement tradeoffs and award evidence · Original fictional data · Free files and full answers
Measure savings from split line buying versus one supplier
For kit quantities, choose each SKU lowest unit price ignoring capacity/MOQ, tie bid id. Report one row split_goods_cents,split_freight_cents using each winning supplier freight once,total_cents.
Use this fixed business case to build a checked CSV and a replayable SQL handoff. No account required. Scenario datasets are shared across related exercises; each exercise has its own decision and output contract.
Your output contract
- For kit quantities, choose each SKU lowest unit price ignoring capacity/MOQ, tie bid id. Report one row split_goods_cents,split_freight_cents using each winning supplier freight once,total_cents.
- Return exactly the declared columns and order. Money uses integer cents; time and date units follow the task and field dictionary. NULL is unknown and differs from numeric zero.
- These are original fictional records and exercise policies. Scenario data may be shared with related tasks, whose decisions and output contracts differ.
Return columns exactly as split_goods_cents, split_freight_cents, total_cents. Sort order follows the task. Output has 1 rows; an empty CSV field means NULL.
Source data
bids
9 source rows · Download bids CSV
| id INTEGER | supplier TEXT | sku TEXT | unit_cents INTEGER | shipping INTEGER | capacity INTEGER | moq INTEGER | lead_days INTEGER | expires INTEGER | risk_low INTEGER | risk_high INTEGER |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Alpha | A | 100 | 200 | 12 | 2 | 3 | 20 | 0 | 100 |
| 2 | Beta | A | 90 | 350 | 8 | 4 | 5 | 25 | 100 | 400 |
| 3 | Gamma | A | 110 | 0 | 20 | 1 | 2 | 10 | 0 | 0 |
| 4 | Alpha | B | 200 | 200 | 10 | 2 | 4 | 20 | 0 | 100 |
| 5 | Beta | B | 180 | 350 | 6 | 2 | 6 | 25 | 100 | 400 |
| 6 | Gamma | B | 230 | 0 | 12 | 1 | 2 | 10 | 0 | 0 |
| 7 | Delta | A | 80 | 500 | 5 | 5 | 7 | 30 | 300 | 900 |
| 8 | Delta | B | 170 | 500 | 8 | 4 | 7 | 30 | 300 | 900 |
| 9 | Epsilon | A | 50 | 250 | 10 | 1 | 8 | 25 | 100 | 300 |
kit
2 source rows · Download kit CSV
| sku TEXT | units INTEGER |
|---|---|
| A | 6 |
| B | 3 |
amendments
3 source rows · Download amendments CSV
| line TEXT | old_units INTEGER | new_units INTEGER | unit_cents INTEGER |
|---|---|---|---|
| L1 | 5 | 8 | 100 |
| L2 | 4 | 0 | 200 |
| L3 | 0 | 3 | 150 |
Field dictionary and schema
bids: id INTEGER — Stable source record identifier; not a row position. supplier TEXT — Literal business key or category label. Match exactly and retain NULL where present. sku TEXT — Literal business key or category label. Match exactly and retain NULL where present. unit_cents INTEGER — Exact integer monetary cents; no implicit currency conversion. shipping INTEGER — Fixed supplier order freight in cents. capacity INTEGER — Maximum quantity this bid can supply. moq INTEGER — Minimum nonzero order quantity. lead_days INTEGER — Elapsed delivery lead time in days. expires INTEGER — Expiry boundary; the goal declares whether equality is eligible. risk_low INTEGER — Lower supplier-level risk allowance in cents. risk_high INTEGER — Upper supplier-level risk allowance in cents. kit: sku TEXT — Literal business key or category label. Match exactly and retain NULL where present. units INTEGER — Physical unit quantity, not a monetary amount. amendments: line TEXT — Literal business key or category label. Match exactly and retain NULL where present. old_units INTEGER — Exact integer business measurement. Its specific business rule and eligibility are declared in the task. new_units INTEGER — Exact integer business measurement. Its specific business rule and eligibility are declared in the task. unit_cents INTEGER — Exact integer monetary cents; no implicit currency conversion.
A method you can reuse
- For kit quantities, choose each SKU lowest unit price ignoring capacity/MOQ, tie bid id. Report one row split_goods_cents,split_freight_cents using each winning supplier freight once,total_cents.
- For the first output record, split_goods_cents = 810; split_freight_cents = 750; total_cents = 1560.
- Inspect the source grain, keys and ties. Compare each result column with the full worked SQL and expected CSV.
Watch for this wrong turn
Assuming a supplier-level freight charge repeats for every awarded SKU overstates the split-buy scenario.
Run and check in SQLite
Your SQL runs locally in the existing SQLite worker. The checker compares every column, row, type, value and row order with this fixed output. It accepts equivalent SELECT or WITH queries. Browser storage keeps your SQL on this device when available.
Complete worked SQL and expected output
WITH r AS (SELECT b.*,k.units,ROW_NUMBER() OVER(PARTITION BY b.sku ORDER BY b.unit_cents,b.id) n FROM bids b JOIN kit k USING(sku)), w AS (SELECT * FROM r WHERE n=1), f AS (SELECT supplier,MAX(shipping) s FROM w GROUP BY supplier) SELECT (SELECT SUM(units*unit_cents) FROM w) split_goods_cents,(SELECT SUM(s) FROM f) split_freight_cents,(SELECT SUM(units*unit_cents) FROM w)+(SELECT SUM(s) FROM f) total_cents;
"split_goods_cents","split_freight_cents","total_cents" "810","750","1560"Reference SQL · Complete expected CSV · Empty answer CSV
Choose another SQL task · Original data exception cases · Larger workplace projects