← Workplace tasks

SQL workplace practice with files and complete answers

Choose a business question, inspect the original data, write a SQLite query and save a checked result. Related exercises share a scenario while asking for different decisions and output contracts.

Stock layers and movement evidence

Allocate issues to FIFO acquisition layers

All supplied issue sequences have no later receipt before an earlier shortage except SKU C with a terminal shortage. Allocate each issue across lots in received,id order, considering cumulative quantities. Return issue_id,lot_id,allocated_units for positive covered quantities only, sorted issue_id,lot_id.

Open task, files and full answers →

Workforce and service coverage

Assign two simultaneous roles at minimum crew cost

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.

Open task, files and full answers →

Start with the original ten data exception cases