I need help with a SQL Query
I have this table
likes
friend friend2
1 2
2 1
3 1
4 5
I need to select only one pair of the friends that like each other.
With my current select I'm obtaining this
id name id name
1709 Cassandra 1689 Gabriel
1689 Gabriel 1709 Cassandra
1501 Jessica 1934 Kyle
1934 Kyle 1501 Jessica
but the expected query result is:
id name id name
1709 Cassandra 1689 Gabriel
1501 Jessica 1934 Kyle