We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Assign row numbers using ROW_NUMBER() to prevent self-joins and ensure each row is uniquely identifiable.
The join condition finds symmetric pairs (X1 = Y2, X2 = Y1), and f1.rn < f2.rn avoids joining a row with itself and also make sures that X1 < X2 and Y1 > Y2.
Symmetric Pairs
You are viewing a single comment's thread. Return to all comments →