
CREATE TABLE employee (
	"Employee_ID" INTEGER, 
	"Name" TEXT, 
	"Age" INTEGER, 
	"City" TEXT, 
	PRIMARY KEY ("Employee_ID")
)


CREATE TABLE evaluation (
	"Employee_ID" TEXT, 
	"Year_awarded" TEXT, 
	"Bonus" REAL, 
	PRIMARY KEY ("Employee_ID", "Year_awarded"), 
	FOREIGN KEY("Employee_ID") REFERENCES employee ("Employee_ID")
)


CREATE TABLE hiring (
	"Shop_ID" INTEGER, 
	"Employee_ID" INTEGER, 
	"Start_from" TEXT, 
	"Is_full_time" BOOLEAN, 
	PRIMARY KEY ("Employee_ID"), 
	FOREIGN KEY("Employee_ID") REFERENCES employee ("Employee_ID"), 
	FOREIGN KEY("Shop_ID") REFERENCES shop ("Shop_ID")
)


CREATE TABLE shop (
	"Shop_ID" INTEGER, 
	"Name" TEXT, 
	"Location" TEXT, 
	"District" TEXT, 
	"Number_products" INTEGER, 
	"Manager_name" TEXT, 
	PRIMARY KEY ("Shop_ID")
)

CREATE TABLE employee (
	"Employee_ID" INTEGER, 
	"Name" TEXT, 
	"Age" INTEGER, 
	"City" TEXT, 
	PRIMARY KEY ("Employee_ID")
)

/*
2 rows from employee table:
Employee_ID	Name	Age	City
1	George Chuter	23	Bristol
2	Lee Mears	29	Bath
*/


CREATE TABLE evaluation (
	"Employee_ID" TEXT, 
	"Year_awarded" TEXT, 
	"Bonus" REAL, 
	PRIMARY KEY ("Employee_ID", "Year_awarded"), 
	FOREIGN KEY("Employee_ID") REFERENCES employee ("Employee_ID")
)

/*
2 rows from evaluation table:
Employee_ID	Year_awarded	Bonus
1	2011	3000.0
2	2015	3200.0
*/


CREATE TABLE hiring (
	"Shop_ID" INTEGER, 
	"Employee_ID" INTEGER, 
	"Start_from" TEXT, 
	"Is_full_time" BOOLEAN, 
	PRIMARY KEY ("Employee_ID"), 
	FOREIGN KEY("Employee_ID") REFERENCES employee ("Employee_ID"), 
	FOREIGN KEY("Shop_ID") REFERENCES shop ("Shop_ID")
)

/*
2 rows from hiring table:
Shop_ID	Employee_ID	Start_from	Is_full_time
1	1	2009	True
1	2	2003	True
*/


CREATE TABLE shop (
	"Shop_ID" INTEGER, 
	"Name" TEXT, 
	"Location" TEXT, 
	"District" TEXT, 
	"Number_products" INTEGER, 
	"Manager_name" TEXT, 
	PRIMARY KEY ("Shop_ID")
)

/*
2 rows from shop table:
Shop_ID	Name	Location	District	Number_products	Manager_name
1	FC Haka	Valkeakoski	Tehtaan kenttä	3516	Olli Huttunen
2	HJK	Helsinki	Finnair Stadium	10770	Antti Muurinen
*/
Find the districts in which there are both shops selling less than 3000 products and shops selling more than 10000 products.
SELECT district FROM shop WHERE Number_products  <  3000 INTERSECT SELECT district FROM shop WHERE Number_products  >  10000
[{'Nenhum': 'Nenhum resultado encontrado'}]