question
stringlengths 19
191
| query
stringlengths 26
371
| schema
stringclasses 14
values |
---|---|---|
Count the number of documents that do not have expenses. | SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses ) | Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))
Ref_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))
Projects: Project_ID (INTEGER), Project_Details (VARCHAR(255))
Documents: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))
Statements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))
Documents_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))
Accounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255)) |
What are the dates for the documents with both 'GV' type and 'SF' type expenses? | SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF' | Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))
Ref_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))
Projects: Project_ID (INTEGER), Project_Details (VARCHAR(255))
Documents: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))
Statements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))
Documents_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))
Accounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255)) |
Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'. | SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF' | Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))
Ref_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))
Projects: Project_ID (INTEGER), Project_Details (VARCHAR(255))
Documents: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))
Statements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))
Documents_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))
Accounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255)) |
What are the account details with the largest value or with value having char '5' in it? | SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE "%5%" | Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))
Ref_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))
Projects: Project_ID (INTEGER), Project_Details (VARCHAR(255))
Documents: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))
Statements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))
Documents_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))
Accounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255)) |
Return the account details with the greatest value, as well as those that include the character 5. | SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE "%5%" | Ref_Document_Types: Document_Type_Code (CHAR(15)), Document_Type_Name (VARCHAR(255)), Document_Type_Description (VARCHAR(255))
Ref_Budget_Codes: Budget_Type_Code (CHAR(15)), Budget_Type_Description (VARCHAR(255))
Projects: Project_ID (INTEGER), Project_Details (VARCHAR(255))
Documents: Document_ID (INTEGER), Document_Type_Code (CHAR(15)), Project_ID (INTEGER), Document_Date (DATETIME), Document_Name (VARCHAR(255)), Document_Description (VARCHAR(255)), Other_Details (VARCHAR(255))
Statements: Statement_ID (INTEGER), Statement_Details (VARCHAR(255))
Documents_with_Expenses: Document_ID (INTEGER), Budget_Type_Code (CHAR(15)), Document_Details (VARCHAR(255))
Accounts: Account_ID (INTEGER), Statement_ID (INTEGER), Account_Details (VARCHAR(255)) |
Find the total number of scientists. | SELECT count(*) FROM scientists | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
How many scientists are there? | SELECT count(*) FROM scientists | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the total hours of all projects. | SELECT sum(hours) FROM projects | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What is the total number of hours for all projects? | SELECT sum(hours) FROM projects | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
How many different scientists are assigned to any project? | SELECT count(DISTINCT scientist) FROM assignedto | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Count the number of different scientists assigned to any project. | SELECT count(DISTINCT scientist) FROM assignedto | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the number of distinct projects. | SELECT count(DISTINCT name) FROM projects | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
How many different projects are there? | SELECT count(DISTINCT name) FROM projects | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the average hours of all projects. | SELECT avg(hours) FROM projects | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What is the average hours across all projects? | SELECT avg(hours) FROM projects | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the name of project that continues for the longest time. | SELECT name FROM projects ORDER BY hours DESC LIMIT 1 | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What is the name of the project with the most hours? | SELECT name FROM projects ORDER BY hours DESC LIMIT 1 | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
List the name of all projects that are operated longer than the average working hours of all projects. | SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of projects that have taken longer than the average number of hours for all projects? | SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the name and hours of project that has the most number of scientists. | SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1 | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What is the name and hours for the project which has the most scientists assigned to it? | SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1 | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the name of the project for which a scientist whose name contains ‘Smith’ is assigned to. | SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%' | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What is the name of the project that has a scientist assigned to it whose name contains 'Smith'? | SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%' | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to. | SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith' | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to? | SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith' | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the name of projects that require between 100 and 300 hours of work. | SELECT name FROM projects WHERE hours BETWEEN 100 AND 300 | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of projects that require between 100 and 300 hours? | SELECT name FROM projects WHERE hours BETWEEN 100 AND 300 | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'. | SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax' | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'? | SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax' | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
List the names of all scientists sorted in alphabetical order. | SELECT name FROM scientists ORDER BY name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of all the scientists in alphabetical order? | SELECT name FROM scientists ORDER BY name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the number of scientists involved for each project name. | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the naems of all the projects, and how many scientists were assigned to each of them? | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the number of scientists involved for the projects that require more than 300 hours. | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of projects that require more than 300 hours, and how many scientists are assigned to each? | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the number of projects which each scientist is working on and scientist's name. | SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of the scientists, and how many projects are each of them working on? | SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the SSN and name of scientists who are assigned to the project with the longest hours. | SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the SSN and names of scientists working on the project with the most hours? | SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the name of scientists who are assigned to some project. | SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of scientists who are assigned to any project? | SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Select the project names which are not assigned yet. | SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of projects that have not been assigned? | SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the name of scientists who are not assigned to any project. | SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of scientists who have not been assigned a project? | SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the number of scientists who are not assigned to any project. | SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
How many scientists do not have any projects assigned to them? | SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find the names of scientists who are not working on the project with the highest hours. | SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of scientists who are not working on the project with the most hours? | SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name. | SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name. | SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it. | SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it? | SELECT T2.name , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT min(hours) FROM projects) | Scientists: SSN (INT), Name (CHAR(30))
AssignedTo: Scientist (INT), Project (CHAR(4)) |
What is the name of the highest rated wine? | SELECT Name FROM WINE ORDER BY Score LIMIT 1 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Give the name of the wine with the highest score. | SELECT Name FROM WINE ORDER BY Score LIMIT 1 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Which winery is the wine that has the highest score from? | SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What is the winery at which the wine with the highest score was made? | SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Find the names of all wines produced in 2008. | SELECT Name FROM WINE WHERE YEAR = "2008" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the names of all wines produced in 2008? | SELECT Name FROM WINE WHERE YEAR = "2008" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
List the grapes and appelations of all wines. | SELECT Grape , Appelation FROM WINE | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the grapes and appelations of each wine? | SELECT Grape , Appelation FROM WINE | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
List the names and scores of all wines. | SELECT Name , Score FROM WINE | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the names and scores of all wines? | SELECT Name , Score FROM WINE | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
List the area and county of all appelations. | SELECT Area , County FROM APPELLATIONS | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the areas and counties for all appelations? | SELECT Area , County FROM APPELLATIONS | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the prices of wines produced before the year of 2010? | SELECT Price FROM WINE WHERE YEAR < 2010 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Return the prices of wines produced before 2010. | SELECT Price FROM WINE WHERE YEAR < 2010 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
List the names of all distinct wines that have scores higher than 90. | SELECT Name FROM WINE WHERE score > 90 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the names of wines with scores higher than 90? | SELECT Name FROM WINE WHERE score > 90 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
List the names of all distinct wines that are made of red color grape. | SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the names of wines made from red grapes? | SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Find the names of all distinct wines that have appellations in North Coast area. | SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the distinct names of wines that have appellations in the North Coast area? | SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
How many wines are produced at Robert Biale winery? | SELECT count(*) FROM WINE WHERE Winery = "Robert Biale" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Count the number of wines produced at Robert Biale winery. | SELECT count(*) FROM WINE WHERE Winery = "Robert Biale" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
How many appelations are in Napa Country? | SELECT count(*) FROM APPELLATIONS WHERE County = "Napa" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Count the number of appelations in Napa County. | SELECT count(*) FROM APPELLATIONS WHERE County = "Napa" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Give me the average prices of wines that are produced by appelations in Sonoma County. | SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Sonoma" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What is the average price of wines produced in appelations in Sonoma County? | SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Sonoma" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the names and scores of wines that are made of white color grapes? | SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Give the names and scores of wines made from white grapes. | SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005. | SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "Central Coast" AND T2.year < 2005 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005? | SELECT max(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "Central Coast" AND T2.year < 2005 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Find the the grape whose white color grapes are used to produce wines with scores higher than 90. | 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 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Find the white grape used to produce wines with scores above 90. | 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 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the wines that have prices higher than 50 and made of Red color grapes? | SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the names of wines made from red grapes and with prices above 50? | SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the wines that have prices lower than 50 and have appelations in Monterey county? | SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Give the neames of wines with prices below 50 and with appelations in Monterey county. | SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the numbers of wines for different grapes? | SELECT count(*) , Grape FROM WINE GROUP BY Grape | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
How many wines are there for each grape? | SELECT count(*) , Grape FROM WINE GROUP BY Grape | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the average prices of wines for different years? | SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What is the average prices of wines for each each? | SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Find the distinct names of all wines that have prices higher than some wines from John Anthony winery. | SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = "John Anthony") | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the distinct names of wines with prices higher than any wine from John Anthony winery. | SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = "John Anthony") | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
List the names of all distinct wines in alphabetical order. | SELECT DISTINCT Name FROM WINE ORDER BY Name | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the names of wines, sorted in alphabetical order? | SELECT DISTINCT Name FROM WINE ORDER BY Name | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
List the names of all distinct wines ordered by price. | SELECT DISTINCT Name FROM WINE ORDER BY price | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What are the names of wines, sorted by price ascending? | SELECT DISTINCT Name FROM WINE ORDER BY price | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
What is the area of the appelation that produces the highest number of wines before the year of 2010? | SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY count(*) DESC LIMIT 1 | grapes: ID (INTEGER), Grape (TEXT), Color (TEXT)
appellations: No (INTEGER), Appelation (TEXT), County (TEXT), State (TEXT), Area (TEXT), isAVA (TEXT)
wine: No (INTEGER), Grape (TEXT), Winery (TEXT), Appelation (TEXT), State (TEXT), Name (TEXT), Year (INTEGER), Price (INTEGER), Score (INTEGER), Cases (INTEGER), Drink (TEXT) |
Subsets and Splits