output stringlengths 27 479 | instruction stringlengths 407 1.39k |
|---|---|
SELECT "date" FROM "polling" WHERE "source"='surveyusa' AND "obama"='54%'; |
## Task
Generate a SQL query to answer the following question:
`When has a Source of surveyusa and a Obama of 54%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"source" text,
"date" text,
"clinton" text,
"obama" text,
"undecided... |
SELECT "date" FROM "polling" WHERE "source"='rasmussen reports'; |
## Task
Generate a SQL query to answer the following question:
`When has a Source of rasmussen reports?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"source" text,
"date" text,
"clinton" text,
"obama" text,
"undecided" text
);
#... |
SELECT "source" FROM "polling" WHERE "clinton"='39%' AND "undecided"='7%'; |
## Task
Generate a SQL query to answer the following question:
`Which Source has a Clinton of 39% and a Undecided of 7%?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "polling" (
"source" text,
"date" text,
"clinton" text,
"obama" text,
"und... |
SELECT "date_of_birth" FROM "volleyball_at_the_2004_summer_olympics_m" WHERE "block">342; |
## Task
Generate a SQL query to answer the following question:
`What is the Date of Birth with a Block that is larger than 342?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "volleyball_at_the_2004_summer_olympics_m" (
"name" text,
"date_of_birth"... |
SELECT COUNT("position") FROM "most_viewed_channels" WHERE "2012"='0.92'; |
## Task
Generate a SQL query to answer the following question:
`What is the number of positions that have 2012 ratings of 0.92?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_viewed_channels" (
"position" real,
"channel" text,
"launch_date"... |
SELECT "owner" FROM "most_viewed_channels" WHERE "2012"='5.42'; |
## Task
Generate a SQL query to answer the following question:
`What is the owner of the channel that has a 2012 rating of 5.42?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_viewed_channels" (
"position" real,
"channel" text,
"launch_date... |
SELECT "2007" FROM "most_viewed_channels" WHERE "position"=6; |
## Task
Generate a SQL query to answer the following question:
`What is the 2007 rating of the channel with a position of 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_viewed_channels" (
"position" real,
"channel" text,
"launch_date" re... |
SELECT "channel" FROM "most_viewed_channels" WHERE "2011"='8.5'; |
## Task
Generate a SQL query to answer the following question:
`What is the channel with a 2011 rating of 8.5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "most_viewed_channels" (
"position" real,
"channel" text,
"launch_date" real,
"owner" ... |
SELECT "astc_member" FROM "see_also" WHERE "state"='arkansas' AND "aam_member"='no' AND "aam_accredited"='yes'; |
## Task
Generate a SQL query to answer the following question:
`What is ASTC Member, when State is Arkansas, when AAM Member is No, and when AAM Accredited is Yes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"city" text,
"state" tex... |
SELECT "city" FROM "see_also" WHERE "state"='florida' AND "aam_member"='no' AND "aam_accredited"='no'; |
## Task
Generate a SQL query to answer the following question:
`What is City, when State is Florida, when AAM Member is No, and when AAM Accredited is No?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"city" text,
"state" text,
"aam... |
SELECT "city" FROM "see_also" WHERE "astc_member"='no' AND "state"='california' AND "aam_member"='yes'; |
## Task
Generate a SQL query to answer the following question:
`What is City, when ASTC Member is No, when State is California, and when AAM Member is Yes?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"city" text,
"state" text,
"aa... |
SELECT "state" FROM "see_also" WHERE "aam_accredited"='no' AND "astc_member"='no' AND "city"='tulsa'; |
## Task
Generate a SQL query to answer the following question:
`What is State, when AAM Accredited is No, when ASTC Member is No, and when City is Tulsa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"city" text,
"state" text,
"aam_... |
SELECT "city" FROM "see_also" WHERE "state"='california' AND "aam_accredited"='no' AND "astc_member"='yes' AND "aam_member"='no'; |
## Task
Generate a SQL query to answer the following question:
`What is City, when State is California, when AAM Accredited is No, when ASTC Member is Yes, and when AAM Member is No?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"city" ... |
SELECT "aam_member" FROM "see_also" WHERE "aam_accredited"='no' AND "state"='california' AND "astc_member"='yes' AND "city"='sacramento'; |
## Task
Generate a SQL query to answer the following question:
`What is AAM Member, when AAM Accredited is No, when State is California, when ASTC Member is Yes, and when City is Sacramento?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
... |
SELECT "runners_up" FROM "winners" WHERE "individual"='tiger woods'; |
## Task
Generate a SQL query to answer the following question:
`Who were the runners-up when the individual winner was Tiger Woods?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" real,
"country" text,
"team" text,
"individual... |
SELECT COUNT("year") FROM "winners" WHERE "country"='united states' AND "individual"='tiger woods'; |
## Task
Generate a SQL query to answer the following question:
`How many years was the individual winner from the United States was Tiger Woods?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" real,
"country" text,
"team" text,
... |
SELECT MIN("year") FROM "winners" WHERE "location"='cape town, south africa'; |
## Task
Generate a SQL query to answer the following question:
`What is the earliest year that the tournament was played in Cape Town, South Africa?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"year" real,
"country" text,
"team" te... |
SELECT MAX("league") FROM "topscorers_in_order_of_league_goals" WHERE "league_cup">1 AND "fa_cup"=1; |
## Task
Generate a SQL query to answer the following question:
`What is the highest league for the league cup more than 1, and a FA cup of 1?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "topscorers_in_order_of_league_goals" (
"player" text,
"clu... |
SELECT "driver" FROM "winners" WHERE "date"='october 6'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Driver, when the Date is October 6?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"season" real,
"date" text,
"location" text,
"driver" text,
"chassis" te... |
SELECT COUNT("season") FROM "winners" WHERE "engine"='cosworth' AND "team"='kraco racing'; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Seasons, when the Engine is Cosworth, and when the Team is Kraco Racing?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"season" real,
"date" te... |
SELECT "driver" FROM "winners" WHERE "engine"='chevrolet' AND "date"='october 3'; |
## Task
Generate a SQL query to answer the following question:
`Who is the Driver, when the Engine is Chevrolet, and when the Date is October 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"season" real,
"date" text,
"location" tex... |
SELECT SUM("season") FROM "winners" WHERE "team"='penske racing' AND "date"='october 3'; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of Seasons, when the Team is Penske Racing, and when the Date is October 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "winners" (
"season" real,
"date" text,
"lo... |
SELECT COUNT("year_to_open") FROM "bridges_under_construction" WHERE "name"='dandeung bridge'; |
## Task
Generate a SQL query to answer the following question:
`What was the Year to Open for the Dandeung Bridge?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bridges_under_construction" (
"name" text,
"main_span_metres" text,
"main_span_feet... |
SELECT "main_span_feet" FROM "bridges_under_construction" WHERE "name"='qincaobei bridge'; |
## Task
Generate a SQL query to answer the following question:
`What is the Main span of the Qincaobei Bridge`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bridges_under_construction" (
"name" text,
"main_span_metres" text,
"main_span_feet" tex... |
SELECT "main_span_metres" FROM "bridges_under_construction" WHERE "year_to_open"=2013 AND "country"='china' AND "main_span_feet"='2,585'; |
## Task
Generate a SQL query to answer the following question:
`What is the Main span of the bridge from China with a Year to open of 2013 and Main span feet of 2,585?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "bridges_under_construction" (
"nam... |
SELECT "republican_ticket" FROM "1966_state_election_results" WHERE "democratic_ticket"='stanley h. fuld'; |
## Task
Generate a SQL query to answer the following question:
`Which republican ticket has stanley h. fuld as the Democratic ticket?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1966_state_election_results" (
"office" text,
"republican_ticket" ... |
SELECT "liberal_ticket" FROM "1966_state_election_results" WHERE "socialist_workers_ticket"='judith white'; |
## Task
Generate a SQL query to answer the following question:
`What is the liberal ticket that has judith white as the socialist workers?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1966_state_election_results" (
"office" text,
"republican_tic... |
SELECT "socialist_workers_ticket" FROM "1966_state_election_results" WHERE "republican_ticket"='malcolm wilson'; |
## Task
Generate a SQL query to answer the following question:
`What socialist workers ticket has malcolm wilson as the Republican ticket?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1966_state_election_results" (
"office" text,
"republican_tic... |
SELECT "office" FROM "1966_state_election_results" WHERE "conservative_ticket"='kieran o''doherty'; |
## Task
Generate a SQL query to answer the following question:
`Which office has kieran o'doherty as the conservative ticket?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1966_state_election_results" (
"office" text,
"republican_ticket" text,
... |
SELECT "office" FROM "1966_state_election_results" WHERE "socialist_labor_ticket"='(none)' AND "liberal_ticket"='stanley h. fuld'; |
## Task
Generate a SQL query to answer the following question:
`What office has (none) as the socialist labor ticket, and stanley h. fuld as the liberal ticket?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "1966_state_election_results" (
"office" t... |
SELECT "erp_w" FROM "translators" WHERE "call_sign"='w291ch'; |
## Task
Generate a SQL query to answer the following question:
`If the call sign is w291ch what's the ERP W corresponding to that sign?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"city_... |
SELECT "city_of_license" FROM "translators" WHERE "call_sign"='w242at'; |
## Task
Generate a SQL query to answer the following question:
`For the call sign w242at what's the city the license plate is registered to?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequency_m_hz" real,
"... |
SELECT "class" FROM "translators" WHERE "city_of_license"='great barrington, massachusetts'; |
## Task
Generate a SQL query to answer the following question:
`What's the Class for the city the license plate was issued in great barrington, massachusetts?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "translators" (
"call_sign" text,
"frequen... |
SELECT SUM("gold") FROM "medals_table" WHERE "bronze"=1 AND "rank"<6 AND "total"<3; |
## Task
Generate a SQL query to answer the following question:
`How many gold have a bronze of 1, a rank smaller than 6, and a total less than 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" real,
"nation" text,
"gold" r... |
SELECT SUM("bronze") FROM "medals_table" WHERE "gold">1 AND "nation"='france' AND "rank"<1; |
## Task
Generate a SQL query to answer the following question:
`How many France bronze have a gold of more than 1 and a rank of 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" real,
"nation" text,
"gold" real,
"silver"... |
SELECT SUM("gold") FROM "medals_table" WHERE "silver"=1 AND "bronze"<1; |
## Task
Generate a SQL query to answer the following question:
`How many gold have a silver of 1 and a bronze of 0?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "medals_table" (
"rank" real,
"nation" text,
"gold" real,
"silver" real,
"bronz... |
SELECT "aircraft" FROM "accidents_and_incidents" WHERE "location"='kabul' AND "fatalities"='unknown' AND "tail_number"='ya-ban'; |
## Task
Generate a SQL query to answer the following question:
`What is the Aircraft when Kabul was the location, unknown fatalities, and the tail number was ya-ban?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accidents_and_incidents" (
"location... |
SELECT "fatalities" FROM "accidents_and_incidents" WHERE "tail_number"='unknown' AND "location"='kabul'; |
## Task
Generate a SQL query to answer the following question:
`What is the Fatalities when the tail number was unknown and in Kabul>`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accidents_and_incidents" (
"location" text,
"aircraft" text,
"ta... |
SELECT "location" FROM "accidents_and_incidents" WHERE "aircraft"='an-12b'; |
## Task
Generate a SQL query to answer the following question:
`What is the location for the an-12b aircraft?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accidents_and_incidents" (
"location" text,
"aircraft" text,
"tail_number" text,
"airc... |
SELECT "location" FROM "accidents_and_incidents" WHERE "fatalities"='25/25'; |
## Task
Generate a SQL query to answer the following question:
`What location had 25/25 fatalities?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accidents_and_incidents" (
"location" text,
"aircraft" text,
"tail_number" text,
"aircraft_damag... |
SELECT "tail_number" FROM "accidents_and_incidents" WHERE "aircraft"='an-26' AND "fatalities"='25/25'; |
## Task
Generate a SQL query to answer the following question:
`What tail number was on the an-26, with 25/25 fatalities?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accidents_and_incidents" (
"location" text,
"aircraft" text,
"tail_number" t... |
SELECT "aircraft" FROM "accidents_and_incidents" WHERE "tail_number"='ya-bao'; |
## Task
Generate a SQL query to answer the following question:
`What type of aircraft was the plane with a tail number of ya-bao?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "accidents_and_incidents" (
"location" text,
"aircraft" text,
"tail_n... |
SELECT COUNT("points") FROM "third_league" WHERE "match">18; |
## Task
Generate a SQL query to answer the following question:
`What is the total number of Points from a Match that is larger than 18?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "third_league" (
"team" text,
"match" real,
"points" real,
"d... |
SELECT SUM("season") FROM "racing_record" WHERE "series"='formula renault 3.5 series' AND "races"<7; |
## Task
Generate a SQL query to answer the following question:
`In what Season was the Series Formula Renault 3.5 series with less than 7 Races?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "racing_record" (
"season" real,
"series" text,
"team"... |
SELECT "series" FROM "racing_record" WHERE "season"=2009; |
## Task
Generate a SQL query to answer the following question:
`What was the Series in 2009?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "racing_record" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins" real,
"points" tex... |
SELECT "wins" FROM "racing_record" WHERE "races">16; |
## Task
Generate a SQL query to answer the following question:
`How many Wins in the Year with more than 16 Races?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "racing_record" (
"season" real,
"series" text,
"team" text,
"races" real,
"wins... |
SELECT AVG("season") FROM "racing_record" WHERE "races"<3 AND "wins"<1; |
## Task
Generate a SQL query to answer the following question:
`In what Season were then less than 3 Races with less than 1 Win?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "racing_record" (
"season" real,
"series" text,
"team" text,
"races"... |
SELECT "1st_leg" FROM "eighth_finals" WHERE "team_num1"='ummc ekaterinburg'; |
## Task
Generate a SQL query to answer the following question:
`Which 1st leg has a Team #1 of ummc ekaterinburg?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eighth_finals" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
... |
SELECT "team_num2" FROM "eighth_finals" WHERE "2nd_leg"='79 - 74 (ot)'; |
## Task
Generate a SQL query to answer the following question:
`Which Team #2 has a 2nd leg of 79 - 74 (ot)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eighth_finals" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd... |
SELECT "team_num2" FROM "eighth_finals" WHERE "1st_leg"='70 - 44'; |
## Task
Generate a SQL query to answer the following question:
`Which Team #2 has a 1st leg of 70 - 44?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eighth_finals" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,
"2nd_leg"... |
SELECT "team_num2" FROM "eighth_finals" WHERE "team_num1"='gambrinus sika brno'; |
## Task
Generate a SQL query to answer the following question:
`Which Team #2 has a Team #1 of gambrinus sika brno?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "eighth_finals" (
"team_num1" text,
"agg" text,
"team_num2" text,
"1st_leg" text,... |
SELECT AVG("goal") FROM "international_goals" WHERE "result"='2–2' AND "venue"='råsunda, stockholm'; |
## Task
Generate a SQL query to answer the following question:
`What is the Goal number in Råsunda, Stockholm with a Result of 2–2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"venue" text,
"... |
SELECT "result" FROM "international_goals" WHERE "goal"=3; |
## Task
Generate a SQL query to answer the following question:
`What is the Result of Goal number 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "international_goals" (
"goal" real,
"date" text,
"venue" text,
"score" text,
"result" text,
... |
SELECT "date" FROM "schedule_and_results" WHERE "score"='4-3' AND "site_stadium"='reese smith field'; |
## Task
Generate a SQL query to answer the following question:
`On what day was a game played at Reese Smith Field, with a score of 4-3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"date" text,
"opponent" text,
"score"... |
SELECT "score" FROM "schedule_and_results" WHERE "site_stadium"='alex box stadium' AND "date"='may 10'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the game played on May 10 at Alex Box Stadium?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"date" text,
"opponent" text,
"score" te... |
SELECT "score" FROM "schedule_and_results" WHERE "site_stadium"='sarge frye field'; |
## Task
Generate a SQL query to answer the following question:
`What was the score for the game played at Sarge Frye Field?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"date" text,
"opponent" text,
"score" text,
"sit... |
SELECT "date" FROM "schedule_and_results" WHERE "record"='5-7'; |
## Task
Generate a SQL query to answer the following question:
`On what date was a game played, which left the team with a record of 5-7?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"date" text,
"opponent" text,
"score... |
SELECT "score" FROM "schedule_and_results" WHERE "site_stadium"='harmon stadium' AND "date"='february 24'; |
## Task
Generate a SQL query to answer the following question:
`What was the score of the game played at Harmon Stadium on February 24?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"date" text,
"opponent" text,
"score" ... |
SELECT "site_stadium" FROM "schedule_and_results" WHERE "date"='may 9'; |
## Task
Generate a SQL query to answer the following question:
`Where was the game on May 9 played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule_and_results" (
"date" text,
"opponent" text,
"score" text,
"site_stadium" text,
"reco... |
SELECT MAX("position") FROM "campeonato_paulista" WHERE "points"<21 AND "played">14; |
## Task
Generate a SQL query to answer the following question:
`What is the greatest position when the points are less than 21, and the played greater than 14?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_paulista" (
"position" real,
... |
SELECT MIN("lost") FROM "campeonato_paulista" WHERE "difference"='9' AND "drawn"<3; |
## Task
Generate a SQL query to answer the following question:
`What is the fewest lost with a difference of 9 and a less than 3 drawn?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"points" ... |
SELECT AVG("against") FROM "campeonato_paulista" WHERE "team"='estudantes paulista' AND "position"<4; |
## Task
Generate a SQL query to answer the following question:
`Team Estudantes Paulista with a position less than 4 has what average against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "campeonato_paulista" (
"position" real,
"team" text,
"p... |
SELECT "margin_of_victory" FROM "lpga_tour_wins_8" WHERE "date"='apr 8, 1979'; |
## Task
Generate a SQL query to answer the following question:
`What was the margin of victory on Apr 8, 1979?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_8" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_of_... |
SELECT "winning_score" FROM "lpga_tour_wins_8" WHERE "margin_of_victory"='2 strokes' AND "runner_s_up"='pat bradley'; |
## Task
Generate a SQL query to answer the following question:
`What was the winning score when the margin of victory was 2 strokes and the runner-up was Pat Bradley?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_8" (
"date" text,
... |
SELECT "margin_of_victory" FROM "lpga_tour_wins_8" WHERE "winning_score"='−5 (69-69-73=211)'; |
## Task
Generate a SQL query to answer the following question:
`What was the margin of victory when the winning score was −5 (69-69-73=211)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_8" (
"date" text,
"tournament" text,
"winn... |
SELECT "tournament" FROM "lpga_tour_wins_8" WHERE "winning_score"='−5 (69-69-73=211)'; |
## Task
Generate a SQL query to answer the following question:
`Which tournament had a winning score of −5 (69-69-73=211)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_8" (
"date" text,
"tournament" text,
"winning_score" text,
... |
SELECT "date" FROM "lpga_tour_wins_8" WHERE "winning_score"='−6 (69-69-73-71=282)'; |
## Task
Generate a SQL query to answer the following question:
`When was the winning score −6 (69-69-73-71=282)?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "lpga_tour_wins_8" (
"date" text,
"tournament" text,
"winning_score" text,
"margin_o... |
SELECT "opponent" FROM "schedule" WHERE "date"='november 20, 1995'; |
## Task
Generate a SQL query to answer the following question:
`Who is the opponent of the game played on November 20, 1995?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
... |
SELECT MAX("grid") FROM "race_2_results" WHERE "name"='jamie whincup'; |
## Task
Generate a SQL query to answer the following question:
`What is the highest Grid with a Name that is jamie whincup?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_2_results" (
"name" text,
"team" text,
"laps" real,
"time_retired" ... |
SELECT "team" FROM "race_2_results" WHERE "laps"=5; |
## Task
Generate a SQL query to answer the following question:
`What is the Team with a Lap that is 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "race_2_results" (
"name" text,
"team" text,
"laps" real,
"time_retired" text,
"grid" real
)... |
SELECT MIN("round") FROM "2008_nfl_draft_selections" WHERE "name"='justin forsett' AND "pick">233; |
## Task
Generate a SQL query to answer the following question:
`What's the lowest round Justin Forsett was drafted in, with a draft pick larger than 233?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_nfl_draft_selections" (
"round" real,
"pi... |
SELECT AVG("round") FROM "2008_nfl_draft_selections" WHERE "position"='rb'; |
## Task
Generate a SQL query to answer the following question:
`What's the average round the position of RB was drafted?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_nfl_draft_selections" (
"round" real,
"pick" real,
"name" text,
"posit... |
SELECT AVG("round") FROM "2008_nfl_draft_selections" WHERE "name"='red bryant' AND "pick">121; |
## Task
Generate a SQL query to answer the following question:
`What's the average round Red Bryant was drafted with a pick larger than 121?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "2008_nfl_draft_selections" (
"round" real,
"pick" real,
"... |
SELECT "overall_record" FROM "schedule" WHERE "away_team"='miami'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Overall Record that has the Away Team of miami?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"home_team" text,
"away_team" text,
"ov... |
SELECT "overall_record" FROM "schedule" WHERE "week"=3; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Overall Record that has the Week of 3?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"home_team" text,
"away_team" text,
"overall_rec... |
SELECT "divisional_record" FROM "schedule" WHERE "away_team"='dallas'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Divisional Record that has the Away Team of dallas?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"home_team" text,
"away_team" text,
... |
SELECT "overall_record" FROM "schedule" WHERE "week"<16 AND "divisional_record"='(1-0)' AND "away_team"='miami'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Overall Record that has the Week smaller than 16, and the Divisional Record of (1-0), and the Away Team of miami?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedu... |
SELECT "week" FROM "schedule" WHERE "home_team"='detroit' AND "divisional_record"='(3-0)' AND "overall_record"='(5-1)' AND "away_team"='minnesota'; |
## Task
Generate a SQL query to answer the following question:
`Can you tell me the Week that has the Home Team of detroit, and the Divisional Record of (3-0), and the Overall Record of (5-1), and the Away Team of minnesota?`
### Database Schema
This query will run on a database whose schema is represented in this st... |
SELECT "choreographer_s" FROM "week_6_july_16_2008" WHERE "style"='pas de deux'; |
## Task
Generate a SQL query to answer the following question:
`Who is the choreographer with the style pas de deux?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "week_6_july_16_2008" (
"couple" text,
"style" text,
"music" text,
"choreographe... |
SELECT "end_of_reign" FROM "autocephalous_church_since_1967" WHERE "birth_name"='dimitar stojkovski'; |
## Task
Generate a SQL query to answer the following question:
`What is the end of reign for Dimitar Stojkovski?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "autocephalous_church_since_1967" (
"name" text,
"start_of_reign" real,
"end_of_reign"... |
SELECT "title" FROM "autocephalous_church_since_1967" WHERE "start_of_reign"=1999; |
## Task
Generate a SQL query to answer the following question:
`What is the title of the person who started their reign in 1999?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "autocephalous_church_since_1967" (
"name" text,
"start_of_reign" real,
... |
SELECT "birth_name" FROM "autocephalous_church_since_1967" WHERE "start_of_reign"=1986; |
## Task
Generate a SQL query to answer the following question:
`What is the date of birth of the person who started their reign in 1986?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "autocephalous_church_since_1967" (
"name" text,
"start_of_reign... |
SELECT COUNT("average") FROM "top_goalscorers" WHERE "goals"<73; |
## Task
Generate a SQL query to answer the following question:
`What is the average number for goals less than 73?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_goalscorers" (
"name" text,
"career" text,
"apps" real,
"goals" real,
"aver... |
SELECT COUNT("average") FROM "top_goalscorers" WHERE "career"='1990-1995' AND "goals"<90; |
## Task
Generate a SQL query to answer the following question:
`What is the total average for 1990-1995, and goals less than 90?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "top_goalscorers" (
"name" text,
"career" text,
"apps" real,
"goals"... |
SELECT MIN("position") FROM "torneio_rio_s_o_paulo" WHERE "lost"<3 AND "difference"='1' AND "played">7; |
## Task
Generate a SQL query to answer the following question:
`What was the lowest Position for a Team with fewer than 3 Lost, a Difference of 1, and more than 7 games Played?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneio_rio_s_o_paulo" (
... |
SELECT SUM("played") FROM "torneio_rio_s_o_paulo" WHERE "team"='vasco da gama' AND "against"<12; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of games Played by the Team Vasco Da Gama, with fewer than 12 Against?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" ... |
SELECT "difference" FROM "torneio_rio_s_o_paulo" WHERE "position"<2; |
## Task
Generate a SQL query to answer the following question:
`What was the Difference of the Team that had a Position less than 2?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "torneio_rio_s_o_paulo" (
"position" real,
"team" text,
"points" r... |
SELECT "attendance" FROM "schedule" WHERE "date"='november 21, 2004'; |
## Task
Generate a SQL query to answer the following question:
`Which attendance number was taken on november 21, 2004?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"att... |
SELECT "attendance" FROM "schedule" WHERE "week"<16 AND "opponent"='washington redskins'; |
## Task
Generate a SQL query to answer the following question:
`Which attendance number was taken in a week less than 16 when the Washington Redskins were the opponents?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date... |
SELECT SUM("week") FROM "schedule" WHERE "opponent"='green bay packers'; |
## Task
Generate a SQL query to answer the following question:
`How many weeks had the Green Bay packers as opponents?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"atte... |
SELECT "country" FROM "second_round_friday_saturday" WHERE "score"='71-67=138'; |
## Task
Generate a SQL query to answer the following question:
`What Country had a Score of 71-67=138?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round_friday_saturday" (
"place" text,
"player" text,
"country" text,
"score" text,
... |
SELECT "country" FROM "second_round_friday_saturday" WHERE "score"='75-68=143'; |
## Task
Generate a SQL query to answer the following question:
`What Country had a Score of 75-68=143?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "second_round_friday_saturday" (
"place" text,
"player" text,
"country" text,
"score" text,
... |
SELECT SUM("innings") FROM "sri_lanka" WHERE "average"<6.33 AND "s_r"<71.43 AND "balls_faced">36 AND "runs_scored"<19; |
## Task
Generate a SQL query to answer the following question:
`How many total innings have an average under 6.33, strike rate under 71.43, balls faced over 36, and smaller than 19 runs scored?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sri_lanka"... |
SELECT COUNT("average") FROM "sri_lanka" WHERE "balls_faced">297 AND "innings">7; |
## Task
Generate a SQL query to answer the following question:
`What is the number of averages having a balls faced over 297 and more than 7 innings?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sri_lanka" (
"name" text,
"innings" real,
"runs_... |
SELECT MIN("innings") FROM "sri_lanka" WHERE "s_r"=72.05 AND "balls_faced"<297; |
## Task
Generate a SQL query to answer the following question:
`What is the smallest number of innings with a strike rate of 72.05 and under 297 balls faced?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sri_lanka" (
"name" text,
"innings" real,
... |
SELECT SUM("balls_faced") FROM "sri_lanka" WHERE "s_r">48.28 AND "innings"=3 AND "average"<5; |
## Task
Generate a SQL query to answer the following question:
`What is the sum of balls faced associated with a strike rate over 48.28, 3 innings, and an average under 5?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "sri_lanka" (
"name" text,
"i... |
SELECT "nation" FROM "record_progression" WHERE "date"='may 6, 1991'; |
## Task
Generate a SQL query to answer the following question:
`What is the Nation with a Date that is may 6, 1991?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "record_progression" (
"record" text,
"athlete" text,
"nation" text,
"venue" text... |
SELECT "record" FROM "record_progression" WHERE "date"='may 20, 1961'; |
## Task
Generate a SQL query to answer the following question:
`What is the Record with a Date that is may 20, 1961?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "record_progression" (
"record" text,
"athlete" text,
"nation" text,
"venue" tex... |
SELECT "partner" FROM "doubles_5_1_4" WHERE "outcome"='winner'; |
## Task
Generate a SQL query to answer the following question:
`Who was the partner of the winner?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "doubles_5_1_4" (
"outcome" text,
"date" text,
"tournament" text,
"surface" text,
"partner" text... |
SELECT "volume_issue" FROM "see_also" WHERE "song"='\" stars on 45 medley \"'; |
## Task
Generate a SQL query to answer the following question:
`What is the Volume:Issue for the song " stars on 45 medley "?`
### Database Schema
This query will run on a database whose schema is represented in this string:
CREATE TABLE "see_also" (
"volume_issue" text,
"issue_date_s" text,
"weeks_on_top" rea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.