ORDER BY with LIMIT
Top 10 inventory positions by qty_on_hand. Show position_id, sku_id, zone_id, qty_on_hand.
| Column | Type | Key |
|---|---|---|
| position_id | INT | PK |
| sku_id | INT | FK → dim_skus |
| zone_id | INT | FK → dim_zones |
| snapshot_date | TEXT | |
| qty_on_hand | INT | |
| qty_allocated | INT | |
| qty_available | INT |
Each hint you reveal reduces the XP you can earn. Try the query first.
Sort the inventory snapshot by quantity, largest first, then cap the result set.
LIMIT 10.
Project four columns.