to try
SELECT sum( processed_weight ) AS total_qty FROM supplier_inward a INNER JOIN warehouseb ON a.id = b.supplier WHERE a.master_product_id = '38'
EDIT 2 - AFTER a comment from OP, changing the structure of the result:
For an extra column, try:
SELECT X.supplier, X.total_qty, (SELECT sum( processed_weight ) FROM supplier_inward a INNER JOIN warehouseb ON a.id = b.supplier WHERE a.master_product_id = '38') AS totalq FROM ( SELECT a.id AS supplier, sum( processed_weight ) AS total_qty, FROM supplier_inward a INNER JOIN warehouseb ON a.id = b.supplier WHERE a.master_product_id = '38' GROUP BY b.supplier) AS X
For an additional line:
SELECT a.id AS supplier, sum( processed_weight ) AS total_qty FROM supplier_inward a INNER JOIN warehouseb ON a.id = b.supplier WHERE a.master_product_id = '38' GROUP BY b.supplier UNION ALL SELECT null, X.total_qty FROM ( SELECT sum( processed_weight ) AS total_qty FROM supplier_inward a INNER JOIN warehouseb ON a.id = b.supplier WHERE a.master_product_id = '38' ) AS X
source share