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
how many wines cost more than 100?
assistant
SELECT COUNT( * ) FROM WINE WHERE Price > 100;
human
List the grape, winery and year of these wines.
assistant
SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100;
human
order them by their produce year.
assistant
SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR ;