i want to calculate the quantity when the product is sale that come in stock table with product_id and quantity add in stock_out
and when the purchase then quantity add in Stock_in can u plz tell me how to make the query to know the quantity
SELECT TOP 1000 [id]
,[product_id],[stock_date]
,[stock_in]
,[stock_out]
,[vocher_type]
,[vocher_id]
FROM [OnlineTradingFinal].[dbo].[Stock]


Joginder BangerRank #360 · 7K reputationPosted Jul 30, 2016, 9:05 PM EDT