select cs.prod_id, cs.product, cs.barcode, COALESCE(total,0) as TOTALQTY, COALESCE(sold,0) as SOLD, COALESCE(total-sold,0) as RMNG from product