select store_id, item_id, itemname, unit_name, coalesce(sum(quantity),0) as qty
from fx_store_stock_view
where
store_id = 11 AND
firm_id = 1 AND
quantity > 0 AND
itemdisabled<>1 and item_id = 107 group by store_id,item_id
SELECT store_id,
item_id,
itemname,
unit_name,
COALESCE(SUM(quantity), 0) AS qty
FROM fx_store_stock_view
WHERE store_id = 11
AND firm_id = 1
AND itemdisabled <> 1
AND item_id = 107
GROUP BY store_id, item_id
HAVING qty > 0;