Who is from Chicago?
select name from person where city = 'chicago'
How about New York City?
select name from person where city = 'new york city'
How many are there?
select count(*) from person where city = 'new york city'
Who is friends with these people?
select t2.name from person as t1 join personfriend as t2 on t1.name = t2.friend where t1.city = 'new york city'