Assign two simultaneous roles at minimum crew cost Original fictional practice · CC BY 4.0 · 2026-11-11 TASK For a separate prospective one-hour crew, assign one lead and one desk worker using skills and crew_cost. One employee cannot occupy both simultaneous roles. Ignore historical shifts in this prospective assignment. Return lead_employee,desk_employee,hourly_total_cents for the cheapest pair; tie by lead then desk name. OUTPUT lead_employee, desk_employee, hourly_total_cents RULES For a separate prospective one-hour crew, assign one lead and one desk worker using skills and crew_cost. One employee cannot occupy both simultaneous roles. Ignore historical shifts in this prospective assignment. Return lead_employee,desk_employee,hourly_total_cents for the cheapest pair; tie by lead then desk name. 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. FIELD DICTIONARY shifts: id INTEGER — Stable source record identifier; not a row position. employee TEXT — Literal business key or category label. Match exactly and retain NULL where present. day INTEGER — Integer day index, or ISO YYYY-MM-DD date when stored as text; the task declares cutoff semantics. start INTEGER — Beginning boundary; inclusive under the task interval policy. end INTEGER — Ending boundary; exclusive unless the goal states otherwise. break_minutes INTEGER — Unpaid break duration deducted from the shift elapsed minutes. role TEXT — Literal business key or category label. Match exactly and retain NULL where present. skills: employee TEXT — Literal business key or category label. Match exactly and retain NULL where present. skill TEXT — Literal business key or category label. Match exactly and retain NULL where present. leave_events: id INTEGER — Stable source record identifier; not a row position. employee TEXT — Literal business key or category label. Match exactly and retain NULL where present. days INTEGER — Exact integer business measurement. Its specific business rule and eligibility are declared in the task. kind TEXT — Literal business key or category label. Match exactly and retain NULL where present. crew_cost: employee TEXT — Literal business key or category label. Match exactly and retain NULL where present. hourly_cents INTEGER — Exact integer monetary cents; no implicit currency conversion. METHOD For a separate prospective one-hour crew, assign one lead and one desk worker using skills and crew_cost. One employee cannot occupy both simultaneous roles. Ignore historical shifts in this prospective assignment. Return lead_employee,desk_employee,hourly_total_cents for the cheapest pair; tie by lead then desk name. For the first output record, lead_employee = Ann; desk_employee = Dee; hourly_total_cents = 1500. Inspect the source grain, keys and ties. Compare each result column with the full worked SQL and expected CSV. COMMON WRONG TURN Picking the cheapest qualified person for each role independently assigns Ann to both simultaneous positions and violates the distinct-worker constraint. RESULT CHECK For the first output record, lead_employee = Ann; desk_employee = Dee; hourly_total_cents = 1500. Use setup.sql in a fresh SQLite database and run your own SELECT or WITH. reference.sql and expected.csv contain the full worked answer. All CSVs have UTF-8 headers; empty output fields represent NULL. The browser executes SQLite, not Excel formulas. No spreadsheet function engine is claimed.