Can you please tell me who the friends of Alice's friends are?
select distinct t4.name from personfriend as t1 join person as t2 on t1.name = t2.name join personfriend as t3 on t1.friend = t3.name join personfriend as t4 on t3.friend = t4.name where t2.name = 'Alice' and t4.name ! = 'Alice'
What city does Zach live in?
select city from person where name = "Zach"
What are the names of everyone else who lives in Austin?
select name from person where city = "austin"
Who are Zach's friends?
select friend from personfriend where name = "Zach"
What are their jobs?
select name, job from person where name in ( select friend from personfriend where name = "Zach" )