db_id
stringclasses
140 values
schema
listlengths
0
26
question
stringlengths
16
224
query
stringlengths
18
577
query_toks
listlengths
4
90
query_toks_no_value
listlengths
4
125
question_toks
listlengths
4
44
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
Show the name of colleges that have at least two players.
SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2
[ "SELECT", "College", "FROM", "match_season", "GROUP", "BY", "College", "HAVING", "count", "(", "*", ")", ">", "=", "2" ]
[ "select", "college", "from", "match_season", "group", "by", "college", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Show", "the", "name", "of", "colleges", "that", "have", "at", "least", "two", "players", "." ]
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
What are the names of all colleges that have two or more players?
SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2
[ "SELECT", "College", "FROM", "match_season", "GROUP", "BY", "College", "HAVING", "count", "(", "*", ")", ">", "=", "2" ]
[ "select", "college", "from", "match_season", "group", "by", "college", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "What", "are", "the", "names", "of", "all", "colleges", "that", "have", "two", "or", "more", "players", "?" ]
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
Show the name of colleges that have at least two players in descending alphabetical order.
SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC
[ "SELECT", "College", "FROM", "match_season", "GROUP", "BY", "College", "HAVING", "count", "(", "*", ")", ">", "=", "2", "ORDER", "BY", "College", "DESC" ]
[ "select", "college", "from", "match_season", "group", "by", "college", "having", "count", "(", "*", ")", ">", "=", "value", "order", "by", "college", "desc" ]
[ "Show", "the", "name", "of", "colleges", "that", "have", "at", "least", "two", "players", "in", "descending", "alphabetical", "order", "." ]
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
What are the names of colleges that have two or more players, listed in descending alphabetical order?
SELECT College FROM match_season GROUP BY College HAVING count(*) >= 2 ORDER BY College DESC
[ "SELECT", "College", "FROM", "match_season", "GROUP", "BY", "College", "HAVING", "count", "(", "*", ")", ">", "=", "2", "ORDER", "BY", "College", "DESC" ]
[ "select", "college", "from", "match_season", "group", "by", "college", "having", "count", "(", "*", ")", ">", "=", "value", "order", "by", "college", "desc" ]
[ "What", "are", "the", "names", "of", "colleges", "that", "have", "two", "or", "more", "players", ",", "listed", "in", "descending", "alphabetical", "order", "?" ]
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
What are the names of teams that do no have match season record?
SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)
[ "SELECT", "Name", "FROM", "team", "WHERE", "Team_id", "NOT", "IN", "(", "SELECT", "Team", "FROM", "match_season", ")" ]
[ "select", "name", "from", "team", "where", "team_id", "not", "in", "(", "select", "team", "from", "match_season", ")" ]
[ "What", "are", "the", "names", "of", "teams", "that", "do", "no", "have", "match", "season", "record", "?" ]
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
Return the names of teams that have no match season record.
SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)
[ "SELECT", "Name", "FROM", "team", "WHERE", "Team_id", "NOT", "IN", "(", "SELECT", "Team", "FROM", "match_season", ")" ]
[ "select", "name", "from", "team", "where", "team_id", "not", "in", "(", "select", "team", "from", "match_season", ")" ]
[ "Return", "the", "names", "of", "teams", "that", "have", "no", "match", "season", "record", "." ]
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
What are the names of countries that have both players with position forward and players with position defender?
SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender"
[ "SELECT", "T1.Country_name", "FROM", "country", "AS", "T1", "JOIN", "match_season", "AS", "T2", "ON", "T1.Country_id", "=", "T2.Country", "WHERE", "T2.Position", "=", "``", "Forward", "''", "INTERSECT", "SELECT", "T1.Country_name", "FROM", "country", "AS", "T1", "JOIN", "match_season", "AS", "T2", "ON", "T1.Country_id", "=", "T2.Country", "WHERE", "T2.Position", "=", "``", "Defender", "''" ]
[ "select", "t1", ".", "country_name", "from", "country", "as", "t1", "join", "match_season", "as", "t2", "on", "t1", ".", "country_id", "=", "t2", ".", "country", "where", "t2", ".", "position", "=", "value", "intersect", "select", "t1", ".", "country_name", "from", "country", "as", "t1", "join", "match_season", "as", "t2", "on", "t1", ".", "country_id", "=", "t2", ".", "country", "where", "t2", ".", "position", "=", "value" ]
[ "What", "are", "the", "names", "of", "countries", "that", "have", "both", "players", "with", "position", "forward", "and", "players", "with", "position", "defender", "?" ]
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.
SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender"
[ "SELECT", "T1.Country_name", "FROM", "country", "AS", "T1", "JOIN", "match_season", "AS", "T2", "ON", "T1.Country_id", "=", "T2.Country", "WHERE", "T2.Position", "=", "``", "Forward", "''", "INTERSECT", "SELECT", "T1.Country_name", "FROM", "country", "AS", "T1", "JOIN", "match_season", "AS", "T2", "ON", "T1.Country_id", "=", "T2.Country", "WHERE", "T2.Position", "=", "``", "Defender", "''" ]
[ "select", "t1", ".", "country_name", "from", "country", "as", "t1", "join", "match_season", "as", "t2", "on", "t1", ".", "country_id", "=", "t2", ".", "country", "where", "t2", ".", "position", "=", "value", "intersect", "select", "t1", ".", "country_name", "from", "country", "as", "t1", "join", "match_season", "as", "t2", "on", "t1", ".", "country_id", "=", "t2", ".", "country", "where", "t2", ".", "position", "=", "value" ]
[ "Return", "the", "names", "of", "countries", "that", "have", "players", "that", "play", "the", "Forward", "position", ",", "as", "well", "as", "players", "who", "play", "the", "Defender", "position", "." ]
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
Which college have both players with position midfielder and players with position defender?
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender"
[ "SELECT", "College", "FROM", "match_season", "WHERE", "POSITION", "=", "``", "Midfielder", "''", "INTERSECT", "SELECT", "College", "FROM", "match_season", "WHERE", "POSITION", "=", "``", "Defender", "''" ]
[ "select", "college", "from", "match_season", "where", "position", "=", "value", "intersect", "select", "college", "from", "match_season", "where", "position", "=", "value" ]
[ "Which", "college", "have", "both", "players", "with", "position", "midfielder", "and", "players", "with", "position", "defender", "?" ]
match_season
[ "CREATE TABLE \"country\" (\n \"Country_id\" int,\n \"Country_name\" text,\n \"Capital\" text,\n \"Official_native_language\" text,\n PRIMARY KEY (\"Country_id\")\n);", "CREATE TABLE `team` (\n `Team_id` int,\n `Name` text,\n PRIMARY KEY (`Team_id`)\n) ;", "CREATE TABLE \"match_season\" (\n \"Season\" real,\n \"Player\" text,\n \"Position\" text,\n \"Country\" int,\n \"Team\" int,\n \"Draft_Pick_Number\" int,\n \"Draft_Class\" text,\n \"College\" text,\n PRIMARY KEY (\"Season\"),\n FOREIGN KEY (`Country`) REFERENCES `country`(`Country_id`),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);", "CREATE TABLE \"player\" (\n \"Player_ID\" int,\n \"Player\" text,\n \"Years_Played\" text,\n \"Total_WL\" text,\n \"Singles_WL\" text,\n \"Doubles_WL\" text,\n \"Team\" int,\n PRIMARY KEY (\"Player_ID\"),\n FOREIGN KEY (`Team`) REFERENCES `team`(`Team_id`)\n);" ]
Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender"
[ "SELECT", "College", "FROM", "match_season", "WHERE", "POSITION", "=", "``", "Midfielder", "''", "INTERSECT", "SELECT", "College", "FROM", "match_season", "WHERE", "POSITION", "=", "``", "Defender", "''" ]
[ "select", "college", "from", "match_season", "where", "position", "=", "value", "intersect", "select", "college", "from", "match_season", "where", "position", "=", "value" ]
[ "Return", "the", "colleges", "that", "have", "players", "who", "play", "the", "Midfielder", "position", ",", "as", "well", "as", "players", "who", "play", "the", "Defender", "position", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
How many climbers are there?
SELECT count(*) FROM climber
[ "SELECT", "count", "(", "*", ")", "FROM", "climber" ]
[ "select", "count", "(", "*", ")", "from", "climber" ]
[ "How", "many", "climbers", "are", "there", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Count the number of climbers.
SELECT count(*) FROM climber
[ "SELECT", "count", "(", "*", ")", "FROM", "climber" ]
[ "select", "count", "(", "*", ")", "from", "climber" ]
[ "Count", "the", "number", "of", "climbers", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
List the names of climbers in descending order of points.
SELECT Name FROM climber ORDER BY Points DESC
[ "SELECT", "Name", "FROM", "climber", "ORDER", "BY", "Points", "DESC" ]
[ "select", "name", "from", "climber", "order", "by", "points", "desc" ]
[ "List", "the", "names", "of", "climbers", "in", "descending", "order", "of", "points", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the names of the climbers, ordered by points descending?
SELECT Name FROM climber ORDER BY Points DESC
[ "SELECT", "Name", "FROM", "climber", "ORDER", "BY", "Points", "DESC" ]
[ "select", "name", "from", "climber", "order", "by", "points", "desc" ]
[ "What", "are", "the", "names", "of", "the", "climbers", ",", "ordered", "by", "points", "descending", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
List the names of climbers whose country is not Switzerland.
SELECT Name FROM climber WHERE Country != "Switzerland"
[ "SELECT", "Name", "FROM", "climber", "WHERE", "Country", "!", "=", "``", "Switzerland", "''" ]
[ "select", "name", "from", "climber", "where", "country", "!", "=", "value" ]
[ "List", "the", "names", "of", "climbers", "whose", "country", "is", "not", "Switzerland", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the names of climbers who are not from the country of Switzerland?
SELECT Name FROM climber WHERE Country != "Switzerland"
[ "SELECT", "Name", "FROM", "climber", "WHERE", "Country", "!", "=", "``", "Switzerland", "''" ]
[ "select", "name", "from", "climber", "where", "country", "!", "=", "value" ]
[ "What", "are", "the", "names", "of", "climbers", "who", "are", "not", "from", "the", "country", "of", "Switzerland", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What is the maximum point for climbers whose country is United Kingdom?
SELECT max(Points) FROM climber WHERE Country = "United Kingdom"
[ "SELECT", "max", "(", "Points", ")", "FROM", "climber", "WHERE", "Country", "=", "``", "United", "Kingdom", "''" ]
[ "select", "max", "(", "points", ")", "from", "climber", "where", "country", "=", "value" ]
[ "What", "is", "the", "maximum", "point", "for", "climbers", "whose", "country", "is", "United", "Kingdom", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Return the maximum number of points for climbers from the United Kingdom.
SELECT max(Points) FROM climber WHERE Country = "United Kingdom"
[ "SELECT", "max", "(", "Points", ")", "FROM", "climber", "WHERE", "Country", "=", "``", "United", "Kingdom", "''" ]
[ "select", "max", "(", "points", ")", "from", "climber", "where", "country", "=", "value" ]
[ "Return", "the", "maximum", "number", "of", "points", "for", "climbers", "from", "the", "United", "Kingdom", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
How many distinct countries are the climbers from?
SELECT COUNT(DISTINCT Country) FROM climber
[ "SELECT", "COUNT", "(", "DISTINCT", "Country", ")", "FROM", "climber" ]
[ "select", "count", "(", "distinct", "country", ")", "from", "climber" ]
[ "How", "many", "distinct", "countries", "are", "the", "climbers", "from", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Count the number of different countries that climbers are from.
SELECT COUNT(DISTINCT Country) FROM climber
[ "SELECT", "COUNT", "(", "DISTINCT", "Country", ")", "FROM", "climber" ]
[ "select", "count", "(", "distinct", "country", ")", "from", "climber" ]
[ "Count", "the", "number", "of", "different", "countries", "that", "climbers", "are", "from", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the names of mountains in ascending alphabetical order?
SELECT Name FROM mountain ORDER BY Name ASC
[ "SELECT", "Name", "FROM", "mountain", "ORDER", "BY", "Name", "ASC" ]
[ "select", "name", "from", "mountain", "order", "by", "name", "asc" ]
[ "What", "are", "the", "names", "of", "mountains", "in", "ascending", "alphabetical", "order", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Give the names of mountains in alphabetical order.
SELECT Name FROM mountain ORDER BY Name ASC
[ "SELECT", "Name", "FROM", "mountain", "ORDER", "BY", "Name", "ASC" ]
[ "select", "name", "from", "mountain", "order", "by", "name", "asc" ]
[ "Give", "the", "names", "of", "mountains", "in", "alphabetical", "order", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the countries of mountains with height bigger than 5000?
SELECT Country FROM mountain WHERE Height > 5000
[ "SELECT", "Country", "FROM", "mountain", "WHERE", "Height", ">", "5000" ]
[ "select", "country", "from", "mountain", "where", "height", ">", "value" ]
[ "What", "are", "the", "countries", "of", "mountains", "with", "height", "bigger", "than", "5000", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Return the countries of the mountains that have a height larger than 5000.
SELECT Country FROM mountain WHERE Height > 5000
[ "SELECT", "Country", "FROM", "mountain", "WHERE", "Height", ">", "5000" ]
[ "select", "country", "from", "mountain", "where", "height", ">", "value" ]
[ "Return", "the", "countries", "of", "the", "mountains", "that", "have", "a", "height", "larger", "than", "5000", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What is the name of the highest mountain?
SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1
[ "SELECT", "Name", "FROM", "mountain", "ORDER", "BY", "Height", "DESC", "LIMIT", "1" ]
[ "select", "name", "from", "mountain", "order", "by", "height", "desc", "limit", "value" ]
[ "What", "is", "the", "name", "of", "the", "highest", "mountain", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Return the name of the mountain with the greatest height.
SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1
[ "SELECT", "Name", "FROM", "mountain", "ORDER", "BY", "Height", "DESC", "LIMIT", "1" ]
[ "select", "name", "from", "mountain", "order", "by", "height", "desc", "limit", "value" ]
[ "Return", "the", "name", "of", "the", "mountain", "with", "the", "greatest", "height", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
List the distinct ranges of the mountains with the top 3 prominence.
SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3
[ "SELECT", "DISTINCT", "Range", "FROM", "mountain", "ORDER", "BY", "Prominence", "DESC", "LIMIT", "3" ]
[ "select", "distinct", "range", "from", "mountain", "order", "by", "prominence", "desc", "limit", "value" ]
[ "List", "the", "distinct", "ranges", "of", "the", "mountains", "with", "the", "top", "3", "prominence", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the different ranges of the 3 mountains with the highest prominence?
SELECT DISTINCT Range FROM mountain ORDER BY Prominence DESC LIMIT 3
[ "SELECT", "DISTINCT", "Range", "FROM", "mountain", "ORDER", "BY", "Prominence", "DESC", "LIMIT", "3" ]
[ "select", "distinct", "range", "from", "mountain", "order", "by", "prominence", "desc", "limit", "value" ]
[ "What", "are", "the", "different", "ranges", "of", "the", "3", "mountains", "with", "the", "highest", "prominence", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Show names of climbers and the names of mountains they climb.
SELECT T1.Name , T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID
[ "SELECT", "T1.Name", ",", "T2.Name", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID" ]
[ "select", "t1", ".", "name", ",", "t2", ".", "name", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id" ]
[ "Show", "names", "of", "climbers", "and", "the", "names", "of", "mountains", "they", "climb", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the names of climbers and the corresponding names of mountains that they climb?
SELECT T1.Name , T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID
[ "SELECT", "T1.Name", ",", "T2.Name", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID" ]
[ "select", "t1", ".", "name", ",", "t2", ".", "name", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id" ]
[ "What", "are", "the", "names", "of", "climbers", "and", "the", "corresponding", "names", "of", "mountains", "that", "they", "climb", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Show the names of climbers and the heights of mountains they climb.
SELECT T1.Name , T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID
[ "SELECT", "T1.Name", ",", "T2.Height", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID" ]
[ "select", "t1", ".", "name", ",", "t2", ".", "height", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id" ]
[ "Show", "the", "names", "of", "climbers", "and", "the", "heights", "of", "mountains", "they", "climb", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the names of climbers and the corresponding heights of the mountains that they climb?
SELECT T1.Name , T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID
[ "SELECT", "T1.Name", ",", "T2.Height", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID" ]
[ "select", "t1", ".", "name", ",", "t2", ".", "height", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id" ]
[ "What", "are", "the", "names", "of", "climbers", "and", "the", "corresponding", "heights", "of", "the", "mountains", "that", "they", "climb", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Show the height of the mountain climbed by the climber with the maximum points.
SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1
[ "SELECT", "T2.Height", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID", "ORDER", "BY", "T1.Points", "DESC", "LIMIT", "1" ]
[ "select", "t2", ".", "height", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id", "order", "by", "t1", ".", "points", "desc", "limit", "value" ]
[ "Show", "the", "height", "of", "the", "mountain", "climbed", "by", "the", "climber", "with", "the", "maximum", "points", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What is the height of the mountain climbined by the climbing who had the most points?
SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1
[ "SELECT", "T2.Height", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID", "ORDER", "BY", "T1.Points", "DESC", "LIMIT", "1" ]
[ "select", "t2", ".", "height", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id", "order", "by", "t1", ".", "points", "desc", "limit", "value" ]
[ "What", "is", "the", "height", "of", "the", "mountain", "climbined", "by", "the", "climbing", "who", "had", "the", "most", "points", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Show the distinct names of mountains climbed by climbers from country "West Germany".
SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = "West Germany"
[ "SELECT", "DISTINCT", "T2.Name", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID", "WHERE", "T1.Country", "=", "``", "West", "Germany", "''" ]
[ "select", "distinct", "t2", ".", "name", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id", "where", "t1", ".", "country", "=", "value" ]
[ "Show", "the", "distinct", "names", "of", "mountains", "climbed", "by", "climbers", "from", "country", "``", "West", "Germany", "''", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the different names of mountains ascended by climbers from the country of West Germany?
SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = "West Germany"
[ "SELECT", "DISTINCT", "T2.Name", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID", "WHERE", "T1.Country", "=", "``", "West", "Germany", "''" ]
[ "select", "distinct", "t2", ".", "name", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id", "where", "t1", ".", "country", "=", "value" ]
[ "What", "are", "the", "different", "names", "of", "mountains", "ascended", "by", "climbers", "from", "the", "country", "of", "West", "Germany", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Show the times used by climbers to climb mountains in Country Uganda.
SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda"
[ "SELECT", "T1.Time", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID", "WHERE", "T2.Country", "=", "``", "Uganda", "''" ]
[ "select", "t1", ".", "time", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id", "where", "t2", ".", "country", "=", "value" ]
[ "Show", "the", "times", "used", "by", "climbers", "to", "climb", "mountains", "in", "Country", "Uganda", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the times used by climbers who climbed mountains in the country of Uganda?
SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda"
[ "SELECT", "T1.Time", "FROM", "climber", "AS", "T1", "JOIN", "mountain", "AS", "T2", "ON", "T1.Mountain_ID", "=", "T2.Mountain_ID", "WHERE", "T2.Country", "=", "``", "Uganda", "''" ]
[ "select", "t1", ".", "time", "from", "climber", "as", "t1", "join", "mountain", "as", "t2", "on", "t1", ".", "mountain_id", "=", "t2", ".", "mountain_id", "where", "t2", ".", "country", "=", "value" ]
[ "What", "are", "the", "times", "used", "by", "climbers", "who", "climbed", "mountains", "in", "the", "country", "of", "Uganda", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Please show the countries and the number of climbers from each country.
SELECT Country , COUNT(*) FROM climber GROUP BY Country
[ "SELECT", "Country", ",", "COUNT", "(", "*", ")", "FROM", "climber", "GROUP", "BY", "Country" ]
[ "select", "country", ",", "count", "(", "*", ")", "from", "climber", "group", "by", "country" ]
[ "Please", "show", "the", "countries", "and", "the", "number", "of", "climbers", "from", "each", "country", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
How many climbers are from each country?
SELECT Country , COUNT(*) FROM climber GROUP BY Country
[ "SELECT", "Country", ",", "COUNT", "(", "*", ")", "FROM", "climber", "GROUP", "BY", "Country" ]
[ "select", "country", ",", "count", "(", "*", ")", "from", "climber", "group", "by", "country" ]
[ "How", "many", "climbers", "are", "from", "each", "country", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
List the countries that have more than one mountain.
SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1
[ "SELECT", "Country", "FROM", "mountain", "GROUP", "BY", "Country", "HAVING", "COUNT", "(", "*", ")", ">", "1" ]
[ "select", "country", "from", "mountain", "group", "by", "country", "having", "count", "(", "*", ")", ">", "value" ]
[ "List", "the", "countries", "that", "have", "more", "than", "one", "mountain", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Which countries have more than one mountain?
SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*) > 1
[ "SELECT", "Country", "FROM", "mountain", "GROUP", "BY", "Country", "HAVING", "COUNT", "(", "*", ")", ">", "1" ]
[ "select", "country", "from", "mountain", "group", "by", "country", "having", "count", "(", "*", ")", ">", "value" ]
[ "Which", "countries", "have", "more", "than", "one", "mountain", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
List the names of mountains that do not have any climber.
SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)
[ "SELECT", "Name", "FROM", "mountain", "WHERE", "Mountain_ID", "NOT", "IN", "(", "SELECT", "Mountain_ID", "FROM", "climber", ")" ]
[ "select", "name", "from", "mountain", "where", "mountain_id", "not", "in", "(", "select", "mountain_id", "from", "climber", ")" ]
[ "List", "the", "names", "of", "mountains", "that", "do", "not", "have", "any", "climber", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the names of countains that no climber has climbed?
SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)
[ "SELECT", "Name", "FROM", "mountain", "WHERE", "Mountain_ID", "NOT", "IN", "(", "SELECT", "Mountain_ID", "FROM", "climber", ")" ]
[ "select", "name", "from", "mountain", "where", "mountain_id", "not", "in", "(", "select", "mountain_id", "from", "climber", ")" ]
[ "What", "are", "the", "names", "of", "countains", "that", "no", "climber", "has", "climbed", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.
SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200
[ "SELECT", "Country", "FROM", "mountain", "WHERE", "Height", ">", "5600", "INTERSECT", "SELECT", "Country", "FROM", "mountain", "WHERE", "Height", "<", "5200" ]
[ "select", "country", "from", "mountain", "where", "height", ">", "value", "intersect", "select", "country", "from", "mountain", "where", "height", "<", "value" ]
[ "Show", "the", "countries", "that", "have", "mountains", "with", "height", "more", "than", "5600", "stories", "and", "mountains", "with", "height", "less", "than", "5200", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the countries that have both mountains that are higher than 5600 and lower than 5200?
SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200
[ "SELECT", "Country", "FROM", "mountain", "WHERE", "Height", ">", "5600", "INTERSECT", "SELECT", "Country", "FROM", "mountain", "WHERE", "Height", "<", "5200" ]
[ "select", "country", "from", "mountain", "where", "height", ">", "value", "intersect", "select", "country", "from", "mountain", "where", "height", "<", "value" ]
[ "What", "are", "the", "countries", "that", "have", "both", "mountains", "that", "are", "higher", "than", "5600", "and", "lower", "than", "5200", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Show the range that has the most number of mountains.
SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1
[ "SELECT", "Range", "FROM", "mountain", "GROUP", "BY", "Range", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "range", "from", "mountain", "group", "by", "range", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Show", "the", "range", "that", "has", "the", "most", "number", "of", "mountains", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Which range contains the most mountains?
SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1
[ "SELECT", "Range", "FROM", "mountain", "GROUP", "BY", "Range", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "range", "from", "mountain", "group", "by", "range", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Which", "range", "contains", "the", "most", "mountains", "?" ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
Show the names of mountains with height more than 5000 or prominence more than 1000.
SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000
[ "SELECT", "Name", "FROM", "mountain", "WHERE", "Height", ">", "5000", "OR", "Prominence", ">", "1000" ]
[ "select", "name", "from", "mountain", "where", "height", ">", "value", "or", "prominence", ">", "value" ]
[ "Show", "the", "names", "of", "mountains", "with", "height", "more", "than", "5000", "or", "prominence", "more", "than", "1000", "." ]
climbing
[ "CREATE TABLE \"mountain\" (\n\"Mountain_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Prominence\" real,\n\"Range\" text,\n\"Country\" text,\nPRIMARY KEY (\"Mountain_ID\")\n);", "CREATE TABLE \"climber\" (\n\"Climber_ID\" int,\n\"Name\" text,\n\"Country\" text,\n\"Time\" text,\n\"Points\" real,\n\"Mountain_ID\" int,\nPRIMARY KEY (\"Climber_ID\"),\nFOREIGN KEY (\"Mountain_ID\") REFERENCES \"mountain\"(\"Mountain_ID\")\n);" ]
What are the names of mountains that have a height of over 5000 or a prominence of over 1000?
SELECT Name FROM mountain WHERE Height > 5000 OR Prominence > 1000
[ "SELECT", "Name", "FROM", "mountain", "WHERE", "Height", ">", "5000", "OR", "Prominence", ">", "1000" ]
[ "select", "name", "from", "mountain", "where", "height", ">", "value", "or", "prominence", ">", "value" ]
[ "What", "are", "the", "names", "of", "mountains", "that", "have", "a", "height", "of", "over", "5000", "or", "a", "prominence", "of", "over", "1000", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
How many body builders are there?
SELECT count(*) FROM body_builder
[ "SELECT", "count", "(", "*", ")", "FROM", "body_builder" ]
[ "select", "count", "(", "*", ")", "from", "body_builder" ]
[ "How", "many", "body", "builders", "are", "there", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
List the total scores of body builders in ascending order.
SELECT Total FROM body_builder ORDER BY Total ASC
[ "SELECT", "Total", "FROM", "body_builder", "ORDER", "BY", "Total", "ASC" ]
[ "select", "total", "from", "body_builder", "order", "by", "total", "asc" ]
[ "List", "the", "total", "scores", "of", "body", "builders", "in", "ascending", "order", "." ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
List the snatch score and clean jerk score of body builders in ascending order of snatch score.
SELECT Snatch , Clean_Jerk FROM body_builder ORDER BY Snatch ASC
[ "SELECT", "Snatch", ",", "Clean_Jerk", "FROM", "body_builder", "ORDER", "BY", "Snatch", "ASC" ]
[ "select", "snatch", ",", "clean_jerk", "from", "body_builder", "order", "by", "snatch", "asc" ]
[ "List", "the", "snatch", "score", "and", "clean", "jerk", "score", "of", "body", "builders", "in", "ascending", "order", "of", "snatch", "score", "." ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What is the average snatch score of body builders?
SELECT avg(Snatch) FROM body_builder
[ "SELECT", "avg", "(", "Snatch", ")", "FROM", "body_builder" ]
[ "select", "avg", "(", "snatch", ")", "from", "body_builder" ]
[ "What", "is", "the", "average", "snatch", "score", "of", "body", "builders", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What are the clean and jerk score of the body builder with the highest total score?
SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1
[ "SELECT", "Clean_Jerk", "FROM", "body_builder", "ORDER", "BY", "Total", "DESC", "LIMIT", "1" ]
[ "select", "clean_jerk", "from", "body_builder", "order", "by", "total", "desc", "limit", "value" ]
[ "What", "are", "the", "clean", "and", "jerk", "score", "of", "the", "body", "builder", "with", "the", "highest", "total", "score", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What are the birthdays of people in ascending order of height?
SELECT Birth_Date FROM People ORDER BY Height ASC
[ "SELECT", "Birth_Date", "FROM", "People", "ORDER", "BY", "Height", "ASC" ]
[ "select", "birth_date", "from", "people", "order", "by", "height", "asc" ]
[ "What", "are", "the", "birthdays", "of", "people", "in", "ascending", "order", "of", "height", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What are the names of body builders?
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID
[ "SELECT", "T2.Name", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID" ]
[ "select", "t2", ".", "name", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id" ]
[ "What", "are", "the", "names", "of", "body", "builders", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What are the names of body builders whose total score is higher than 300?
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300
[ "SELECT", "T2.Name", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T1.Total", ">", "300" ]
[ "select", "t2", ".", "name", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t1", ".", "total", ">", "value" ]
[ "What", "are", "the", "names", "of", "body", "builders", "whose", "total", "score", "is", "higher", "than", "300", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What is the name of the body builder with the greatest body weight?
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1
[ "SELECT", "T2.Name", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T2.Weight", "DESC", "LIMIT", "1" ]
[ "select", "t2", ".", "name", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t2", ".", "weight", "desc", "limit", "value" ]
[ "What", "is", "the", "name", "of", "the", "body", "builder", "with", "the", "greatest", "body", "weight", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What are the birth date and birth place of the body builder with the highest total points?
SELECT T2.Birth_Date , T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1
[ "SELECT", "T2.Birth_Date", ",", "T2.Birth_Place", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Total", "DESC", "LIMIT", "1" ]
[ "select", "t2", ".", "birth_date", ",", "t2", ".", "birth_place", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "total", "desc", "limit", "value" ]
[ "What", "are", "the", "birth", "date", "and", "birth", "place", "of", "the", "body", "builder", "with", "the", "highest", "total", "points", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What are the heights of body builders with total score smaller than 315?
SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315
[ "SELECT", "T2.Height", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T1.Total", "<", "315" ]
[ "select", "t2", ".", "height", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t1", ".", "total", "<", "value" ]
[ "What", "are", "the", "heights", "of", "body", "builders", "with", "total", "score", "smaller", "than", "315", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What is the average total score of body builders with height bigger than 200?
SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200
[ "SELECT", "avg", "(", "T1.Total", ")", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "WHERE", "T2.Height", ">", "200" ]
[ "select", "avg", "(", "t1", ".", "total", ")", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t2", ".", "height", ">", "value" ]
[ "What", "is", "the", "average", "total", "score", "of", "body", "builders", "with", "height", "bigger", "than", "200", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What are the names of body builders in descending order of total scores?
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC
[ "SELECT", "T2.Name", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.People_ID", "=", "T2.People_ID", "ORDER", "BY", "T1.Total", "DESC" ]
[ "select", "t2", ".", "name", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "order", "by", "t1", ".", "total", "desc" ]
[ "What", "are", "the", "names", "of", "body", "builders", "in", "descending", "order", "of", "total", "scores", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
List each birth place along with the number of people from there.
SELECT Birth_Place , COUNT(*) FROM people GROUP BY Birth_Place
[ "SELECT", "Birth_Place", ",", "COUNT", "(", "*", ")", "FROM", "people", "GROUP", "BY", "Birth_Place" ]
[ "select", "birth_place", ",", "count", "(", "*", ")", "from", "people", "group", "by", "birth_place" ]
[ "List", "each", "birth", "place", "along", "with", "the", "number", "of", "people", "from", "there", "." ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What is the most common birth place of people?
SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1
[ "SELECT", "Birth_Place", "FROM", "people", "GROUP", "BY", "Birth_Place", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "birth_place", "from", "people", "group", "by", "birth_place", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "is", "the", "most", "common", "birth", "place", "of", "people", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What are the birth places that are shared by at least two people?
SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*) >= 2
[ "SELECT", "Birth_Place", "FROM", "people", "GROUP", "BY", "Birth_Place", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ]
[ "select", "birth_place", "from", "people", "group", "by", "birth_place", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "What", "are", "the", "birth", "places", "that", "are", "shared", "by", "at", "least", "two", "people", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
List the height and weight of people in descending order of height.
SELECT Height , Weight FROM people ORDER BY Height DESC
[ "SELECT", "Height", ",", "Weight", "FROM", "people", "ORDER", "BY", "Height", "DESC" ]
[ "select", "height", ",", "weight", "from", "people", "order", "by", "height", "desc" ]
[ "List", "the", "height", "and", "weight", "of", "people", "in", "descending", "order", "of", "height", "." ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
Show all information about each body builder.
SELECT * FROM body_builder
[ "SELECT", "*", "FROM", "body_builder" ]
[ "select", "*", "from", "body_builder" ]
[ "Show", "all", "information", "about", "each", "body", "builder", "." ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
List the names and origins of people who are not body builders.
SELECT Name , birth_place FROM people EXCEPT SELECT T1.Name , T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id
[ "SELECT", "Name", ",", "birth_place", "FROM", "people", "EXCEPT", "SELECT", "T1.Name", ",", "T1.birth_place", "FROM", "people", "AS", "T1", "JOIN", "body_builder", "AS", "T2", "ON", "T1.people_id", "=", "T2.people_id" ]
[ "select", "name", ",", "birth_place", "from", "people", "except", "select", "t1", ".", "name", ",", "t1", ".", "birth_place", "from", "people", "as", "t1", "join", "body_builder", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id" ]
[ "List", "the", "names", "and", "origins", "of", "people", "who", "are", "not", "body", "builders", "." ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
How many distinct birth places are there?
SELECT count(DISTINCT Birth_Place) FROM people
[ "SELECT", "count", "(", "DISTINCT", "Birth_Place", ")", "FROM", "people" ]
[ "select", "count", "(", "distinct", "birth_place", ")", "from", "people" ]
[ "How", "many", "distinct", "birth", "places", "are", "there", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
How many persons are not body builders?
SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder)
[ "SELECT", "count", "(", "*", ")", "FROM", "people", "WHERE", "people_id", "NOT", "IN", "(", "SELECT", "People_ID", "FROM", "body_builder", ")" ]
[ "select", "count", "(", "*", ")", "from", "people", "where", "people_id", "not", "in", "(", "select", "people_id", "from", "body_builder", ")" ]
[ "How", "many", "persons", "are", "not", "body", "builders", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.
SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200;
[ "SELECT", "T2.weight", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.people_id", "=", "T2.people_id", "WHERE", "T1.snatch", ">", "140", "OR", "T2.height", ">", "200", ";" ]
[ "select", "t2", ".", "weight", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t1", ".", "snatch", ">", "value", "or", "t2", ".", "height", ">", "value" ]
[ "List", "the", "weight", "of", "the", "body", "builders", "who", "have", "snatch", "score", "higher", "than", "140", "or", "have", "the", "height", "greater", "than", "200", "." ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What are the total scores of the body builders whose birthday contains the string "January" ?
SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE "%January%";
[ "SELECT", "T1.total", "FROM", "body_builder", "AS", "T1", "JOIN", "people", "AS", "T2", "ON", "T1.people_id", "=", "T2.people_id", "WHERE", "T2.Birth_Date", "LIKE", "``", "%", "January", "%", "''", ";" ]
[ "select", "t1", ".", "total", "from", "body_builder", "as", "t1", "join", "people", "as", "t2", "on", "t1", ".", "people_id", "=", "t2", ".", "people_id", "where", "t2", ".", "birth_date", "like", "value" ]
[ "What", "are", "the", "total", "scores", "of", "the", "body", "builders", "whose", "birthday", "contains", "the", "string", "``", "January", "''", "?" ]
body_builder
[ "CREATE TABLE \"body_builder\" (\n\"Body_Builder_ID\" int,\n\"People_ID\" int,\n\"Snatch\" real,\n\"Clean_Jerk\" real,\n\"Total\" real,\nPRIMARY KEY (\"Body_Builder_ID\"),\nFOREIGN KEY (\"People_ID\") REFERENCES `people`(\"People_ID\")\n);", "CREATE TABLE \"people\" (\n\"People_ID\" int,\n\"Name\" text,\n\"Height\" real,\n\"Weight\" real,\n\"Birth_Date\" text,\n\"Birth_Place\" text,\nPRIMARY KEY (\"People_ID\")\n);" ]
What is the minimum snatch score?
SELECT min(snatch) FROM body_builder
[ "SELECT", "min", "(", "snatch", ")", "FROM", "body_builder" ]
[ "select", "min", "(", "snatch", ")", "from", "body_builder" ]
[ "What", "is", "the", "minimum", "snatch", "score", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
How many elections are there?
SELECT count(*) FROM election
[ "SELECT", "count", "(", "*", ")", "FROM", "election" ]
[ "select", "count", "(", "*", ")", "from", "election" ]
[ "How", "many", "elections", "are", "there", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
List the votes of elections in descending order.
SELECT Votes FROM election ORDER BY Votes DESC
[ "SELECT", "Votes", "FROM", "election", "ORDER", "BY", "Votes", "DESC" ]
[ "select", "votes", "from", "election", "order", "by", "votes", "desc" ]
[ "List", "the", "votes", "of", "elections", "in", "descending", "order", "." ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
List the dates and vote percents of elections.
SELECT Date , Vote_Percent FROM election
[ "SELECT", "Date", ",", "Vote_Percent", "FROM", "election" ]
[ "select", "date", ",", "vote_percent", "from", "election" ]
[ "List", "the", "dates", "and", "vote", "percents", "of", "elections", "." ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What are the minimum and maximum vote percents of elections?
SELECT min(Vote_Percent) , max(Vote_Percent) FROM election
[ "SELECT", "min", "(", "Vote_Percent", ")", ",", "max", "(", "Vote_Percent", ")", "FROM", "election" ]
[ "select", "min", "(", "vote_percent", ")", ",", "max", "(", "vote_percent", ")", "from", "election" ]
[ "What", "are", "the", "minimum", "and", "maximum", "vote", "percents", "of", "elections", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What are the names and parties of representatives?
SELECT Name , Party FROM representative
[ "SELECT", "Name", ",", "Party", "FROM", "representative" ]
[ "select", "name", ",", "party", "from", "representative" ]
[ "What", "are", "the", "names", "and", "parties", "of", "representatives", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What are the names of representatives whose party is not "Republican"?
SELECT Name FROM Representative WHERE Party != "Republican"
[ "SELECT", "Name", "FROM", "Representative", "WHERE", "Party", "!", "=", "``", "Republican", "''" ]
[ "select", "name", "from", "representative", "where", "party", "!", "=", "value" ]
[ "What", "are", "the", "names", "of", "representatives", "whose", "party", "is", "not", "``", "Republican", "''", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What are the life spans of representatives from New York state or Indiana state?
SELECT Lifespan FROM representative WHERE State = "New York" OR State = "Indiana"
[ "SELECT", "Lifespan", "FROM", "representative", "WHERE", "State", "=", "``", "New", "York", "''", "OR", "State", "=", "``", "Indiana", "''" ]
[ "select", "lifespan", "from", "representative", "where", "state", "=", "value", "or", "state", "=", "value" ]
[ "What", "are", "the", "life", "spans", "of", "representatives", "from", "New", "York", "state", "or", "Indiana", "state", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What are the names of representatives and the dates of elections they participated in.
SELECT T2.Name , T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID
[ "SELECT", "T2.Name", ",", "T1.Date", "FROM", "election", "AS", "T1", "JOIN", "representative", "AS", "T2", "ON", "T1.Representative_ID", "=", "T2.Representative_ID" ]
[ "select", "t2", ".", "name", ",", "t1", ".", "date", "from", "election", "as", "t1", "join", "representative", "as", "t2", "on", "t1", ".", "representative_id", "=", "t2", ".", "representative_id" ]
[ "What", "are", "the", "names", "of", "representatives", "and", "the", "dates", "of", "elections", "they", "participated", "in", "." ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What are the names of representatives with more than 10000 votes in election?
SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE Votes > 10000
[ "SELECT", "T2.Name", "FROM", "election", "AS", "T1", "JOIN", "representative", "AS", "T2", "ON", "T1.Representative_ID", "=", "T2.Representative_ID", "WHERE", "Votes", ">", "10000" ]
[ "select", "t2", ".", "name", "from", "election", "as", "t1", "join", "representative", "as", "t2", "on", "t1", ".", "representative_id", "=", "t2", ".", "representative_id", "where", "votes", ">", "value" ]
[ "What", "are", "the", "names", "of", "representatives", "with", "more", "than", "10000", "votes", "in", "election", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What are the names of representatives in descending order of votes?
SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC
[ "SELECT", "T2.Name", "FROM", "election", "AS", "T1", "JOIN", "representative", "AS", "T2", "ON", "T1.Representative_ID", "=", "T2.Representative_ID", "ORDER", "BY", "votes", "DESC" ]
[ "select", "t2", ".", "name", "from", "election", "as", "t1", "join", "representative", "as", "t2", "on", "t1", ".", "representative_id", "=", "t2", ".", "representative_id", "order", "by", "votes", "desc" ]
[ "What", "are", "the", "names", "of", "representatives", "in", "descending", "order", "of", "votes", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What is the party of the representative that has the smallest number of votes.
SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes ASC LIMIT 1
[ "SELECT", "T2.Party", "FROM", "election", "AS", "T1", "JOIN", "representative", "AS", "T2", "ON", "T1.Representative_ID", "=", "T2.Representative_ID", "ORDER", "BY", "votes", "ASC", "LIMIT", "1" ]
[ "select", "t2", ".", "party", "from", "election", "as", "t1", "join", "representative", "as", "t2", "on", "t1", ".", "representative_id", "=", "t2", ".", "representative_id", "order", "by", "votes", "asc", "limit", "value" ]
[ "What", "is", "the", "party", "of", "the", "representative", "that", "has", "the", "smallest", "number", "of", "votes", "." ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What are the lifespans of representatives in descending order of vote percent?
SELECT T2.Lifespan FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY Vote_Percent DESC
[ "SELECT", "T2.Lifespan", "FROM", "election", "AS", "T1", "JOIN", "representative", "AS", "T2", "ON", "T1.Representative_ID", "=", "T2.Representative_ID", "ORDER", "BY", "Vote_Percent", "DESC" ]
[ "select", "t2", ".", "lifespan", "from", "election", "as", "t1", "join", "representative", "as", "t2", "on", "t1", ".", "representative_id", "=", "t2", ".", "representative_id", "order", "by", "vote_percent", "desc" ]
[ "What", "are", "the", "lifespans", "of", "representatives", "in", "descending", "order", "of", "vote", "percent", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What is the average number of votes of representatives from party "Republican"?
SELECT avg(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican"
[ "SELECT", "avg", "(", "T1.Votes", ")", "FROM", "election", "AS", "T1", "JOIN", "representative", "AS", "T2", "ON", "T1.Representative_ID", "=", "T2.Representative_ID", "WHERE", "T2.Party", "=", "``", "Republican", "''" ]
[ "select", "avg", "(", "t1", ".", "votes", ")", "from", "election", "as", "t1", "join", "representative", "as", "t2", "on", "t1", ".", "representative_id", "=", "t2", ".", "representative_id", "where", "t2", ".", "party", "=", "value" ]
[ "What", "is", "the", "average", "number", "of", "votes", "of", "representatives", "from", "party", "``", "Republican", "''", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What are the different parties of representative? Show the party name and the number of representatives in each party.
SELECT Party , COUNT(*) FROM representative GROUP BY Party
[ "SELECT", "Party", ",", "COUNT", "(", "*", ")", "FROM", "representative", "GROUP", "BY", "Party" ]
[ "select", "party", ",", "count", "(", "*", ")", "from", "representative", "group", "by", "party" ]
[ "What", "are", "the", "different", "parties", "of", "representative", "?", "Show", "the", "party", "name", "and", "the", "number", "of", "representatives", "in", "each", "party", "." ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What is the party that has the largest number of representatives?
SELECT Party , COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
[ "SELECT", "Party", ",", "COUNT", "(", "*", ")", "FROM", "representative", "GROUP", "BY", "Party", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "party", ",", "count", "(", "*", ")", "from", "representative", "group", "by", "party", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "What", "is", "the", "party", "that", "has", "the", "largest", "number", "of", "representatives", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What parties have at least three representatives?
SELECT Party FROM representative GROUP BY Party HAVING COUNT(*) >= 3
[ "SELECT", "Party", "FROM", "representative", "GROUP", "BY", "Party", "HAVING", "COUNT", "(", "*", ")", ">", "=", "3" ]
[ "select", "party", "from", "representative", "group", "by", "party", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "What", "parties", "have", "at", "least", "three", "representatives", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
What states have at least two representatives?
SELECT State FROM representative GROUP BY State HAVING COUNT(*) >= 2
[ "SELECT", "State", "FROM", "representative", "GROUP", "BY", "State", "HAVING", "COUNT", "(", "*", ")", ">", "=", "2" ]
[ "select", "state", "from", "representative", "group", "by", "state", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "What", "states", "have", "at", "least", "two", "representatives", "?" ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
List the names of representatives that have not participated in elections listed here.
SELECT Name FROM representative WHERE Representative_ID NOT IN (SELECT Representative_ID FROM election)
[ "SELECT", "Name", "FROM", "representative", "WHERE", "Representative_ID", "NOT", "IN", "(", "SELECT", "Representative_ID", "FROM", "election", ")" ]
[ "select", "name", "from", "representative", "where", "representative_id", "not", "in", "(", "select", "representative_id", "from", "election", ")" ]
[ "List", "the", "names", "of", "representatives", "that", "have", "not", "participated", "in", "elections", "listed", "here", "." ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
Show the parties that have both representatives in New York state and representatives in Pennsylvania state.
SELECT Party FROM representative WHERE State = "New York" INTERSECT SELECT Party FROM representative WHERE State = "Pennsylvania"
[ "SELECT", "Party", "FROM", "representative", "WHERE", "State", "=", "``", "New", "York", "''", "INTERSECT", "SELECT", "Party", "FROM", "representative", "WHERE", "State", "=", "``", "Pennsylvania", "''" ]
[ "select", "party", "from", "representative", "where", "state", "=", "value", "intersect", "select", "party", "from", "representative", "where", "state", "=", "value" ]
[ "Show", "the", "parties", "that", "have", "both", "representatives", "in", "New", "York", "state", "and", "representatives", "in", "Pennsylvania", "state", "." ]
election_representative
[ "CREATE TABLE \"election\" (\n\"Election_ID\" int,\n\"Representative_ID\" int,\n\"Date\" text,\n\"Votes\" real,\n\"Vote_Percent\" real,\n\"Seats\" real,\n\"Place\" real,\nPRIMARY KEY (\"Election_ID\"),\nFOREIGN KEY (\"Representative_ID\") REFERENCES `representative`(\"Representative_ID\")\n);", "CREATE TABLE \"representative\" (\n\"Representative_ID\" int,\n\"Name\" text,\n\"State\" text,\n\"Party\" text,\n\"Lifespan\" text,\nPRIMARY KEY (\"Representative_ID\")\n);" ]
How many distinct parties are there for representatives?
SELECT count(DISTINCT Party) FROM representative
[ "SELECT", "count", "(", "DISTINCT", "Party", ")", "FROM", "representative" ]
[ "select", "count", "(", "distinct", "party", ")", "from", "representative" ]
[ "How", "many", "distinct", "parties", "are", "there", "for", "representatives", "?" ]
apartment_rentals
[ "CREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT NULL,\nbuilding_short_name CHAR(15),\nbuilding_full_name VARCHAR(80),\nbuilding_description VARCHAR(255),\nbuilding_address VARCHAR(255),\nbuilding_manager VARCHAR(50),\nbuilding_phone VARCHAR(80),\nPRIMARY KEY (building_id),\nUNIQUE (building_id)\n);", "CREATE TABLE Apartments (\napt_id INTEGER NOT NULL ,\nbuilding_id INTEGER NOT NULL,\napt_type_code CHAR(15),\napt_number CHAR(10),\nbathroom_count INTEGER,\nbedroom_count INTEGER,\nroom_count CHAR(5),\nPRIMARY KEY (apt_id),\nUNIQUE (apt_id),\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\n);", "CREATE TABLE Apartment_Facilities (\napt_id INTEGER NOT NULL,\nfacility_code CHAR(15) NOT NULL,\nPRIMARY KEY (apt_id, facility_code),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\n);", "CREATE TABLE Guests (\nguest_id INTEGER NOT NULL ,\ngender_code CHAR(1),\nguest_first_name VARCHAR(80),\nguest_last_name VARCHAR(80),\ndate_of_birth DATETIME,\nPRIMARY KEY (guest_id),\nUNIQUE (guest_id)\n);", "CREATE TABLE Apartment_Bookings (\napt_booking_id INTEGER NOT NULL,\napt_id INTEGER,\nguest_id INTEGER NOT NULL,\nbooking_status_code CHAR(15) NOT NULL,\nbooking_start_date DATETIME,\nbooking_end_date DATETIME,\nPRIMARY KEY (apt_booking_id),\nUNIQUE (apt_booking_id),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\n);", "CREATE TABLE View_Unit_Status (\napt_id INTEGER,\napt_booking_id INTEGER,\nstatus_date DATETIME NOT NULL,\navailable_yn BIT,\nPRIMARY KEY (status_date),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\n);" ]
How many apartment bookings are there in total?
SELECT count(*) FROM Apartment_Bookings
[ "SELECT", "count", "(", "*", ")", "FROM", "Apartment_Bookings" ]
[ "select", "count", "(", "*", ")", "from", "apartment_bookings" ]
[ "How", "many", "apartment", "bookings", "are", "there", "in", "total", "?" ]
apartment_rentals
[ "CREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT NULL,\nbuilding_short_name CHAR(15),\nbuilding_full_name VARCHAR(80),\nbuilding_description VARCHAR(255),\nbuilding_address VARCHAR(255),\nbuilding_manager VARCHAR(50),\nbuilding_phone VARCHAR(80),\nPRIMARY KEY (building_id),\nUNIQUE (building_id)\n);", "CREATE TABLE Apartments (\napt_id INTEGER NOT NULL ,\nbuilding_id INTEGER NOT NULL,\napt_type_code CHAR(15),\napt_number CHAR(10),\nbathroom_count INTEGER,\nbedroom_count INTEGER,\nroom_count CHAR(5),\nPRIMARY KEY (apt_id),\nUNIQUE (apt_id),\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\n);", "CREATE TABLE Apartment_Facilities (\napt_id INTEGER NOT NULL,\nfacility_code CHAR(15) NOT NULL,\nPRIMARY KEY (apt_id, facility_code),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\n);", "CREATE TABLE Guests (\nguest_id INTEGER NOT NULL ,\ngender_code CHAR(1),\nguest_first_name VARCHAR(80),\nguest_last_name VARCHAR(80),\ndate_of_birth DATETIME,\nPRIMARY KEY (guest_id),\nUNIQUE (guest_id)\n);", "CREATE TABLE Apartment_Bookings (\napt_booking_id INTEGER NOT NULL,\napt_id INTEGER,\nguest_id INTEGER NOT NULL,\nbooking_status_code CHAR(15) NOT NULL,\nbooking_start_date DATETIME,\nbooking_end_date DATETIME,\nPRIMARY KEY (apt_booking_id),\nUNIQUE (apt_booking_id),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\n);", "CREATE TABLE View_Unit_Status (\napt_id INTEGER,\napt_booking_id INTEGER,\nstatus_date DATETIME NOT NULL,\navailable_yn BIT,\nPRIMARY KEY (status_date),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\n);" ]
Count the total number of apartment bookings.
SELECT count(*) FROM Apartment_Bookings
[ "SELECT", "count", "(", "*", ")", "FROM", "Apartment_Bookings" ]
[ "select", "count", "(", "*", ")", "from", "apartment_bookings" ]
[ "Count", "the", "total", "number", "of", "apartment", "bookings", "." ]
apartment_rentals
[ "CREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT NULL,\nbuilding_short_name CHAR(15),\nbuilding_full_name VARCHAR(80),\nbuilding_description VARCHAR(255),\nbuilding_address VARCHAR(255),\nbuilding_manager VARCHAR(50),\nbuilding_phone VARCHAR(80),\nPRIMARY KEY (building_id),\nUNIQUE (building_id)\n);", "CREATE TABLE Apartments (\napt_id INTEGER NOT NULL ,\nbuilding_id INTEGER NOT NULL,\napt_type_code CHAR(15),\napt_number CHAR(10),\nbathroom_count INTEGER,\nbedroom_count INTEGER,\nroom_count CHAR(5),\nPRIMARY KEY (apt_id),\nUNIQUE (apt_id),\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\n);", "CREATE TABLE Apartment_Facilities (\napt_id INTEGER NOT NULL,\nfacility_code CHAR(15) NOT NULL,\nPRIMARY KEY (apt_id, facility_code),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\n);", "CREATE TABLE Guests (\nguest_id INTEGER NOT NULL ,\ngender_code CHAR(1),\nguest_first_name VARCHAR(80),\nguest_last_name VARCHAR(80),\ndate_of_birth DATETIME,\nPRIMARY KEY (guest_id),\nUNIQUE (guest_id)\n);", "CREATE TABLE Apartment_Bookings (\napt_booking_id INTEGER NOT NULL,\napt_id INTEGER,\nguest_id INTEGER NOT NULL,\nbooking_status_code CHAR(15) NOT NULL,\nbooking_start_date DATETIME,\nbooking_end_date DATETIME,\nPRIMARY KEY (apt_booking_id),\nUNIQUE (apt_booking_id),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\n);", "CREATE TABLE View_Unit_Status (\napt_id INTEGER,\napt_booking_id INTEGER,\nstatus_date DATETIME NOT NULL,\navailable_yn BIT,\nPRIMARY KEY (status_date),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\n);" ]
Show the start dates and end dates of all the apartment bookings.
SELECT booking_start_date , booking_end_date FROM Apartment_Bookings
[ "SELECT", "booking_start_date", ",", "booking_end_date", "FROM", "Apartment_Bookings" ]
[ "select", "booking_start_date", ",", "booking_end_date", "from", "apartment_bookings" ]
[ "Show", "the", "start", "dates", "and", "end", "dates", "of", "all", "the", "apartment", "bookings", "." ]
apartment_rentals
[ "CREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT NULL,\nbuilding_short_name CHAR(15),\nbuilding_full_name VARCHAR(80),\nbuilding_description VARCHAR(255),\nbuilding_address VARCHAR(255),\nbuilding_manager VARCHAR(50),\nbuilding_phone VARCHAR(80),\nPRIMARY KEY (building_id),\nUNIQUE (building_id)\n);", "CREATE TABLE Apartments (\napt_id INTEGER NOT NULL ,\nbuilding_id INTEGER NOT NULL,\napt_type_code CHAR(15),\napt_number CHAR(10),\nbathroom_count INTEGER,\nbedroom_count INTEGER,\nroom_count CHAR(5),\nPRIMARY KEY (apt_id),\nUNIQUE (apt_id),\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\n);", "CREATE TABLE Apartment_Facilities (\napt_id INTEGER NOT NULL,\nfacility_code CHAR(15) NOT NULL,\nPRIMARY KEY (apt_id, facility_code),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\n);", "CREATE TABLE Guests (\nguest_id INTEGER NOT NULL ,\ngender_code CHAR(1),\nguest_first_name VARCHAR(80),\nguest_last_name VARCHAR(80),\ndate_of_birth DATETIME,\nPRIMARY KEY (guest_id),\nUNIQUE (guest_id)\n);", "CREATE TABLE Apartment_Bookings (\napt_booking_id INTEGER NOT NULL,\napt_id INTEGER,\nguest_id INTEGER NOT NULL,\nbooking_status_code CHAR(15) NOT NULL,\nbooking_start_date DATETIME,\nbooking_end_date DATETIME,\nPRIMARY KEY (apt_booking_id),\nUNIQUE (apt_booking_id),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\n);", "CREATE TABLE View_Unit_Status (\napt_id INTEGER,\napt_booking_id INTEGER,\nstatus_date DATETIME NOT NULL,\navailable_yn BIT,\nPRIMARY KEY (status_date),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\n);" ]
What are the start date and end date of each apartment booking?
SELECT booking_start_date , booking_end_date FROM Apartment_Bookings
[ "SELECT", "booking_start_date", ",", "booking_end_date", "FROM", "Apartment_Bookings" ]
[ "select", "booking_start_date", ",", "booking_end_date", "from", "apartment_bookings" ]
[ "What", "are", "the", "start", "date", "and", "end", "date", "of", "each", "apartment", "booking", "?" ]
apartment_rentals
[ "CREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT NULL,\nbuilding_short_name CHAR(15),\nbuilding_full_name VARCHAR(80),\nbuilding_description VARCHAR(255),\nbuilding_address VARCHAR(255),\nbuilding_manager VARCHAR(50),\nbuilding_phone VARCHAR(80),\nPRIMARY KEY (building_id),\nUNIQUE (building_id)\n);", "CREATE TABLE Apartments (\napt_id INTEGER NOT NULL ,\nbuilding_id INTEGER NOT NULL,\napt_type_code CHAR(15),\napt_number CHAR(10),\nbathroom_count INTEGER,\nbedroom_count INTEGER,\nroom_count CHAR(5),\nPRIMARY KEY (apt_id),\nUNIQUE (apt_id),\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\n);", "CREATE TABLE Apartment_Facilities (\napt_id INTEGER NOT NULL,\nfacility_code CHAR(15) NOT NULL,\nPRIMARY KEY (apt_id, facility_code),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\n);", "CREATE TABLE Guests (\nguest_id INTEGER NOT NULL ,\ngender_code CHAR(1),\nguest_first_name VARCHAR(80),\nguest_last_name VARCHAR(80),\ndate_of_birth DATETIME,\nPRIMARY KEY (guest_id),\nUNIQUE (guest_id)\n);", "CREATE TABLE Apartment_Bookings (\napt_booking_id INTEGER NOT NULL,\napt_id INTEGER,\nguest_id INTEGER NOT NULL,\nbooking_status_code CHAR(15) NOT NULL,\nbooking_start_date DATETIME,\nbooking_end_date DATETIME,\nPRIMARY KEY (apt_booking_id),\nUNIQUE (apt_booking_id),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\n);", "CREATE TABLE View_Unit_Status (\napt_id INTEGER,\napt_booking_id INTEGER,\nstatus_date DATETIME NOT NULL,\navailable_yn BIT,\nPRIMARY KEY (status_date),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\n);" ]
Show all distinct building descriptions.
SELECT DISTINCT building_description FROM Apartment_Buildings
[ "SELECT", "DISTINCT", "building_description", "FROM", "Apartment_Buildings" ]
[ "select", "distinct", "building_description", "from", "apartment_buildings" ]
[ "Show", "all", "distinct", "building", "descriptions", "." ]
apartment_rentals
[ "CREATE TABLE Apartment_Buildings (\nbuilding_id INTEGER NOT NULL,\nbuilding_short_name CHAR(15),\nbuilding_full_name VARCHAR(80),\nbuilding_description VARCHAR(255),\nbuilding_address VARCHAR(255),\nbuilding_manager VARCHAR(50),\nbuilding_phone VARCHAR(80),\nPRIMARY KEY (building_id),\nUNIQUE (building_id)\n);", "CREATE TABLE Apartments (\napt_id INTEGER NOT NULL ,\nbuilding_id INTEGER NOT NULL,\napt_type_code CHAR(15),\napt_number CHAR(10),\nbathroom_count INTEGER,\nbedroom_count INTEGER,\nroom_count CHAR(5),\nPRIMARY KEY (apt_id),\nUNIQUE (apt_id),\nFOREIGN KEY (building_id) REFERENCES Apartment_Buildings (building_id)\n);", "CREATE TABLE Apartment_Facilities (\napt_id INTEGER NOT NULL,\nfacility_code CHAR(15) NOT NULL,\nPRIMARY KEY (apt_id, facility_code),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id)\n);", "CREATE TABLE Guests (\nguest_id INTEGER NOT NULL ,\ngender_code CHAR(1),\nguest_first_name VARCHAR(80),\nguest_last_name VARCHAR(80),\ndate_of_birth DATETIME,\nPRIMARY KEY (guest_id),\nUNIQUE (guest_id)\n);", "CREATE TABLE Apartment_Bookings (\napt_booking_id INTEGER NOT NULL,\napt_id INTEGER,\nguest_id INTEGER NOT NULL,\nbooking_status_code CHAR(15) NOT NULL,\nbooking_start_date DATETIME,\nbooking_end_date DATETIME,\nPRIMARY KEY (apt_booking_id),\nUNIQUE (apt_booking_id),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (guest_id) REFERENCES Guests (guest_id)\n);", "CREATE TABLE View_Unit_Status (\napt_id INTEGER,\napt_booking_id INTEGER,\nstatus_date DATETIME NOT NULL,\navailable_yn BIT,\nPRIMARY KEY (status_date),\nFOREIGN KEY (apt_id) REFERENCES Apartments (apt_id),\nFOREIGN KEY (apt_booking_id) REFERENCES Apartment_Bookings (apt_booking_id)\n);" ]
Give me a list of all the distinct building descriptions.
SELECT DISTINCT building_description FROM Apartment_Buildings
[ "SELECT", "DISTINCT", "building_description", "FROM", "Apartment_Buildings" ]
[ "select", "distinct", "building_description", "from", "apartment_buildings" ]
[ "Give", "me", "a", "list", "of", "all", "the", "distinct", "building", "descriptions", "." ]