I'm trying to select two distinct numbers id1 and id2 from the following table:
tb_table1( bigint id1 bigint id2 bigint userid)
if I do
select distinct id1, id2 from tb_table1
I'll get, for example, two rows, (111, 222) and (222,111).
I only want one of those rows since I don't care which column, id1, or id2 that the result gets returned in. Basically, I want distinct pairs where order doesn't matter.
Thoughts? Thanks in advance.