Imran Bashir

Imran Bashir

  • NA
  • 186
  • 13.5k

Query to calculate Quantity on Hand

Jul 30 2016 2:23 PM
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]

Answers (1)