human
Schema:
grapes (ID, Grape, Color)
appellations (No, Appelation, County, State, Area, isAVA)
wine (No, Grape, Winery, Appelation, State, Name, Year, Price, Score, Cases, Drink)
Please answer with SQL.
assistant
Sure, I understand.
human
Which wines were produced before 2000?
assistant
SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000;
human
What is the most common year of production?
assistant
SELECT year FROM wine GROUP by year ORDER by COUNT( * ) desc LIMIT 1;
human
Which wines were produced in 2007?
assistant
SELECT winery FROM wine WHERE year = 2007;
human
What about the ones after the year 2010?
assistant
SELECT DISTINCT Name FROM WINE WHERE YEAR > 2010 ;