tratar
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 - Después del comentario de OP cambiar la estructura de resultados:
Para un intento columna adicional:
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
Para una fila additonal:
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
¿Lo necesita como un complemento? fila en el mismo resultado? ¿O quieres ejecutar un segundo SELECT? –
yup @a_horse_with_no_name – Ghostman
* yup * qué? Hice dos preguntas. –