
CREATE TABLE company (
	"Company_ID" REAL, 
	"Name" TEXT, 
	"Headquarters" TEXT, 
	"Industry" TEXT, 
	"Sales_in_Billion" REAL, 
	"Profits_in_Billion" REAL, 
	"Assets_in_Billion" REAL, 
	"Market_Value_in_Billion" REAL, 
	PRIMARY KEY ("Company_ID")
)


CREATE TABLE employment (
	"Company_ID" INTEGER, 
	"People_ID" INTEGER, 
	"Year_working" INTEGER, 
	PRIMARY KEY ("Company_ID", "People_ID"), 
	FOREIGN KEY("People_ID") REFERENCES people ("People_ID"), 
	FOREIGN KEY("Company_ID") REFERENCES company ("Company_ID")
)


CREATE TABLE people (
	"People_ID" INTEGER, 
	"Age" INTEGER, 
	"Name" TEXT, 
	"Nationality" TEXT, 
	"Graduation_College" TEXT, 
	PRIMARY KEY ("People_ID")
)

CREATE TABLE company (
	"Company_ID" REAL, 
	"Name" TEXT, 
	"Headquarters" TEXT, 
	"Industry" TEXT, 
	"Sales_in_Billion" REAL, 
	"Profits_in_Billion" REAL, 
	"Assets_in_Billion" REAL, 
	"Market_Value_in_Billion" REAL, 
	PRIMARY KEY ("Company_ID")
)

/*
2 rows from company table:
Company_ID	Name	Headquarters	Industry	Sales_in_Billion	Profits_in_Billion	Assets_in_Billion	Market_Value_in_Billion
1.0	ExxonMobil	USA	Oil and gas	433.5	41.1	331.1	407.4
2.0	JPMorgan Chase	USA	Banking	110.8	19.0	2265.8	170.1
*/


CREATE TABLE employment (
	"Company_ID" INTEGER, 
	"People_ID" INTEGER, 
	"Year_working" INTEGER, 
	PRIMARY KEY ("Company_ID", "People_ID"), 
	FOREIGN KEY("People_ID") REFERENCES people ("People_ID"), 
	FOREIGN KEY("Company_ID") REFERENCES company ("Company_ID")
)

/*
2 rows from employment table:
Company_ID	People_ID	Year_working
11	3	2
13	2	3
*/


CREATE TABLE people (
	"People_ID" INTEGER, 
	"Age" INTEGER, 
	"Name" TEXT, 
	"Nationality" TEXT, 
	"Graduation_College" TEXT, 
	PRIMARY KEY ("People_ID")
)

/*
2 rows from people table:
People_ID	Age	Name	Nationality	Graduation_College
1	27	Reggie Lewis	United States	Northeastern
2	25	Brad Lohaus	United States	Iowa
*/
What is the maximum and minimum market value of companies?
SELECT max(Market_Value_in_Billion) ,  min(Market_Value_in_Billion) FROM company
[{'max(Market_Value_in_Billion)': 407.4, 'min(Market_Value_in_Billion)': 79.5}]