text: CREATE TABLE management (department_id VARCHAR, head_id VARCHAR); CREATE TABLE head (born_state VARCHAR, head_id VARCHAR); CREATE TABLE department (department_id VARCHAR, name VARCHAR) -- List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born. SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Treasury' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T1.name = 'Homeland Security' CREATE TABLE management (department_id VARCHAR); CREATE TABLE department (department_id VARCHAR, name VARCHAR) -- Which department has more than 1 head at a time? List the id, name and the number of heads. SELECT T1.department_id, T1.name, COUNT(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id = T2.department_id GROUP BY T1.department_id HAVING COUNT(*) > 1 CREATE TABLE head (head_id VARCHAR, name VARCHAR) -- Which head's name has the substring 'Ha'? List the id and name. SELECT head_id, name FROM head WHERE name LIKE '%Ha%' CREATE TABLE farm (Id VARCHAR) -- How many farms are there? SELECT COUNT(*) FROM farm CREATE TABLE farm (Total_Horses VARCHAR) -- List the total number of horses on farms in ascending order. SELECT Total_Horses FROM farm ORDER BY Total_Horses