 <p>Another approach is to use <code>union all</code> with aggregation:</p> <pre><code>SELECT y1, cnt1, y2, cnt2 FROM ((SELECT EXTRACT(YEAR FROM Tab_1.DATE_STMP) as y1, COUNT(*) as cnt1, NULL as y2, NULL as cnt2 FROM EMP_1 Tab_1 GROUP BY EXTRACT(YEAR FROM Tab_1.DATE_STMP) EMP_2@LINK Tab_2 ) UNION ALL (SELECT NULL, NULL, EXTRACT(YEAR FROM Tab_2.DATE_STMP) as y2, COUNT(*) as cnt2 FROM EMP_1 Tab_2 GROUP BY EXTRACT(YEAR FROM Tab_2.DATE_STMP) ) ) GROUP BY COALESCE(y1, y2) </code></pre>