Problem
Keeping popular products in stock is critical for e-commerce — running out means missed sales and frustrated customers. Warehouse teams set reorder triggers so that when stock drops below a threshold, a purchase order is automatically queued. This query surfaces all items that have fallen below the critical level of 10 units so the team can prioritize restocking. Using the products table, return id, name, and stock_quantity for all products with fewer than 10 units in stock, ordered by stock_quantity ascending.
Schema
products
| column | type |
|---|
| id | INTEGER |
| name | TEXT |
| category | TEXT |
| price | NUMERIC |
| stock_quantity | INTEGER |
Sample Data
| id | name | stock_quantity |
|---|
| 1 | Widget | 3 |
| 2 | Gadget | 15 |
| 3 | Doohickey | 0 |
| 4 | Thingamajig | 7 |
Expected Output
| id | name | stock_quantity |
|---|
| 3 | Doohickey | 0 |
| 1 | Widget | 3 |
| 4 | Thingamajig | 7 |