SELECT TB1.stock_product_name AS Product_name
,(SELECT SUM(TB3.stock_product_quan) FROM stock AS TB3 WHERE TB3.stock_status = 'Export' AND TB3.stock_product_name = TB1.stock_product_name GROUP BY(TB3.stock_product_name)) AS StatusExport
,SUM(TB1.stock_product_quan) AS Total
FROM stock AS TB1
GROUP BY (TB1.stock_product_name)