Find stock held in warehouse B and running low (hardware)
Keep rows in warehouse WH-B where OnHand is below the reorder level.
- Level
- beginner
- Time
- ~6 min
- Task
- Build the query
- Access
- Free — no account needed
Loading the practice workspace…
About this exercise
What you'll practise
Combine a text condition with a comparison between two columns.
Tinker Depot (fictional) runs two warehouses for hardware supplies and exports stock levels nightly.
Steps
- Keep rows where
WarehouseisWH-BandOnHandis less thanReorderLevel. - Keep all columns.
Your result must
- Only WH-B rows
- Every kept row has OnHand < ReorderLevel
- All columns
Input
- Stock (table)
- SKU: text
- Item: text
- Warehouse: text
- OnHand: number
- ReorderLevel: number
- Supplier: text
- UnitCost: number
Expected output columns
SKU (text), Item (text), Warehouse (text), OnHand (number), ReorderLevel (number), Supplier (text), UnitCost (number)
| SKU | Item | Warehouse | OnHand | ReorderLevel | Supplier | UnitCost |
|---|---|---|---|---|---|---|
| SKU-004 | Sandpaper | WH-B | 15 | 40 | Bolt & Co | 1.33 |