input
stringlengths
191
7.13k
output
stringlengths
19
578
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: What are the names of the scientists, and how many projects are each of them working on? [/INST]
SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name;
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: Find the SSN and name of scientists who are assigned to the project with the longest hours. [/INST]
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);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: What are the SSN and names of scientists working on the project with the most hours? [/INST]
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);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: Find the name of scientists who are assigned to some project. [/INST]
SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn;
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: What are the names of scientists who are assigned to any project? [/INST]
SELECT T2.name FROM assignedto AS T1 JOIN scientists AS T2 ON T1.scientist = T2.ssn;
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: Select the project names which are not assigned yet. [/INST]
SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: What are the names of projects that have not been assigned? [/INST]
SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: Find the name of scientists who are not assigned to any project. [/INST]
SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: What are the names of scientists who have not been assigned a project? [/INST]
SELECT Name FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: Find the number of scientists who are not assigned to any project. [/INST]
SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: How many scientists do not have any projects assigned to them? [/INST]
SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: Find the names of scientists who are not working on the project with the highest hours. [/INST]
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);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: What are the names of scientists who are not working on the project with the most hours? [/INST]
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);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of proj...
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;
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: 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 alpha...
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;
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it. [/INST]
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);
Tables: Scientists, Projects, AssignedTo Columns: Scientists.SSN, Scientists.Name, Projects.Code, Projects.Name, Projects.Hours, AssignedTo.Scientist, AssignedTo.Project Question: What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it? [/INST]
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);
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE ORDER BY Score LIMIT 1;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE ORDER BY Score LIMIT 1;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE WHERE YEAR = "2008";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE WHERE YEAR = "2008";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Grape , Appelation FROM WINE;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Grape , Appelation FROM WINE;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name , Score FROM WINE;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name , Score FROM WINE;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Area , County FROM APPELLATIONS;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Area , County FROM APPELLATIONS;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Price FROM WINE WHERE YEAR < 2010;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Price FROM WINE WHERE YEAR < 2010;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE WHERE score > 90;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE WHERE score > 90;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT count(*) FROM WINE WHERE Winery = "Robert Biale";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT count(*) FROM WINE WHERE Winery = "Robert Biale";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT count(*) FROM APPELLATIONS WHERE County = "Napa";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT count(*) FROM APPELLATIONS WHERE County = "Napa";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Sonoma";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Sonoma";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T2.Name , T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
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;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
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;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
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;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
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;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT count(*) , Grape FROM WINE GROUP BY Grape;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT count(*) , Grape FROM WINE GROUP BY Grape;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT avg(Price) , YEAR FROM WINE GROUP BY YEAR;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = "John Anthony");
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT min(Price) FROM wine WHERE Winery = "John Anthony");
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Name FROM WINE ORDER BY Name;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Name FROM WINE ORDER BY Name;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Name FROM WINE ORDER BY price;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Name FROM WINE ORDER BY price;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
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;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
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;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = "Zinfandel";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT AVG(Price) , AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = "Zinfandel";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = "St. Helena";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT max(Price) , max(Score) FROM WINE WHERE Appelation = "St. Helena";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT max(Price) , max(Score) , YEAR FROM WINE GROUP BY YEAR;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT avg(Price) , avg(Score) , Appelation FROM WINE GROUP BY Appelation;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 4;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Winery FROM WINE GROUP BY Winery HAVING count(*) >= 4;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 3;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING count(*) <= 3;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = "Brander");
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE WHERE YEAR < (SELECT min(YEAR) FROM WINE WHERE Winery = "Brander");
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006);
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Name FROM WINE WHERE Price > (SELECT max(Price) FROM WINE WHERE YEAR = 2006);
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = "White" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE = T2.GRAPE WHERE T1.Color = "White" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Grape , Winery , YEAR FROM WINE WHERE Price > 100 ORDER BY YEAR;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Grape , Appelation , Name FROM WINE WHERE Score > 93 ORDER BY Name;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = "Central Coast";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT Appelation FROM WINE WHERE YEAR > 2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area = "Central Coast";
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma');
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = 'Sonoma');
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1;
Tables: grapes, appellations, wine Columns: grapes.ID, grapes.Grape, grapes.Color, appellations.No, appellations.Appelation, appellations.County, appellations.State, appellations.Area, appellations.isAVA, wine.No, wine.Grape, wine.Winery, wine.Appelation, wine.State, wine.Name, wine.Year, wine.Price, wine.Score, wine.C...
SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T2.Score > 90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1;
Tables: station, train, train_station Columns: station.Station_ID, station.Name, station.Annual_entry_exit, station.Annual_interchanges, station.Total_Passengers, station.Location, station.Main_Services, station.Number_of_Platforms, train.Train_ID, train.Name, train.Time, train.Service, train_station.Train_ID, train_st...
SELECT count(*) FROM station;