output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT AVG("played") FROM "group_i" WHERE "wins"<11 AND "goals_for">42 AND "points">22 AND "losses"=11; |
## Task
Generate a SQL query to answer the following question:
`What is the average number played that has fewer than 11 wins, more than 42 goals, more than 22 points, and 11 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_i" (
"positio... |
SELECT COUNT("goal_difference") FROM "group_i" WHERE "goals_for"<49 AND "position"<8; |
## Task
Generate a SQL query to answer the following question:
`What is the total of the goal difference entries for entries with fewer than 49 goals and position smaller than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_i" (
"position" r... |
SELECT MIN("played") FROM "group_i" WHERE "position"=2 AND "losses"<9; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest played for the entry with position of 2 and fewer than 9 losses?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_i" (
"position" real,
"played" real,
"points... |
SELECT COUNT("losses") FROM "group_i" WHERE "wins"=12 AND "goal_difference"<-14; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of losses for entries that have 12 wins and a goal difference smaller than -14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "group_i" (
"position" real,
"pl... |
SELECT "goals_l_c_e" FROM "squad_information" WHERE "nat"='arg' AND "name"='pelletieri'; |
## Task
Generate a SQL query to answer the following question:
`What are the goals for Pelletieri in ARG?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_information" (
"nat" text,
"name" text,
"since" text,
"app_l_c_e" text,
"goals_l_c... |
SELECT MIN("ends") FROM "squad_information" WHERE "app_l_c_e"='51 (44/6/1)'; |
## Task
Generate a SQL query to answer the following question:
`What are the fewest ends with an App(L/C/E) of 51 (44/6/1)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_information" (
"nat" text,
"name" text,
"since" text,
"app_l_c_e" ... |
SELECT "name" FROM "squad_information" WHERE "nat"='gre' AND "app_l_c_e"='49 (40/8/1)'; |
## Task
Generate a SQL query to answer the following question:
`Who has a nationality of GRE and an App(L/C/E) of 49 (40/8/1)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_information" (
"nat" text,
"name" text,
"since" text,
"app_l_c_... |
SELECT "goals_l_c_e" FROM "squad_information" WHERE "app_l_c_e"='55 (47/5/3)'; |
## Task
Generate a SQL query to answer the following question:
`What are the gaols(L/C/E) with an App(L/C/E) of 55 (47/5/3)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "squad_information" (
"nat" text,
"name" text,
"since" text,
"app_l_c_e"... |
SELECT COUNT("year") FROM "previous_winners" WHERE "reader_s_vote"='na' AND "lifetime_achievement"='na'; |
## Task
Generate a SQL query to answer the following question:
`How many times was the reader's vote na and the lifetime achievement na?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "previous_winners" (
"year" real,
"best_teenage_young_adult" tex... |
SELECT "lifetime_achievement" FROM "previous_winners" WHERE "year"=1998; |
## Task
Generate a SQL query to answer the following question:
`who won the lifetime achievement in the year 1998?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "previous_winners" (
"year" real,
"best_teenage_young_adult" text,
"reader_s_vote" t... |
SELECT "lifetime_achievement" FROM "previous_winners" WHERE "best_non_fiction"='na' AND "reader_s_vote"='na' AND "year">2005; |
## Task
Generate a SQL query to answer the following question:
`who won the lifetime achievement when the best non-fiction is na, reader's vote is ne and the year is after 2005?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "previous_winners" (
"yea... |
SELECT "reader_s_vote" FROM "previous_winners" WHERE "year"=2011; |
## Task
Generate a SQL query to answer the following question:
`what is the reader's vote for 2011?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "previous_winners" (
"year" real,
"best_teenage_young_adult" text,
"reader_s_vote" text,
"best_no... |
SELECT "constructor" FROM "qualifying" WHERE "q1_q2_time"='2:45.416'; |
## Task
Generate a SQL query to answer the following question:
`Constructor with total time of 2:45.416`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying" (
"driver" text,
"constructor" text,
"q1_order" real,
"q1_time" text,
"q1_pos"... |
SELECT "driver" FROM "qualifying" WHERE "q1_order">10 AND "q1_pos"=18; |
## Task
Generate a SQL query to answer the following question:
`Driver at larger than 10 with a Q1 of 18.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "qualifying" (
"driver" text,
"constructor" text,
"q1_order" real,
"q1_time" text,
"q1_po... |
SELECT "opponent" FROM "game_log" WHERE "record"='55-14'; |
## Task
Generate a SQL query to answer the following question:
`Who was the opponent when the record was 55-14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" te... |
SELECT MIN("game") FROM "game_log" WHERE "record"='59-15'; |
## Task
Generate a SQL query to answer the following question:
`What was the game number when record is 59-15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" tex... |
SELECT "date" FROM "game_log" WHERE "record"='51-14'; |
## Task
Generate a SQL query to answer the following question:
`What is the date that the record was 51-14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "game_log" (
"game" real,
"date" text,
"opponent" text,
"score" text,
"location" text,
... |
SELECT SUM("pick_num") FROM "round_five" WHERE "college"='laurier'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Pick #, when College is Laurier?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" text,
"player" text,
"position" text,
... |
SELECT "cfl_team" FROM "round_five" WHERE "pick_num">34 AND "college"='boise state'; |
## Task
Generate a SQL query to answer the following question:
`What is CFL Team, when Pick # is greater than 34, and when College is Boise State?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" text,
"pl... |
SELECT MIN("pick_num") FROM "round_five" WHERE "position"='rec' AND "cfl_team"='hamilton tiger-cats'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Pick #, when Position is REC, and when CFL Team is Hamilton Tiger-Cats?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" tex... |
SELECT "player" FROM "round_five" WHERE "position"='db' AND "college"='saint mary''s'; |
## Task
Generate a SQL query to answer the following question:
`What is Player, when Position is DB, and when College is Saint Mary's?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" text,
"player" text,
... |
SELECT "position" FROM "round_five" WHERE "pick_num"<40 AND "college"='western'; |
## Task
Generate a SQL query to answer the following question:
`What is Position, when Pick # is less than 40, and when College is Western?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "round_five" (
"pick_num" real,
"cfl_team" text,
"player" t... |
SELECT "date" FROM "pool_e" WHERE "time"='12:00'; |
## Task
Generate a SQL query to answer the following question:
`Which Date has a Time of 12:00?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_e" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"t... |
SELECT "set_2" FROM "pool_e" WHERE "set_1"='25–20'; |
## Task
Generate a SQL query to answer the following question:
`Set 1 of 25–20, what was Set 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_e" (
"date" text,
"time" text,
"score" text,
"set_1" text,
"set_2" text,
"set_3" text,
"t... |
SELECT "name" FROM "list_of_state_leaders_in_the_20th_centur" WHERE "from"='1906 bc'; |
## Task
Generate a SQL query to answer the following question:
`Whose rule began in 1906 BC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_state_leaders_in_the_20th_centur" (
"type" text,
"name" text,
"title" text,
"royal_house" text,... |
SELECT "title" FROM "list_of_state_leaders_in_the_20th_centur" WHERE "from"='2007 bc'; |
## Task
Generate a SQL query to answer the following question:
`What is the title of the one who ruled from 2007 BC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_state_leaders_in_the_20th_centur" (
"type" text,
"name" text,
"title" tex... |
SELECT "name" FROM "list_of_state_leaders_in_the_20th_centur" WHERE "from"='1924 bc'; |
## Task
Generate a SQL query to answer the following question:
`What is the name of the ruler whose rule began in 1924 BC?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_state_leaders_in_the_20th_centur" (
"type" text,
"name" text,
"titl... |
SELECT "royal_house" FROM "list_of_state_leaders_in_the_20th_centur" WHERE "name"='shaokang'; |
## Task
Generate a SQL query to answer the following question:
`What royal house did Shaokang belong to?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "list_of_state_leaders_in_the_20th_centur" (
"type" text,
"name" text,
"title" text,
"royal_... |
SELECT MAX("rank") FROM "tallest_buildings" WHERE "year"=1976 AND "floors"<21; |
## Task
Generate a SQL query to answer the following question:
`What is the highest rank of a building erected in 1976 with fewer than 21 floors?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "tallest_buildings" (
"rank" real,
"name" text,
"heig... |
SELECT "opponent" FROM "schedule_and_results" WHERE "february">2 AND "game"<55; |
## Task
Generate a SQL query to answer the following question:
`What team was the opponent when February shows more than 2, with a game number less than 55?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"febru... |
SELECT AVG("game") FROM "schedule_and_results" WHERE "opponent"='toronto maple leafs' AND "february"<17; |
## Task
Generate a SQL query to answer the following question:
`What is the game number when the Toronto Maple Leafs were the opponent, and the February was less than 17?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" ... |
SELECT SUM("game") FROM "schedule_and_results" WHERE "opponent"='new york islanders' AND "february"<24; |
## Task
Generate a SQL query to answer the following question:
`What is the number of the game when the opponent was the New York Islanders, and a February less than 24?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" r... |
SELECT MIN("game") FROM "schedule_and_results" WHERE "record"='26-24-9'; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest game number when the record was 26-24-9?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"february" real,
"opponent" text,
"... |
SELECT "rank" FROM "medal_table" WHERE "gold"<16 AND "bronze">2 AND "silver">2 AND "total"=14; |
## Task
Generate a SQL query to answer the following question:
`What rank has less than 16 gold, more than 2 bronze and silver, and a total of 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" r... |
SELECT MIN("silver") FROM "medal_table" WHERE "rank"='1' AND "bronze"<2; |
## Task
Generate a SQL query to answer the following question:
`What's the silver for rank 1 with less than 2 bronze?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze" real,
"tota... |
SELECT MIN("total") FROM "medal_table" WHERE "bronze"<16 AND "silver">6; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest total when there's less than 16 bronze and more than 6 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" rea... |
SELECT MIN("gold") FROM "medal_table" WHERE "total">15 AND "silver"<16; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest gold with a total over 15 and less than 16 silver?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
"bronze... |
SELECT COUNT("gold") FROM "medal_table" WHERE "rank"='7' AND "nation"='italy' AND "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`Which Gold has a Rank of 7, a Nation of italy, and a Silver smaller than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" real,
... |
SELECT AVG("gold") FROM "medal_table" WHERE "total">3 AND "rank"='total' AND "silver">8; |
## Task
Generate a SQL query to answer the following question:
`Which Gold has a Total larger than 3, a Rank of total, and a Silver larger than 8?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"nation" text,
"gold" r... |
SELECT "club_team" FROM "draft_picks" WHERE "pick">139; |
## Task
Generate a SQL query to answer the following question:
`Which Club team has a Pick larger than 139?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"position" text,
"nationality... |
SELECT "nationality" FROM "draft_picks" WHERE "pick">109 AND "round"<5; |
## Task
Generate a SQL query to answer the following question:
`Which Nationality has a Pick larger than 109, and a Round smaller than 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "draft_picks" (
"round" real,
"pick" real,
"player" text,
"... |
SELECT "school_club_team" FROM "r" WHERE "player"='lawrence roberts'; |
## Task
Generate a SQL query to answer the following question:
`Which school was Lawrence Roberts from ?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "r" (
"player" text,
"nationality" text,
"position" text,
"years_for_grizzlies" text,
"sch... |
SELECT "school_club_team" FROM "r" WHERE "player"='chris robinson'; |
## Task
Generate a SQL query to answer the following question:
`Which school was Chris Robinson from?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "r" (
"player" text,
"nationality" text,
"position" text,
"years_for_grizzlies" text,
"school... |
SELECT "position" FROM "r" WHERE "player"='chris robinson'; |
## Task
Generate a SQL query to answer the following question:
`What was the position that Chris Robinson played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "r" (
"player" text,
"nationality" text,
"position" text,
"years_for_grizzlies" tex... |
SELECT "years_for_grizzlies" FROM "r" WHERE "player"='zach randolph'; |
## Task
Generate a SQL query to answer the following question:
`In which years did Zach Randolph play for the Grizzlies?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "r" (
"player" text,
"nationality" text,
"position" text,
"years_for_grizzli... |
SELECT "player" FROM "r" WHERE "school_club_team"='western kentucky'; |
## Task
Generate a SQL query to answer the following question:
`Which player played for Western Kentucky?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "r" (
"player" text,
"nationality" text,
"position" text,
"years_for_grizzlies" text,
"sc... |
SELECT "score" FROM "regular_season" WHERE "home"='chicago black hawks' AND "visitor"='new york rangers' AND "date"='january 14'; |
## Task
Generate a SQL query to answer the following question:
`What was the score on January 14 when the Chicago Black Hawks were home against the New York Rangers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"vi... |
SELECT "home" FROM "regular_season" WHERE "visitor"='chicago black hawks' AND "date"='february 18'; |
## Task
Generate a SQL query to answer the following question:
`Who was the home team on February 18 that had a visitor of the Chicago Black Hawks?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"sc... |
SELECT "points_diff" FROM "pool_4" WHERE "points_against"='123'; |
## Task
Generate a SQL query to answer the following question:
`What is points diff when points against is 123?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_4" (
"team" text,
"tries_for" text,
"tries_against" text,
"try_diff" text,
"p... |
SELECT "team" FROM "pool_4" WHERE "points_against"='123'; |
## Task
Generate a SQL query to answer the following question:
`Which team has 123 points agaibst the other team?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_4" (
"team" text,
"tries_for" text,
"tries_against" text,
"try_diff" text,
... |
SELECT "points_against" FROM "pool_4" WHERE "try_diff"='+23'; |
## Task
Generate a SQL query to answer the following question:
`What is the points against when try diff is +23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_4" (
"team" text,
"tries_for" text,
"tries_against" text,
"try_diff" text,
"... |
SELECT "points_for" FROM "pool_4" WHERE "try_diff"='+23'; |
## Task
Generate a SQL query to answer the following question:
`What is points when try diff is +23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_4" (
"team" text,
"tries_for" text,
"tries_against" text,
"try_diff" text,
"points_for" ... |
SELECT "points_against" FROM "pool_4" WHERE "points_diff"='+96'; |
## Task
Generate a SQL query to answer the following question:
`What is points sgsinst when points diff is +96?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "pool_4" (
"team" text,
"tries_for" text,
"tries_against" text,
"try_diff" text,
"p... |
SELECT "laps_led" FROM "classification" WHERE "grid"='15'; |
## Task
Generate a SQL query to answer the following question:
`How many laps led when the Grid was 15?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps" text,
... |
SELECT "time_retired" FROM "classification" WHERE "points"='32'; |
## Task
Generate a SQL query to answer the following question:
`Name the Time/Retired when the points were 32.`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps"... |
SELECT "car_no" FROM "classification" WHERE "points"='24'; |
## Task
Generate a SQL query to answer the following question:
`What car number had 24 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps" text,
"time_r... |
SELECT "team" FROM "classification" WHERE "laps_led"='0' AND "driver"='dan wheldon'; |
## Task
Generate a SQL query to answer the following question:
`What team does Dan Wheldon drive for when he led 0 laps?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text... |
SELECT "points" FROM "classification" WHERE "grid"='1'; |
## Task
Generate a SQL query to answer the following question:
`How many points when the Grid was 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "classification" (
"fin_pos" text,
"car_no" text,
"driver" text,
"team" text,
"laps" text,
"... |
SELECT AVG("game") FROM "schedule_and_results" WHERE "october"=19; |
## Task
Generate a SQL query to answer the following question:
`What is the average game number that was on october 19?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"october" real,
"opponent" text,
"score... |
SELECT SUM("october") FROM "schedule_and_results" WHERE "opponent"='pittsburgh penguins'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of October, when Opponent is "Pittsburgh Penguins"?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"october" real,
"opponent" te... |
SELECT SUM("game") FROM "schedule_and_results" WHERE "record"='2-1-1' AND "october"<21; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Game, when Record is "2-1-1", and when October is less than 21?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"october" real,
... |
SELECT "opponent" FROM "schedule_and_results" WHERE "october"<31 AND "game">7; |
## Task
Generate a SQL query to answer the following question:
`What is Opponent, when October is less than 31, and when Game is greater than 7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"game" real,
"october" real,
... |
SELECT "tie_no" FROM "third_round_proper" WHERE "home_team"='orient'; |
## Task
Generate a SQL query to answer the following question:
`What is the tie number for the home team Orient?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" te... |
SELECT "score" FROM "third_round_proper" WHERE "away_team"='chelsea'; |
## Task
Generate a SQL query to answer the following question:
`What is the score for the away team Chelsea?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
... |
SELECT "away_team" FROM "third_round_proper" WHERE "tie_no"='29'; |
## Task
Generate a SQL query to answer the following question:
`What is the away team for the tie no. 29?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_round_proper" (
"tie_no" text,
"home_team" text,
"score" text,
"away_team" text,
"... |
SELECT "coronie" FROM "demography" WHERE "nickerie"='0.7%'; |
## Task
Generate a SQL query to answer the following question:
`What is the coronie with a 0.7% nickerie?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demography" (
"religion" text,
"suriname" text,
"paramaribo" text,
"wanica" text,
"nicke... |
SELECT "marowijne" FROM "demography" WHERE "saramacca"='18.8%'; |
## Task
Generate a SQL query to answer the following question:
`What is the marowijne with an 18.8% saramacca?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demography" (
"religion" text,
"suriname" text,
"paramaribo" text,
"wanica" text,
"... |
SELECT "para" FROM "demography" WHERE "sipaliwini"='0.1%'; |
## Task
Generate a SQL query to answer the following question:
`What is the para with a 0.1% sipaliwini?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demography" (
"religion" text,
"suriname" text,
"paramaribo" text,
"wanica" text,
"nicker... |
SELECT "religion" FROM "demography" WHERE "para"='56.5%'; |
## Task
Generate a SQL query to answer the following question:
`What religion has a para of 56.5%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demography" (
"religion" text,
"suriname" text,
"paramaribo" text,
"wanica" text,
"nickerie" te... |
SELECT "suriname" FROM "demography" WHERE "brokopondo"='16.8%'; |
## Task
Generate a SQL query to answer the following question:
`What is the suriname with a 16.8% brokopondo?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "demography" (
"religion" text,
"suriname" text,
"paramaribo" text,
"wanica" text,
"n... |
SELECT AVG("rank") FROM "medal_table" WHERE "gold"<0; |
## Task
Generate a SQL query to answer the following question:
`What's the rank average when the gold medals are less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,... |
SELECT SUM("rank") FROM "medal_table" WHERE "nation"='hungary (hun)' AND "bronze"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the total rank of Hungary (HUN) when the bronze medals were less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" rea... |
SELECT COUNT("total") FROM "medal_table" WHERE "silver"<0; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of the total number of medals when silver is less than 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" real,
"nation" text,
"gold" real,
"s... |
SELECT "born_died" FROM "1939_1943" WHERE "term_start"='4 december 1941'; |
## Task
Generate a SQL query to answer the following question:
`What is Born-Died, when Term Start is 4 December 1941?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1939_1943" (
"name" text,
"born_died" text,
"term_start" text,
"term_end" tex... |
SELECT "term_start" FROM "1939_1943" WHERE "name"='prime ministers 1939 - 1943'; |
## Task
Generate a SQL query to answer the following question:
`What is Term Start, when Name is Prime Ministers 1939 - 1943?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1939_1943" (
"name" text,
"born_died" text,
"term_start" text,
"term_e... |
SELECT "born_died" FROM "1939_1943" WHERE "name"='maliq bushati'; |
## Task
Generate a SQL query to answer the following question:
`What is Born-Died, when Name is Maliq Bushati?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1939_1943" (
"name" text,
"born_died" text,
"term_start" text,
"term_end" text,
"po... |
SELECT "term_end" FROM "1939_1943" WHERE "political_party"='albanian fascist party' AND "term_start"='12 april 1939'; |
## Task
Generate a SQL query to answer the following question:
`What is Term End, when Political Party is Albanian Fascist Party, and when Term Start is 12 April 1939?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1939_1943" (
"name" text,
"born_... |
SELECT "term_start" FROM "1939_1943" WHERE "born_died"='prime ministers 1939 - 1943'; |
## Task
Generate a SQL query to answer the following question:
`What is Term Start, when Born-Died is Prime Ministers 1939 - 1943?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1939_1943" (
"name" text,
"born_died" text,
"term_start" text,
"t... |
SELECT "born_died" FROM "1939_1943" WHERE "term_end"='19 january 1943'; |
## Task
Generate a SQL query to answer the following question:
`What is Born-Died, when Term End is 19 January 1943?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1939_1943" (
"name" text,
"born_died" text,
"term_start" text,
"term_end" text,... |
SELECT "score" FROM "regular_season" WHERE "record"='5–4–3'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score of the game with a Record of 5–4–3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"r... |
SELECT "score" FROM "regular_season" WHERE "date"='january 23'; |
## Task
Generate a SQL query to answer the following question:
`What is the Score on January 23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"record" text
);
### SQ... |
SELECT "visitor" FROM "regular_season" WHERE "home"='montreal canadiens' AND "record"='6–4–4'; |
## Task
Generate a SQL query to answer the following question:
`What is the Visitor of the Montreal Canadiens Home game with a Record of 6–4–4?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score"... |
SELECT "date" FROM "regular_season" WHERE "record"='12–7–6'; |
## Task
Generate a SQL query to answer the following question:
`What is the Date of the game with a Record of 12–7–6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"home" text,
"r... |
SELECT "record" FROM "regular_season" WHERE "home"='montreal canadiens' AND "date"='march 23'; |
## Task
Generate a SQL query to answer the following question:
`What is the Record of the Montreal Canadiens Home game on March 23?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "regular_season" (
"date" text,
"visitor" text,
"score" text,
"ho... |
SELECT "tournament_location" FROM "winners" WHERE "margin_of_victory"='1 stroke' AND "purse"='1,200,000'; |
## Task
Generate a SQL query to answer the following question:
`What tournament location has 1 stroke as the margin of victory, with 1,200,000 as the purse ($)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" real,
"dates" text,
... |
SELECT "tournament_location" FROM "winners" WHERE "country"='south korea'; |
## Task
Generate a SQL query to answer the following question:
`What tournament location has south korea as the country?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" real,
"dates" text,
"champion" text,
"country" text,
"w... |
SELECT COUNT("population_july_2005_est") FROM "ranking" WHERE "arable_land_km"<'16,280' AND "land_area_km"<240 AND "country"='american samoa (us)' AND "population_density_pop_per_km">291; |
## Task
Generate a SQL query to answer the following question:
`What is the total population of American Samoa (US) that has less than 16,280 km² arable land, less than 240 km² land area, and has a population density of more than 291?`
### Database Schema
This query will run on a database whose schema is represented ... |
SELECT MAX("arable_land_km") FROM "ranking" WHERE "population_july_2005_est"='20,090,437'; |
## Task
Generate a SQL query to answer the following question:
`What's the arable land for the population of 20,090,437?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ranking" (
"country" text,
"population_july_2005_est" real,
"land_area_km" re... |
SELECT AVG("land_area_km") FROM "ranking" WHERE "country"='switzerland' AND "population_density_pop_per_km"<188; |
## Task
Generate a SQL query to answer the following question:
`What is the land area of Switzerland with a population density fewer than 188 km²?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "ranking" (
"country" text,
"population_july_2005_est"... |
SELECT "population_density_pop_per_km" FROM "ranking" WHERE "population_july_2005_est">'37,762,842' AND "arable_land_km">200 AND "country"='democratic republic of the congo'; |
## Task
Generate a SQL query to answer the following question:
`What's the population density of the Democratic Republic of the Congo when the population is greater than 37,762,842, and the arable land is more than 200 km²?`
### Database Schema
This query will run on a database whose schema is represented in this str... |
SELECT "lost" FROM "league_table" WHERE "points"='86'; |
## Task
Generate a SQL query to answer the following question:
`What lost has 86 points?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text,
"points_again... |
SELECT "try_bonus" FROM "league_table" WHERE "tries_against"='37'; |
## Task
Generate a SQL query to answer the following question:
`With 37 tries against, what is the try bonus?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" ... |
SELECT "points_against" FROM "league_table" WHERE "tries_for"='41'; |
## Task
Generate a SQL query to answer the following question:
`How many points against when 41 is the tries for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_f... |
SELECT "losing_bonus" FROM "league_table" WHERE "lost"='lost'; |
## Task
Generate a SQL query to answer the following question:
`With a lost of lost what was the losing bonus?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for"... |
SELECT "points" FROM "league_table" WHERE "points_for"='points for'; |
## Task
Generate a SQL query to answer the following question:
`What points has points for as points for?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"lost" text,
"points_for" text... |
SELECT "points" FROM "league_table" WHERE "try_bonus"='5' AND "club"='barry rfc'; |
## Task
Generate a SQL query to answer the following question:
`What is the points when the club is Barry RFC with a 5 as the try bonus?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "league_table" (
"club" text,
"played" text,
"drawn" text,
"... |
SELECT SUM("gold") FROM "medal_table" WHERE "silver">6 AND "rank"='1' AND "bronze"<61; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Gold, when Silver is greater than 6, when Rank is 1, and when Bronze is less than 61?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"go... |
SELECT MIN("silver") FROM "medal_table" WHERE "bronze"=1 AND "total"<3; |
## Task
Generate a SQL query to answer the following question:
`What is the lowest Silver, when Bronze is 1, and when Total is less than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
"gold" real,
"silver" real,
... |
SELECT AVG("gold") FROM "medal_table" WHERE "silver"<107 AND "bronze">42 AND "rank"='3'; |
## Task
Generate a SQL query to answer the following question:
`What is the average Gold, when Silver is less than 107, when Bronze is greater than 42, and when Rank is 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medal_table" (
"rank" text,
... |
SELECT "manufacturer" FROM "moto_gp_classification" WHERE "laps"<28 AND "grid"<9 AND "rider"='jeremy mcwilliams'; |
## Task
Generate a SQL query to answer the following question:
`Which manufacturer has more than 28 laps and less than 9 grids with jeremy mcwilliams?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "moto_gp_classification" (
"rider" text,
"manufact... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.