Exercise · SQL & Querying
Predict, then run it
Predict the output
stock(sku, qty) = (A,10),(B,5). disc(sku) = (B). Apply the discontinued list — a scoped joined DELETE, not the whole table:
DELETE FROM stock USING disc d WHERE stock.sku = d.sku; SELECT sku, qty FROM stock ORDER BY sku;
Predict the exact output (the stock table after).