CREATE TABLE head (age VARCHAR2, head_id VARCHAR2)
CREATE TABLE management (head_id VARCHAR2, temporary_acting VARCHAR2)

What are the distinct ages of the heads who are acting?
SELECT DISTINCT T1.age FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = 'Yes'
SELECT DISTINCT "T1"."age" FROM "management" "T2" JOIN "head" "T1" ON "T1"."head_id" = "T2"."head_id" WHERE "T2"."temporary_acting" = 'Yes'