
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 distinct wineries which produce wines costing between 50 and 100?
SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100
[{'Winery': 'Kenzo'}, {'Winery': 'Ramey'}, {'Winery': 'Round Pond Estate'}, {'Winery': 'Ehlers Estate'}, {'Winery': 'Fontanella Family'}, {'Winery': 'Penche'}, {'Winery': 'Kosta Browne'}, {'Winery': 'Patz & Hall'}, {'Winery': 'Foxen'}, {'Winery': 'Paul Hobbs'}, {'Winery': 'Lynmar'}, {'Winery': 'Landmark'}, {'Winery': 'Valdez Family'}, {'Winery': 'Roar'}, {'Winery': 'Twomey'}, {'Winery': 'Chalk Hill'}, {'Winery': 'DuMOL'}, {'Winery': 'Darioush'}, {'Winery': 'Chimeney Rock'}, {'Winery': 'Pott'}, {'Winery': 'Turley'}, {'Winery': 'Siduri'}, {'Winery': 'Clouds Rest'}, {'Winery': 'Favia'}, {'Winery': 'JC Cellars'}, {'Winery': 'Joseph Phelps'}, {'Winery': 'Red Car'}, {'Winery': 'Pride'}, {'Winery': 'Krupp Brothers'}, {'Winery': 'Chateau Potelle'}, {'Winery': 'Whitestone'}, {'Winery': 'Adrian Fog'}, {'Winery': 'Davis Bynum'}, {'Winery': 'Calera'}, {'Winery': 'Chasseur'}, {'Winery': 'Dancing Hares'}, {'Winery': 'The Four'}, {'Winery': 'Veraison'}, {'Winery': 'Barrack'}, {'Winery': 'Cade'}, {'Winery': 'Louis M. Martini'}, {'Winery': 'PerryMoore'}, {'Winery': 'Frank Family'}, {'Winery': 'Highlands'}, {'Winery': 'Ilsley'}, {'Winery': 'Kazme & Blaise'}, {'Winery': 'Kistler'}, {'Winery': 'Peter Michael'}, {'Winery': 'Tor'}, {'Winery': 'Peirson Meyer'}, {'Winery': 'HdV'}, {'Winery': 'Pahlmeyer'}, {'Winery': 'Hanzell'}, {'Winery': 'Hudson Vineyards'}, {'Winery': 'D.R. Stephens'}, {'Winery': 'Vineyard 7&8'}, {'Winery': 'Cakebread'}, {'Winery': 'Far Niente'}, {'Winery': 'Freestone'}, {'Winery': 'Vine Cliff'}, {'Winery': 'Small Vines'}, {'Winery': 'Jemrose'}, {'Winery': 'Duchamp'}, {'Winery': 'Martinelli'}, {'Winery': 'Phifer Pavitt'}, {'Winery': 'Turnbull'}, {'Winery': 'Cavus'}, {'Winery': 'Montes'}, {'Winery': 'Maybach'}, {'Winery': 'Pina'}, {'Winery': 'Boyanci'}, {'Winery': 'Guarachi'}, {'Winery': 'Keever'}, {'Winery': 'Erna Schein'}, {'Winery': 'Fleming Jenkins'}, {'Winery': 'Maldonado'}, {'Winery': 'Nickel & Nickel'}, {'Winery': 'Duckhorn'}, {'Winery': 'Krutz Family'}, {'Winery': 'Merryvale'}, {'Winery': 'Sine Qua Non'}, {'Winery': 'Keenan'}, {'Winery': 'Testarossa'}, {'Winery': 'Hartford Family'}]