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
What are the names of wines that are more expensive then all wines made in the year 2006?
assistant
SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006)
human
List the names of all distinct wines that have scores higher than 90.
assistant
SELECT Name FROM WINE WHERE score > 90
human
What are the maximum price and score of wines in each year?
assistant
SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR
human
List the names and scores of all wines.
assistant
SELECT Name , Score FROM WINE
human
What is the name of the highest rated wine?
assistant
SELECT Name FROM WINE ORDER BY Score LIMIT 1
human
Which winery is the wine that has the highest score from?
assistant
SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1 ;