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 are made from Zinfandel grapes?
assistant
SELECT COUNT( * ) FROM WINE WHERE Grape = 'Zinfandel';
human
What are the average prices and number of cases for these wines?
assistant
SELECT AVG ( Price ) , AVG ( Cases ) FROM WINE WHERE Grape = 'Zinfandel';
human
only show numbers for the ones produced in 2009.
assistant
SELECT AVG ( Price ) , AVG ( Cases ) FROM WINE WHERE YEAR = 2009 AND Grape = "Zinfandel" ;