human
Schema:
department (Department_ID, Name, Creation, Ranking, Budget_in_Billions, Num_Employees)
head (head_ID, name, born_state, age)
management (department_ID, head_ID, temporary_acting)
Please answer with SQL.
assistant
Sure, I understand.
human
How many heads are temporary acting?
assistant
SELECT COUNT( * ) FROM management WHERE temporary_acting = 'Yes';
human
What are their names?
assistant
SELECT T1.name FROM management AS T2 JOIN head AS T1 ON T1.head_id = T2.head_id WHERE T2.temporary_acting = "Yes" ;