Level 8 - PrincipalDebugging Questionsm2 consistency transactions scale
Debug Negative Inventory Risk
Fix SQL to avoid negative stock: UPDATE inventory SET qty = qty - 5 WHERE sku='SKU-9';
Schema Context
inventory(sku, qty, updated_at)
Fix SQL to avoid negative stock: UPDATE inventory SET qty = qty - 5 WHERE sku='SKU-9';
inventory(sku, qty, updated_at)