Check out example codes for "how to find symmetric pairs in sql". It will help you in understanding the concepts better.

Code Example 1

SELECT f1.X, f1.Y FROM Functions AS f1 WHERE f1.X = f1.Y GROUP BY f1.X, f1.Y HAVING COUNT(*) > 1

Learn ReactJs, React Native from akashmittal.com