I’m trying to execute a query in an Oracle 10g DB to join two subqueries as it follows:
SELECT * FROM(
select count(y), x from a group by y) t1
full join
(select count(z), x from b group by z) t2
on (t1.x = t2.x)
The problem is that the output shows two different columns for x as it follows:
y z x x1
-------------------------------------------
2 4 1 1
3 (null) 2 (null)
2 (null) 3 (null)
8 (null) 4 (null)
(null) 4 (null) 5
(null) 6 (null) 6
Does anyone can help me? Thanks in advance!
I suspect that what you want is: