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
List the names of all distinct wines ordered by price.
assistant
SELECT DISTINCT Name FROM WINE ORDER BY price
human
List the grapes and appelations of all wines.
assistant
SELECT Grape , Appelation FROM WINE
human
Find the the grape whose white color grapes are used to produce wines with scores higher than 90.
assistant
SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = 'White' AND T2.score > 90
human
List the names and scores of all wines.
assistant
SELECT Name , Score FROM WINE
human
List the names of all distinct wines that have scores higher than 90.
assistant
SELECT Name FROM WINE WHERE score > 90
human
List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.
assistant
SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name ;