i changed the sql to :
SELECT Quantity - (SELECT Coalesce(SUM(DetailQuantity),0) FROM ProductBatch, orders Inner Join orderdetails ON orderdetails.DetailOrderID = orders.OrderID WHERE OrderDate > ProductUpdateDate AND DetailProductID = Products.ID) AS RemainingInventory FROM products WHERE ProductID = %s
as my Quantity is present on ProductBatch table & column as Quantity.
But in cart i m getting error as : Unknown column 'Quantity' in 'field list'