Symmetric Pairs

  • + 0 comments

    SELECT distinct F1.X, F1.Y from Functions F1 join Functions F2 on F1.X = F2.Y and F1.Y = F2.X Where F1.X < F1.Y union all ( select distinct X, Y from Functions where X=Y group by X,Y having Count(*)>1 ) order by F1.X