Consider the following table :
id | Name | City
1 | Roger | Atlanta
2 | Roger | Atlanta
3 | Roger | Miami
4 | Roger | Miami
Now what I want is if I enter as an input the id 1, the output should be id 2 (the other one that is in the same City). I’ve tried making a self join on the ‘City’ column, but it’s not working.
Would this work correctly?