
CREATE TABLE appellations (
	"No" INTEGER, 
	"Appelation" TEXT, 
	"County" TEXT, 
	"State" TEXT, 
	"Area" TEXT, 
	"isAVA" TEXT, 
	PRIMARY KEY ("No"), 
	UNIQUE ("Appelation")
)


CREATE TABLE grapes (
	"ID" INTEGER, 
	"Grape" TEXT, 
	"Color" TEXT, 
	PRIMARY KEY ("ID"), 
	UNIQUE ("Grape")
)


CREATE TABLE wine (
	"No" INTEGER, 
	"Grape" TEXT, 
	"Winery" TEXT, 
	"Appelation" TEXT, 
	"State" TEXT, 
	"Name" TEXT, 
	"Year" INTEGER, 
	"Price" INTEGER, 
	"Score" INTEGER, 
	"Cases" INTEGER, 
	"Drink" TEXT, 
	FOREIGN KEY("Grape") REFERENCES grapes ("Grape"), 
	FOREIGN KEY("Appelation") REFERENCES appellations ("Appelation")
)

CREATE TABLE appellations (
	"No" INTEGER, 
	"Appelation" TEXT, 
	"County" TEXT, 
	"State" TEXT, 
	"Area" TEXT, 
	"isAVA" TEXT, 
	PRIMARY KEY ("No"), 
	UNIQUE ("Appelation")
)

/*
2 rows from appellations table:
No	Appelation	County	State	Area	isAVA
1	Alexander Valley	Sonoma	California	North Coast	Yes
2	Amador County	Amador	California	Sierra Foothills	No
*/


CREATE TABLE grapes (
	"ID" INTEGER, 
	"Grape" TEXT, 
	"Color" TEXT, 
	PRIMARY KEY ("ID"), 
	UNIQUE ("Grape")
)

/*
2 rows from grapes table:
ID	Grape	Color
1	Barbera	Red
2	Cabernet Franc	Red
*/


CREATE TABLE wine (
	"No" INTEGER, 
	"Grape" TEXT, 
	"Winery" TEXT, 
	"Appelation" TEXT, 
	"State" TEXT, 
	"Name" TEXT, 
	"Year" INTEGER, 
	"Price" INTEGER, 
	"Score" INTEGER, 
	"Cases" INTEGER, 
	"Drink" TEXT, 
	FOREIGN KEY("Grape") REFERENCES grapes ("Grape"), 
	FOREIGN KEY("Appelation") REFERENCES appellations ("Appelation")
)

/*
2 rows from wine table:
No	Grape	Winery	Appelation	State	Name	Year	Price	Score	Cases	Drink
1	Zinfandel	Robert Biale	St. Helena	California	Old Kraft Vineyard	2008	44	93	275	now
2	Zinfandel	Chiarello Family	Napa Valley	California	Giana	2008	35	93	480	now
*/
What are the prices of wines produced before the year of 2010?
SELECT Price FROM WINE WHERE YEAR  <  2010
[{'Price': 44}, {'Price': 35}, {'Price': 40}, {'Price': 38}, {'Price': 44}, {'Price': 15}, {'Price': 18}, {'Price': 48}, {'Price': 36}, {'Price': 25}, {'Price': 30}, {'Price': 28}, {'Price': 48}, {'Price': 28}, {'Price': 26}, {'Price': 16}, {'Price': 23}, {'Price': 22}, {'Price': 26}, {'Price': 25}, {'Price': 19}, {'Price': 60}, {'Price': 25}, {'Price': 32}, {'Price': 20}, {'Price': 27}, {'Price': 25}, {'Price': 21}, {'Price': 24}, {'Price': 24}, {'Price': 18}, {'Price': 32}, {'Price': 15}, {'Price': 27}, {'Price': 12}, {'Price': 10}, {'Price': 25}, {'Price': 16}, {'Price': 15}, {'Price': 16}, {'Price': 24}, {'Price': 12}, {'Price': 20}, {'Price': 14}, {'Price': 12}, {'Price': 12}, {'Price': 12}, {'Price': 135}, {'Price': 130}, {'Price': 48}, {'Price': 85}, {'Price': 50}, {'Price': 125}, {'Price': 125}, {'Price': 95}, {'Price': 50}, {'Price': 135}, {'Price': 175}, {'Price': 60}, {'Price': 72}, {'Price': 72}, {'Price': 72}, {'Price': 70}, {'Price': 56}, {'Price': 75}, {'Price': 52}, {'Price': 72}, {'Price': 72}, {'Price': 100}, {'Price': 72}, {'Price': 72}, {'Price': 65}, {'Price': 70}, {'Price': 42}, {'Price': 55}, {'Price': 45}, {'Price': 72}, {'Price': 68}, {'Price': 52}, {'Price': 40}, {'Price': 17}, {'Price': 43}, {'Price': 43}, {'Price': 40}, {'Price': 28}, {'Price': 45}, {'Price': 50}, {'Price': 36}, {'Price': 32}, {'Price': 30}, {'Price': 30}, {'Price': 32}, {'Price': 13}, {'Price': 36}, {'Price': 24}, {'Price': 21}, {'Price': 40}, {'Price': 50}, {'Price': 18}, {'Price': 40}, {'Price': 15}, {'Price': 60}, {'Price': 76}, {'Price': 12}, {'Price': 11}, {'Price': 225}, {'Price': 80}, {'Price': 130}, {'Price': 115}, {'Price': 78}, {'Price': 40}, {'Price': 40}, {'Price': 90}, {'Price': 27}, {'Price': 25}, {'Price': 200}, {'Price': 36}, {'Price': 35}, {'Price': 48}, {'Price': 39}, {'Price': 42}, {'Price': 38}, {'Price': 48}, {'Price': 48}, {'Price': 34}, {'Price': 75}, {'Price': 35}, {'Price': 11}, {'Price': 48}, {'Price': 54}, {'Price': 48}, {'Price': 45}, {'Price': 45}, {'Price': 51}, {'Price': 48}, {'Price': 48}, {'Price': 45}, {'Price': 29}, {'Price': 29}, {'Price': 45}, {'Price': 45}, {'Price': 48}, {'Price': 45}, {'Price': 45}, {'Price': 29}, {'Price': 48}, {'Price': 48}, {'Price': 45}, {'Price': 36}, {'Price': 69}, {'Price': 45}, {'Price': 29}, {'Price': 20}, {'Price': 14}, {'Price': 200}, {'Price': 65}, {'Price': 40}, {'Price': 45}, {'Price': 36}, {'Price': 36}, {'Price': 42}, {'Price': 55}, {'Price': 38}, {'Price': 40}, {'Price': 40}, {'Price': 27}, {'Price': 44}, {'Price': 50}, {'Price': 55}, {'Price': 38}, {'Price': 22}, {'Price': 35}, {'Price': 17}, {'Price': 40}, {'Price': 20}, {'Price': 60}, {'Price': 45}, {'Price': 25}, {'Price': 25}, {'Price': 38}, {'Price': 40}, {'Price': 30}, {'Price': 35}, {'Price': 45}, {'Price': 30}, {'Price': 24}, {'Price': 18}, {'Price': 9}, {'Price': 43}, {'Price': 29}, {'Price': 34}, {'Price': 32}, {'Price': 42}, {'Price': 40}, {'Price': 28}, {'Price': 38}, {'Price': 24}, {'Price': 20}, {'Price': 18}, {'Price': 18}, {'Price': 30}, {'Price': 13}, {'Price': 45}, {'Price': 48}, {'Price': 36}, {'Price': 48}, {'Price': 40}, {'Price': 15}, {'Price': 38}, {'Price': 60}, {'Price': 28}, {'Price': 52}, {'Price': 45}, {'Price': 25}, {'Price': 24}, {'Price': 75}, {'Price': 45}, {'Price': 45}, {'Price': 55}, {'Price': 75}, {'Price': 75}, {'Price': 75}, {'Price': 50}, {'Price': 60}, {'Price': 35}, {'Price': 39}, {'Price': 30}, {'Price': 60}, {'Price': 29}, {'Price': 55}, {'Price': 60}, {'Price': 45}, {'Price': 35}, {'Price': 37}, {'Price': 20}, {'Price': 135}, {'Price': 95}, {'Price': 125}, {'Price': 135}, {'Price': 125}, {'Price': 75}, {'Price': 60}, {'Price': 60}, {'Price': 40}, {'Price': 60}, {'Price': 85}, {'Price': 100}, {'Price': 85}, {'Price': 55}, {'Price': 55}, {'Price': 100}, {'Price': 50}, {'Price': 75}, {'Price': 85}, {'Price': 45}, {'Price': 60}, {'Price': 42}, {'Price': 75}, {'Price': 75}, {'Price': 80}, {'Price': 75}, {'Price': 40}, {'Price': 25}, {'Price': 60}, {'Price': 75}, {'Price': 40}, {'Price': 70}, {'Price': 55}, {'Price': 40}, {'Price': 48}, {'Price': 30}, {'Price': 40}, {'Price': 40}, {'Price': 25}, {'Price': 45}, {'Price': 45}, {'Price': 44}, {'Price': 70}, {'Price': 60}, {'Price': 75}, {'Price': 40}, {'Price': 49}, {'Price': 80}, {'Price': 70}, {'Price': 26}, {'Price': 50}, {'Price': 30}, {'Price': 60}, {'Price': 32}, {'Price': 28}, {'Price': 20}, {'Price': 35}, {'Price': 55}, {'Price': 25}, {'Price': 40}, {'Price': 26}, {'Price': 35}, {'Price': 56}, {'Price': 36}, {'Price': 40}, {'Price': 60}, {'Price': 44}, {'Price': 49}, {'Price': 35}, {'Price': 48}, {'Price': 40}, {'Price': 32}, {'Price': 26}, {'Price': 26}, {'Price': 60}, {'Price': 39}, {'Price': 20}, {'Price': 17}, {'Price': 26}, {'Price': 43}, {'Price': 38}, {'Price': 35}, {'Price': 45}, {'Price': 80}, {'Price': 30}, {'Price': 42}, {'Price': 48}, {'Price': 25}, {'Price': 38}, {'Price': 40}, {'Price': 40}, {'Price': 24}, {'Price': 39}, {'Price': 24}, {'Price': 30}, {'Price': 38}, {'Price': 26}, {'Price': 13}, {'Price': 30}, {'Price': 22}, {'Price': 17}, {'Price': 13}, {'Price': 18}, {'Price': 10}, {'Price': 46}, {'Price': 42}, {'Price': 35}, {'Price': 44}, {'Price': 36}, {'Price': 45}, {'Price': 34}, {'Price': 48}, {'Price': 54}, {'Price': 50}, {'Price': 38}, {'Price': 44}, {'Price': 48}, {'Price': 45}, {'Price': 42}, {'Price': 40}, {'Price': 40}, {'Price': 25}, {'Price': 25}, {'Price': 43}, {'Price': 43}, {'Price': 75}, {'Price': 38}, {'Price': 55}, {'Price': 75}, {'Price': 36}, {'Price': 35}, {'Price': 30}, {'Price': 33}, {'Price': 48}, {'Price': 40}, {'Price': 23}, {'Price': 43}, {'Price': 27}, {'Price': 50}, {'Price': 27}, {'Price': 20}, {'Price': 18}, {'Price': 18}, {'Price': 19}, {'Price': 18}, {'Price': 18}, {'Price': 35}, {'Price': 26}, {'Price': 20}, {'Price': 20}, {'Price': 15}, {'Price': 12}, {'Price': 10}, {'Price': 25}, {'Price': 60}, {'Price': 25}, {'Price': 12}, {'Price': 130}, {'Price': 75}, {'Price': 100}, {'Price': 90}, {'Price': 40}, {'Price': 90}, {'Price': 78}, {'Price': 55}, {'Price': 20}, {'Price': 35}, {'Price': 32}, {'Price': 20}, {'Price': 10}, {'Price': 75}, {'Price': 35}, {'Price': 25}, {'Price': 22}, {'Price': 25}, {'Price': 17}, {'Price': 150}, {'Price': 75}, {'Price': 60}, {'Price': 65}, {'Price': 75}, {'Price': 90}, {'Price': 125}, {'Price': 45}, {'Price': 50}, {'Price': 50}, {'Price': 40}, {'Price': 40}, {'Price': 92}, {'Price': 90}, {'Price': 39}, {'Price': 135}, {'Price': 65}, {'Price': 70}, {'Price': 18}, {'Price': 18}, {'Price': 47}, {'Price': 46}, {'Price': 55}, {'Price': 10}, {'Price': 100}, {'Price': 135}, {'Price': 15}, {'Price': 60}, {'Price': 40}, {'Price': 26}, {'Price': 15}, {'Price': 39}, {'Price': 76}, {'Price': 45}, {'Price': 80}, {'Price': 76}, {'Price': 76}, {'Price': 70}, {'Price': 25}, {'Price': 20}, {'Price': 44}, {'Price': 33}, {'Price': 59}, {'Price': 40}, {'Price': 30}, {'Price': 20}, {'Price': 40}, {'Price': 20}, {'Price': 25}, {'Price': 45}, {'Price': 135}, {'Price': 40}, {'Price': 18}, {'Price': 45}, {'Price': 16}, {'Price': 33}, {'Price': 55}, {'Price': 35}, {'Price': 35}, {'Price': 38}, {'Price': 41}, {'Price': 32}, {'Price': 32}, {'Price': 28}, {'Price': 34}, {'Price': 50}, {'Price': 35}, {'Price': 28}, {'Price': 30}, {'Price': 28}, {'Price': 18}, {'Price': 22}, {'Price': 25}, {'Price': 24}, {'Price': 27}, {'Price': 30}, {'Price': 18}, {'Price': 45}, {'Price': 45}, {'Price': 24}, {'Price': 18}, {'Price': 14}, {'Price': 12}, {'Price': 100}, {'Price': 48}, {'Price': 17}, {'Price': 25}, {'Price': 11}]