I know this question has already asked here, but I can't figure this one out from the previous answers.
We've got 2 tables:
members
-----------------------
| id | country_iso_3 |
-----------------------
1 USA
2 DZA
3 FRA
4 ILI
5 USA
6 USA
members_details
-----------------------
| member_id | city |
-----------------------
1 AA
2 BB
3 CC
4 DD
5 EE
6 FF
Now I want to query members_details and select the cities which are from the same countries, here "AA", "EE" and "FF" should be the results (because the members are from USA)
I know how to compare different cols from different tables, but here we need to check the second table 'member_id' and the first table 'id (country_iso_3)' somehow!