Task: Text to Code
Input (English): Step 1: find the Person's name, age of Person table for which job equals Dan.
Step 2: For each row in Person table, find the corresponding rows in PersonFriend table.
Step 3: find Person's name, age of the results of step 2 whose friend equals Alice.
Step 4: show the rows that are in both the results of step 1 and the results of step 3
Output (English): SELECT T1.name , T1.age FROM Person AS T1 WHERE T1.job = "Dan" INTERSECT SELECT T1.name , T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = "Alice"