I have two queries:
str = "select sum(Quantity) from AddStock where ProductId=" +id.ToString() + " AND Type IN('Purchase','StockInward','Sale Return') AND EntryMode='Godown'";
Qty = dc.Retrieve_Datareader(str);
str = "select sum(Quantity) from AddStock where ProductId=" +id.ToString() + " AND Type IN('StockOutward','Sale','Wastage','Purchase Return') AND EntryMode='Godown'";
Qty1 = dc.Retrieve_Datareader(str);
return(Qty - Qty1);
How do I write the above two queries in one query and get the difference?