Hmm, I want to know which friends are above 40 years old or below 30 years old. | do you mean the name of the person who has friends with age above 40 and under age 30? | I want to know the ages of the friends first, please.
SELECT T2.friend, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend
friends who are above 40 years old or below 30 years old refers to age > 40 OR age < 30; want to know the ages of the friends refers to SELECT age;