 <p>It's not entirely clear what you're asking in the question and the comments, but it sounds like you might be looking for a full join with a bunch of coalesce statements, e.g.:</p> <pre><code>-- create view at your option, e.g.: -- create view combined_query as select coalesce(a.id, b.id) as id, coalesce(a.delta, b.delta) as delta, a.metric1 as metric1, b.metric2 as metric2, coalesce(a.metric1,0) + coalesce(b.metric2,0) as combined from (...) as results_a a full join (...) as results_b b on a.id = b.id -- and a.delta = b.delta maybe? </code></pre>