My table has 5 columns, one of those is named country_visited and another one is called name. In one of the rows I have Mexico and Jose, in another row I have Mexico and John. I want to retrieve back the country that both Jose and John have in common.
SELECT country_visited
FROM table
WHERE name = "Jose" AND name = "John" AND country_visited = country_visited