Hi, My requirement is to merge ( not concat ) two columns and count number of distinct records. I can use self-join on column A and column B and can count number of records. But looks not optimal way of doing. Is there any better way to do.
Ex: Original table
Column A
COLUMN B
1
2
2
3
5
6
4
7
1
2
4
2
Logic something like this: Count(Distinct(Merge (distinct(A),distinct(B))))
Query OUTPUT should be :7
Values {1,2,3,4,5,6,7}
Thanks,
Chandra
