I have the following SQL result set (as result of a join FWIW):
A,C
B,E
C,A
D,A
Every value represents a node. So the total set of nodes involved is A,B,C,D,E. Every row describes a directed edge.
A -> C
B -> E
C -> A
D -> A
Of course this can be simplified to
A <-> C
B -> E
D -> A
Now I would like to filter out the rows that do not have a bi-directional counterpart. So the final result set should be
A,C
C,A
or
A,C
in this case.
I am looking the best way to express this in SQL.