
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 names of all wines produced in 2008?
SELECT Name FROM WINE WHERE YEAR  =  "2008"
[{'Name': 'Old Kraft Vineyard'}, {'Name': 'Giana'}, {'Name': 'Black Chicken'}, {'Name': 'Napa Ranches'}, {'Name': 'Varozza Vineyard'}, {'Name': 'Mother Clone'}, {'Name': 'LApres-Midi'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Asatsuyu'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Handley Vineyard'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Amber Ridge Vineyard'}, {'Name': 'Keefer Ranch'}, {'Name': 'Koplen Vineyard'}, {'Name': 'Julias Vineyard'}, {'Name': 'Carneros Hyde Vineyard'}, {'Name': 'Pinot Noir'}, {'Name': 'Garys Vineyard'}, {'Name': 'Kanzler Vineyard'}, {'Name': 'Pisoni Vineyard'}, {'Name': 'Rosellas Vineyard'}, {'Name': 'Kanzler Vineyard'}, {'Name': 'Valley Bliss Block'}, {'Name': 'Pinot Noir'}, {'Name': 'Pinot Noir'}, {'Name': '4-Barrel'}, {'Name': 'Gaps Crown Vineyard'}, {'Name': 'Pinot Noir'}, {'Name': 'Reserve'}, {'Name': 'A by Acacia'}, {'Name': 'La Encantada Vineyard'}, {'Name': 'La Encantada Vineyard Clone 667'}, {'Name': 'Carneros'}, {'Name': 'Pinot Noir'}, {'Name': 'Garys Vineyard'}, {'Name': 'Pinot Noir'}, {'Name': 'Sarmento Vineyard'}, {'Name': 'Pinot Noir'}, {'Name': 'Pinot Noir'}, {'Name': 'Pinot Noir'}, {'Name': 'Pinot Noir'}, {'Name': 'Henry Ranch'}, {'Name': 'Pinot Noir'}, {'Name': 'Kali Hart'}, {'Name': 'Pinot Noir'}, {'Name': 'Pinot Noir'}, {'Name': 'Sleepy Hollow Vineyard'}, {'Name': 'Pinot Noir'}, {'Name': 'Reserve'}, {'Name': 'Hillstone Vineyard'}, {'Name': 'Neruda Brix Vineyard'}, {'Name': 'Cabernet Sauvignon'}, {'Name': 'On the Road'}, {'Name': 'Garnacha Denner Vineyard'}, {'Name': 'Purisma Mountain Vineyard'}, {'Name': 'Foggy Knoll Vineyard'}, {'Name': 'Anns Block'}, {'Name': 'Kick Ranch'}, {'Name': 'Hayne Vineyard'}, {'Name': 'Sweetwater Springs Vineyard'}, {'Name': 'Pinot Noir'}, {'Name': 'Pinot Noir'}, {'Name': 'Quarzo'}, {'Name': 'Rosellas Vineyard'}, {'Name': 'Cardiac Hill'}, {'Name': 'Larner Vinyard'}, {'Name': 'White Hawk Vineyard'}, {'Name': 'Twist of Fate'}, {'Name': 'Syrah'}, {'Name': 'Garys Vineyard'}, {'Name': 'Christensen Family Vineyard'}, {'Name': 'Syrah'}, {'Name': 'The Flight'}, {'Name': 'Syrah'}, {'Name': 'Syrah'}, {'Name': 'Syrah'}, {'Name': 'Originals'}, {'Name': 'Gesture Limited Release'}, {'Name': 'Syrah'}, {'Name': 'Les Cotes De LOuest'}, {'Name': 'Shiraz'}, {'Name': 'Carlisle Vineyard'}, {'Name': 'Cedarman'}, {'Name': 'Tofanelli Vineyard'}, {'Name': 'Fredericks Vineyard'}, {'Name': 'Rossi Ranch'}, {'Name': 'Treborce Vineyard'}, {'Name': 'Old Vine'}, {'Name': 'Wheelhouse'}, {'Name': 'Edizione Pennino'}, {'Name': 'La Cruz Vineyard'}, {'Name': 'Loco'}, {'Name': 'Special Selection'}, {'Name': 'Artistry'}, {'Name': 'Chardonnay'}, {'Name': 'Reserve'}, {'Name': 'Russian River Selection'}, {'Name': 'Numbers'}, {'Name': 'Pinot Noir'}, {'Name': 'Zinfandel'}, {'Name': 'Merlot'}, {'Name': 'Zinfandel'}, {'Name': 'Chelsea Goldschmidt'}, {'Name': 'Pinot Noir'}, {'Name': 'Ulises Valdez Vineyard'}, {'Name': 'Sleepy Hollow Vineyard'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Fume Blanc'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Lillie Vineyard'}, {'Name': 'Sauvignon Blanc'}, {'Name': 'Papas Block'}, {'Name': 'Rosellas Vineyard'}, {'Name': 'Highwire Vineyard'}, {'Name': 'Jesses Vineyard'}, {'Name': 'Zinfandel'}, {'Name': 'Bridgehead'}, {'Name': 'Old vine Della Costa Family Vineyard'}, {'Name': 'Zinfandel'}, {'Name': 'Pato Vineyard'}, {'Name': 'Zinfandel'}, {'Name': 'Old Vines'}, {'Name': 'Zinfandel'}, {'Name': 'A by Acacia'}]