Question: How about the names of different persons who have friends with age above 40 and under age 30?
SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN  ( SELECT name FROM Person WHERE age > 40 )  union SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN  ( SELECT name FROM Person WHERE age < 30 )