Hi Peter,
My fingers where itching to try another query
...what do think of the following query...
SELECT root.ID, root.total + NVL(branch.total, 0)
FROM (SELECT ID AS ID, SUM (production) AS total
FROM table_a
GROUP BY ID) root,
(SELECT home_id AS ID, SUM (production) AS total
FROM table_a, table_b
WHERE ID = branch_id
GROUP BY home_id) branch
WHERE root.ID = branch.ID(+)
Kind regards,
Gian