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
Show me the departments managed by heads whose temporary acting value is 'Yes', please | The table shows the ids of departments managed by heads whose temporary acting value is 'Yes'. | Great, could you tell me the name and number of employees within those departments?
assistant
SELECT T1.name , T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes';
human
Awesome, could you show me the budget of those departments?
assistant
SELECT Budget_in_Billions FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = 'Yes';
human
Could you tell me when those departments were founded, and display the name next to each founding year?
assistant
SELECT Creation , Name FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id WHERE T2.temporary_acting = "Yes" ;