I have the following table:
create table Likes(ID1 number(5), ID2 number(5));
insert into Likes values(1689, 1709);
insert into Likes values(1709, 1689);
insert into Likes values(1782, 1709);
insert into Likes values(1911, 1247);
insert into Likes values(1247, 1468);
insert into Likes values(1641, 1468);
insert into Likes values(1316, 1304);
insert into Likes values(1501, 1934);
insert into Likes values(1934, 1501);
insert into Likes values(1025, 1101);
The table shows the "liked" users identified by their identifiers. Liking is a one-way connection (if ID1 likes ID2, this does not mean that TD2 likes ID1).
I want to find those IDs where there is a two-way connection (where the "liker" is "liked" by the user he loves).
I am starting with Oracle SQL, I hope my question is not that corny ...
source
share