Task 1
First i have a specific user, I want to see with which user it is connected to. lets say alex in following table. I want to check if alex is connected to another user? In following table it is connected with John and christina, so i select john and christina.
Task 2
Now I have another user. Lets say martin, I want to see which of the previous selected users (john and christina) are connected with the martin.
ID user1 user2 status
1 alex john 1
2 john martin 1
3 Jane smith 1
4 smith john 1
5 christina alex 1
For example, in above table:
People who are connected to alex are john and christina. We want to check which of the users (john and christina) are connected with martin. and the result should be row2.