
CREATE TABLE department (
	"Department_ID" INTEGER, 
	"Name" TEXT, 
	"Creation" TEXT, 
	"Ranking" INTEGER, 
	"Budget_in_Billions" REAL, 
	"Num_Employees" REAL, 
	PRIMARY KEY ("Department_ID")
)


CREATE TABLE head (
	"head_ID" INTEGER, 
	name TEXT, 
	born_state TEXT, 
	age REAL, 
	PRIMARY KEY ("head_ID")
)


CREATE TABLE management (
	"department_ID" INTEGER, 
	"head_ID" INTEGER, 
	temporary_acting TEXT, 
	PRIMARY KEY ("department_ID", "head_ID"), 
	FOREIGN KEY("head_ID") REFERENCES head ("head_ID"), 
	FOREIGN KEY("department_ID") REFERENCES department ("Department_ID")
)

CREATE TABLE department (
	"Department_ID" INTEGER, 
	"Name" TEXT, 
	"Creation" TEXT, 
	"Ranking" INTEGER, 
	"Budget_in_Billions" REAL, 
	"Num_Employees" REAL, 
	PRIMARY KEY ("Department_ID")
)

/*
2 rows from department table:
Department_ID	Name	Creation	Ranking	Budget_in_Billions	Num_Employees
1	State	1789	1	9.96	30266.0
2	Treasury	1789	2	11.1	115897.0
*/


CREATE TABLE head (
	"head_ID" INTEGER, 
	name TEXT, 
	born_state TEXT, 
	age REAL, 
	PRIMARY KEY ("head_ID")
)

/*
2 rows from head table:
head_ID	name	born_state	age
1	Tiger Woods	Alabama	67.0
2	Sergio García	California	68.0
*/


CREATE TABLE management (
	"department_ID" INTEGER, 
	"head_ID" INTEGER, 
	temporary_acting TEXT, 
	PRIMARY KEY ("department_ID", "head_ID"), 
	FOREIGN KEY("head_ID") REFERENCES head ("head_ID"), 
	FOREIGN KEY("department_ID") REFERENCES department ("Department_ID")
)

/*
2 rows from management table:
department_ID	head_ID	temporary_acting
2	5	Yes
15	4	Yes
*/
List the creation year, name and budget of each department.
SELECT creation ,  name ,  budget_in_billions FROM department
[{'Creation': '1789', 'Name': 'State', 'Budget_in_Billions': 9.96}, {'Creation': '1789', 'Name': 'Treasury', 'Budget_in_Billions': 11.1}, {'Creation': '1947', 'Name': 'Defense', 'Budget_in_Billions': 439.3}, {'Creation': '1870', 'Name': 'Justice', 'Budget_in_Billions': 23.4}, {'Creation': '1849', 'Name': 'Interior', 'Budget_in_Billions': 10.7}, {'Creation': '1889', 'Name': 'Agriculture', 'Budget_in_Billions': 77.6}, {'Creation': '1903', 'Name': 'Commerce', 'Budget_in_Billions': 6.2}, {'Creation': '1913', 'Name': 'Labor', 'Budget_in_Billions': 59.7}, {'Creation': '1953', 'Name': 'Health and Human Services', 'Budget_in_Billions': 543.2}, {'Creation': '1965', 'Name': 'Housing and Urban Development', 'Budget_in_Billions': 46.2}, {'Creation': '1966', 'Name': 'Transportation', 'Budget_in_Billions': 58.0}, {'Creation': '1977', 'Name': 'Energy', 'Budget_in_Billions': 21.5}, {'Creation': '1979', 'Name': 'Education', 'Budget_in_Billions': 62.8}, {'Creation': '1989', 'Name': 'Veterans Affairs', 'Budget_in_Billions': 73.2}, {'Creation': '2002', 'Name': 'Homeland Security', 'Budget_in_Billions': 44.6}]