Stačí použít NOT IN
najít záznamy, které se neshodují s new_table g
a shromáždit se záznamy získanými pomocí INNER JOIN
SELECT f.id_hist, f.producto, f.price
FROM TABLE(fnc_historical('JAP')) f
WHERE f.id_hist NOT IN
(SELECT DISTINCT f.id_hist
FROM TABLE(fnc_historical('JAP')) f
inner join new_table g on (f.id_new = g.id_hist)
)
UNION
SELECT f.id_hist, f.producto, g.new_price
FROM TABLE(fnc_historical('JAP')) f
inner join new_table g on (f.id_new = g.id_hist)