Svara på din kommentar nedan:
UPDATE inventory a
JOIN (select ProdName, sum(Quantity) Quantity from inprod group by ProdName) b on a.ProdName=b.ProdName
JOIN (select ProdName, sum(Quantity) Quantity from outprod group by ProdName) c on a.ProdName=c.ProdName
SET a.Quantity = c.Quantity-b.Quantity
WHERE a.ProdName='Chocolate'