CREATE TABLE personfriend (name TEXT, friend TEXT, year DECIMAL)
CREATE TABLE person (name TEXT, age DECIMAL, city TEXT, gender TEXT, job TEXT)

What are the different names and ages of every friend of either Dan or alice?
SELECT DISTINCT T1.name, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'
SELECT DISTINCT "T1"."name", "T1"."age" FROM "person" AS "T1" JOIN "personfriend" AS "T2" ON "T1"."name" = "T2"."name" AND ("T2"."friend" = 'Alice' OR "T2"."friend" = 'Dan')