Your question is Low-Stock Items via SQL Join. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Write a SQL query to join our inventory and sales tables to identify low-stock items.
Use current_stock and reorder_level to identify products at or below their reorder level. Summarize sales from January 2025, including products with no qualifying sales.
product_id, product_name, current_stock, reorder_level, and total_units_soldcurrent_stock ascending, then product_id ascending| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique product identifier |
| product_name | VARCHAR(100) | Product name |
| current_stock | INT | Units currently available |
| reorder_level | INT | Stock level that triggers replenishment |
| Column | Type | Description |
|---|---|---|
| sale_idPK | INT | Unique sale identifier |
| product_id | INT | Product sold |
| sale_date | DATE | Date of sale |
| quantity | INT | Number of units sold |