Can someone please help me on a sql query where there’s a table such as
Col A | Col B
-------------
A B
C D
E F
B A
how do I remove {B, A} or select {B, A}
The question is:
If two students A and B are friends, and A likes B but not vice-versa,
remove the Likes tuple.
I have figured out the table where A and B are friends and A likes B, but I don’t know how to remove the B likes A tuple
I have
select friend.id1, friend.id2
from friend, likes
where friend.id1 = likes.id1 and friend.id2 = likes.id2
I’ve seen this homework assignment before…
Try to figure these out on your own — or if you can’t, try searching Google.