Tables:
PERSON
Has_Visited
Belongs_To
Based on following information, create this question:
What is the name of the persons that have visited the city "London"?
Select p.Name from person p,has_visited hs where p.ssn= hs.ssn and hs.city= 'LONDON'
Just use the in operator:
in
SELECT name FROM person WHERE ssn IN (SELECT ssn FROM has_visited WHERE city = 'London');