Procurement tradeoffs and award evidence · Original fictional data · Free files and full answers
Compare single-supplier kit awards including one freight charge
A kit needs6A and3B. Every supplier must cover both SKU quantities within capacity and MOQ. Charge the supplier maximum quoted shipping once. Return supplier,goods_cents,freight_cents,total_cents sorted total,supplier.
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
- A kit needs6A and3B. Every supplier must cover both SKU quantities within capacity and MOQ. Charge the supplier maximum quoted shipping once. Return supplier,goods_cents,freight_cents,total_cents sorted total,supplier.
- 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 supplier, goods_cents, freight_cents, total_cents. Sort order follows the task. Output has 3 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
- A kit needs6A and3B. Every supplier must cover both SKU quantities within capacity and MOQ. Charge the supplier maximum quoted shipping once. Return supplier,goods_cents,freight_cents,total_cents sorted total,supplier.
- For the first output record, supplier = Gamma; goods_cents = 1350; freight_cents = 0; total_cents = 1350.
- Inspect the source grain, keys and ties. Compare each result column with the full worked SQL and expected CSV.
Watch for this wrong turn
Adding shipping on every kit line overstates a freight charge quoted once per supplier order.
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 x AS (SELECT b.supplier,SUM(k.units*b.unit_cents) goods,MAX(b.shipping) freight,COUNT(*) lines,SUM(k.units>=b.moq AND k.units<=b.capacity) feasible FROM bids b JOIN kit k USING(sku) GROUP BY b.supplier) SELECT supplier,goods goods_cents,freight freight_cents,goods+freight total_cents FROM x WHERE lines=(SELECT COUNT(*) FROM kit) AND feasible=lines ORDER BY total_cents,supplier;
"supplier","goods_cents","freight_cents","total_cents" "Gamma","1350","0","1350" "Alpha","1200","200","1400" "Beta","1080","350","1430"Reference SQL · Complete expected CSV · Empty answer CSV
Choose another SQL task · Original data exception cases · Larger workplace projects