W
Wantula
I Have the following SQL ststements the first one is giving me the total
stock available and the next one is giving me the total stock sold out.
How can i subtract the results of the second SQL statement from the first
one, so that I know the Stock remaining.What SQL statement can I use?
SELECT Stock.Item, Sum(Stock.Quantity) AS SumOfQuantity
FROM Stock
GROUP BY Stock.Item;
SELECT SaleDetail.[Item Bought], Sum(SaleDetail.Quantity) AS SumOfQuantity
FROM SaleDetail
GROUP BY SaleDetail.[Item Bought];
stock available and the next one is giving me the total stock sold out.
How can i subtract the results of the second SQL statement from the first
one, so that I know the Stock remaining.What SQL statement can I use?
SELECT Stock.Item, Sum(Stock.Quantity) AS SumOfQuantity
FROM Stock
GROUP BY Stock.Item;
SELECT SaleDetail.[Item Bought], Sum(SaleDetail.Quantity) AS SumOfQuantity
FROM SaleDetail
GROUP BY SaleDetail.[Item Bought];