output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "surface" FROM "doubles_18_7_11" WHERE "partner"='remi tezuka';
## Task Generate a SQL query to answer the following question: `What surface was used when she played with Remi Tezuka?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_18_7_11" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What surface was used when she played with Remi Tezuka?`: ```sql
SELECT "results" FROM "ncaa_tournament_results" WHERE "record"='28-12';
## Task Generate a SQL query to answer the following question: `What Results has the Record of 28-12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ncaa_tournament_results" ( "year" real, "record" text, "seed" text, "region" text, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What Results has the Record of 28-12?`: ```sql
SELECT "results" FROM "ncaa_tournament_results" WHERE "seed"='#12' AND "year"<1996;
## Task Generate a SQL query to answer the following question: `What Results has a Seed #12 and a Year that's smaller than 1996` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ncaa_tournament_results" ( "year" real, "record" text, "seed" text, "region" text, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What Results has a Seed #12 and a Year that's smaller than 1996`: ```sql
SELECT MAX("year") FROM "ncaa_tournament_results" WHERE "record"='18-12';
## Task Generate a SQL query to answer the following question: `What's the highest Year with the Record of 18-12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ncaa_tournament_results" ( "year" real, "record" text, "seed" text, "region" text, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the highest Year with the Record of 18-12?`: ```sql
SELECT MAX("year") FROM "ncaa_tournament_results" WHERE "region"='southeast';
## Task Generate a SQL query to answer the following question: `What's the highest Year with the Region of Southeast?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ncaa_tournament_results" ( "year" real, "record" text, "seed" text, "region" text, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the highest Year with the Region of Southeast?`: ```sql
SELECT "record" FROM "ncaa_tournament_results" WHERE "year">2012;
## Task Generate a SQL query to answer the following question: `What Record has a Year that's larger than 2012?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ncaa_tournament_results" ( "year" real, "record" text, "seed" text, "region" text, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What Record has a Year that's larger than 2012?`: ```sql
SELECT "record" FROM "season_schedule" WHERE "opponent"='kansas city kings';
## Task Generate a SQL query to answer the following question: `What is the Laker's record when they played against Kansas City Kings?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_schedule" ( "date" text, "opponent" text, "result" text, "score" text, "record" text, "streak" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Laker's record when they played against Kansas City Kings?`: ```sql
SELECT "pronunciation_a" FROM "old_chinese" WHERE "word"='傳';
## Task Generate a SQL query to answer the following question: `Name the pronunciation for 傳` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "old_chinese" ( "word" text, "pronunciation_a" text, "meaning_a" text, "pronunciation_b" text, "meaning_b" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the pronunciation for 傳`: ```sql
SELECT "pronunciation_a" FROM "old_chinese" WHERE "meaning_a"='king';
## Task Generate a SQL query to answer the following question: `Name the pronunciation for meaning of king` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "old_chinese" ( "word" text, "pronunciation_a" text, "meaning_a" text, "pronunciation_b" text, "meaning_b" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the pronunciation for meaning of king`: ```sql
SELECT "word" FROM "old_chinese" WHERE "pronunciation_b"='*sɨks';
## Task Generate a SQL query to answer the following question: `Name the word with pronunciation b of *sɨks` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "old_chinese" ( "word" text, "pronunciation_a" text, "meaning_a" text, "pronunciation_b" text, "meaning_b" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the word with pronunciation b of *sɨks`: ```sql
SELECT "pronunciation_b" FROM "old_chinese" WHERE "meaning_b"='border, frontier';
## Task Generate a SQL query to answer the following question: `Name the pronunciation for meaning b of border, frontier` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "old_chinese" ( "word" text, "pronunciation_a" text, "meaning_a" text, "pronunciation_b" text, "meaning_b" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the pronunciation for meaning b of border, frontier`: ```sql
SELECT "pronunciation_b" FROM "old_chinese" WHERE "meaning_a"='grind';
## Task Generate a SQL query to answer the following question: `Name the pronunciation b for meaning of grind` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "old_chinese" ( "word" text, "pronunciation_a" text, "meaning_a" text, "pronunciation_b" text, "meaning_b" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the pronunciation b for meaning of grind`: ```sql
SELECT "2008" FROM "grand_prix_de_futsal" WHERE "2006"='2nd';
## Task Generate a SQL query to answer the following question: `What is the 2008 value that was 2nd in 2006?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_prix_de_futsal" ( "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2013" text, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the 2008 value that was 2nd in 2006?`: ```sql
SELECT AVG("total") FROM "grand_prix_de_futsal" WHERE "2010"='1st';
## Task Generate a SQL query to answer the following question: `What is the average total that is 1st in 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_prix_de_futsal" ( "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2013" text, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the average total that is 1st in 2010?`: ```sql
SELECT "2008" FROM "grand_prix_de_futsal" WHERE "2010"='7';
## Task Generate a SQL query to answer the following question: `What is the 2008 value with a 7 in 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_prix_de_futsal" ( "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2013" text, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the 2008 value with a 7 in 2010?`: ```sql
SELECT "location" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "name"='woodburn dragstrip';
## Task Generate a SQL query to answer the following question: `What is the Location for the woodburn dragstrip?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_auto_racing_tracks_in_the_united" ( "name" text, "location" text, "state" text, "opened_closing_date_if_defunct" text, "surface" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Location for the woodburn dragstrip?`: ```sql
SELECT "state" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "opened_closing_date_if_defunct"='1960';
## Task Generate a SQL query to answer the following question: `What State has an Opened (closing date if defunct) that shows 1960?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_auto_racing_tracks_in_the_united" ( "name" text, "location" text, "state" text, "opened_closing_date_if_defunct" text, "surface" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `What State has an Opened (closing date if defunct) that shows 1960?`: ```sql
SELECT "location" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "name"='route 66 raceway';
## Task Generate a SQL query to answer the following question: `What is the Location for the route 66 raceway?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_auto_racing_tracks_in_the_united" ( "name" text, "location" text, "state" text, "opened_closing_date_if_defunct" text, "surface" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Location for the route 66 raceway?`: ```sql
SELECT "location" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "name"='newington international airport';
## Task Generate a SQL query to answer the following question: `What is the Location for the newington international airport?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_auto_racing_tracks_in_the_united" ( "name" text, "location" text, "state" text, "opened_closing_date_if_defunct" text, "surface" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Location for the newington international airport?`: ```sql
SELECT "name" FROM "list_of_auto_racing_tracks_in_the_united" WHERE "opened_closing_date_if_defunct"='1995' AND "length"='miles (m)' AND "state"='illinois';
## Task Generate a SQL query to answer the following question: `What is the Name with an Opened (closing date if defunct) of 1995 and has a Length of miles (m), in Illinois?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_auto_racing_tracks_in_the_united" ( "name" text, "location" text, "state" text, "opened_closing_date_if_defunct" text, "surface" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Name with an Opened (closing date if defunct) of 1995 and has a Length of miles (m), in Illinois?`: ```sql
SELECT "score" FROM "doubles_7_4_3" WHERE "opponents"='amanda brown brenda remilton';
## Task Generate a SQL query to answer the following question: `What is the Score with an Opponent that is amanda brown brenda remilton?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_7_4_3" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Score with an Opponent that is amanda brown brenda remilton?`: ```sql
SELECT "score" FROM "doubles_7_4_3" WHERE "outcome"='runner-up' AND "partner"='elizabeth little';
## Task Generate a SQL query to answer the following question: `What is the Score with an Outcome of runner-up, and a Partner that is elizabeth little?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_7_4_3" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Score with an Outcome of runner-up, and a Partner that is elizabeth little?`: ```sql
SELECT "pitcher" FROM "four_consecutive_home_runs_by_a_team_in_" WHERE "date"='june 8, 1961';
## Task Generate a SQL query to answer the following question: `Who was the pitcher on June 8, 1961?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "four_consecutive_home_runs_by_a_team_in_" ( "team" text, "date" text, "opponent" text, "pitcher" text, "inn" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the pitcher on June 8, 1961?`: ```sql
SELECT "team" FROM "four_consecutive_home_runs_by_a_team_in_" WHERE "inn"='9th';
## Task Generate a SQL query to answer the following question: `What team had the record asscoiated with the 9th inning?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "four_consecutive_home_runs_by_a_team_in_" ( "team" text, "date" text, "opponent" text, "pitcher" text, "inn" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `What team had the record asscoiated with the 9th inning?`: ```sql
SELECT "venue" FROM "four_consecutive_home_runs_by_a_team_in_" WHERE "team"='boston red sox';
## Task Generate a SQL query to answer the following question: `In what venue did the Boston Red Sox play in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "four_consecutive_home_runs_by_a_team_in_" ( "team" text, "date" text, "opponent" text, "pitcher" text, "inn" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `In what venue did the Boston Red Sox play in?`: ```sql
SELECT "pitcher" FROM "four_consecutive_home_runs_by_a_team_in_" WHERE "inn"='7th';
## Task Generate a SQL query to answer the following question: `Who was the pitcher with the record recorded in the 7th inning?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "four_consecutive_home_runs_by_a_team_in_" ( "team" text, "date" text, "opponent" text, "pitcher" text, "inn" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the pitcher with the record recorded in the 7th inning?`: ```sql
SELECT "result" FROM "south_carolina" WHERE "incumbent"='david e. finley';
## Task Generate a SQL query to answer the following question: `When David E. Finley was the incumbent what was the result?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `When David E. Finley was the incumbent what was the result?`: ```sql
SELECT "result" FROM "south_carolina" WHERE "first_elected"='1898';
## Task Generate a SQL query to answer the following question: `When someone was first elected in 1898 what was the result?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `When someone was first elected in 1898 what was the result?`: ```sql
SELECT "party" FROM "south_carolina" WHERE "incumbent"='stanyarne wilson';
## Task Generate a SQL query to answer the following question: `What party has an incumbent of Stanyarne Wilson?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What party has an incumbent of Stanyarne Wilson?`: ```sql
SELECT "result" FROM "south_carolina" WHERE "incumbent"='william elliott';
## Task Generate a SQL query to answer the following question: `When the incumbent was William Elliott, what was the result?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `When the incumbent was William Elliott, what was the result?`: ```sql
SELECT "8_00" FROM "wednesday" WHERE "9_00"='da vinci''s inquest';
## Task Generate a SQL query to answer the following question: `What is the 8:00 that has da vinci's inquest as the 9:00?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "wednesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the 8:00 that has da vinci's inquest as the 9:00?`: ```sql
SELECT "10_00" FROM "wednesday" WHERE "9_30"='party of five';
## Task Generate a SQL query to answer the following question: `What 10:00 has party of five as 9:30?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "wednesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); ### SQL Given the database schema, here is the SQL query that answers `What 10:00 has party of five as 9:30?`: ```sql
SELECT "9_00" FROM "wednesday" WHERE "7_00"='entertainment tonight';
## Task Generate a SQL query to answer the following question: `What 9:00 has entertainment tonight as 7:00?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "wednesday" ( "7_00" text, "7_30" text, "8_00" text, "8_30" text, "9_00" text, "9_30" text, "10_00" text, "10_30" text ); ### SQL Given the database schema, here is the SQL query that answers `What 9:00 has entertainment tonight as 7:00?`: ```sql
SELECT "opponents" FROM "results" WHERE "score"='2-1' AND "competition"='pl' AND "date"='december 22, 2006';
## Task Generate a SQL query to answer the following question: `Score of 2-1, and a Competition of pl, and a Date of december 22, 2006 had what opponents?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "venue" text, "opponents" text, "score" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Score of 2-1, and a Competition of pl, and a Date of december 22, 2006 had what opponents?`: ```sql
SELECT "score" FROM "results" WHERE "date"='april 3, 2007';
## Task Generate a SQL query to answer the following question: `Date of april 3, 2007 had what score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "venue" text, "opponents" text, "score" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Date of april 3, 2007 had what score?`: ```sql
SELECT "date" FROM "results" WHERE "competition"='pl' AND "score"='1-1' AND "opponents"='kelantan';
## Task Generate a SQL query to answer the following question: `Competition of pl, and a Score of 1-1, and a Opponents of kelantan had what date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "venue" text, "opponents" text, "score" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Competition of pl, and a Score of 1-1, and a Opponents of kelantan had what date?`: ```sql
SELECT "competition" FROM "results" WHERE "venue"='klfa stadium, cheras' AND "score"='3-3';
## Task Generate a SQL query to answer the following question: `Venue of klfa stadium, cheras, and a Score of 3-3 had what competition?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "venue" text, "opponents" text, "score" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Venue of klfa stadium, cheras, and a Score of 3-3 had what competition?`: ```sql
SELECT "date" FROM "results" WHERE "opponents"='police' AND "venue"='selayang municipal council stadium';
## Task Generate a SQL query to answer the following question: `Opponents of police, and a Venue of selayang municipal council stadium had what date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "venue" text, "opponents" text, "score" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Opponents of police, and a Venue of selayang municipal council stadium had what date?`: ```sql
SELECT "venue" FROM "results" WHERE "competition"='fa cup rd 1';
## Task Generate a SQL query to answer the following question: `Competition of fa cup rd 1 had what venue?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "venue" text, "opponents" text, "score" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Competition of fa cup rd 1 had what venue?`: ```sql
SELECT "visitor" FROM "game_log" WHERE "date"='january 27';
## Task Generate a SQL query to answer the following question: `Who was the visiting team on January 27?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the visiting team on January 27?`: ```sql
SELECT "home" FROM "game_log" WHERE "date"='february 25';
## Task Generate a SQL query to answer the following question: `What is the home team that played on February 25?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the home team that played on February 25?`: ```sql
SELECT "date" FROM "november" WHERE "visitor"='chicago';
## Task Generate a SQL query to answer the following question: `Name the date with chicago visiting` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the date with chicago visiting`: ```sql
SELECT "home" FROM "november" WHERE "visitor"='chicago';
## Task Generate a SQL query to answer the following question: `Name the home with chicago visiting` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the home with chicago visiting`: ```sql
SELECT MAX("apps") FROM "top_goalscorers" WHERE "goals">63 AND "avge"=0.45;
## Task Generate a SQL query to answer the following question: `What is the highest number of apps of the player with more than 63 goals and an avge of 0.45?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_goalscorers" ( "name" text, "goals" real, "apps" real, "avge" real, "career" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number of apps of the player with more than 63 goals and an avge of 0.45?`: ```sql
SELECT COUNT("avge") FROM "top_goalscorers" WHERE "name"='john hall' AND "goals"<63;
## Task Generate a SQL query to answer the following question: `What is the total avge of John Hall, who has less than 63 goals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_goalscorers" ( "name" text, "goals" real, "apps" real, "avge" real, "career" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total avge of John Hall, who has less than 63 goals?`: ```sql
SELECT SUM("year") FROM "winners" WHERE "score"='278' AND "champion"='kim thompson';
## Task Generate a SQL query to answer the following question: `When did Kim Thompson win with 278 score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners" ( "year" real, "champion" text, "venue" text, "location" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `When did Kim Thompson win with 278 score?`: ```sql
SELECT "venue" FROM "winners" WHERE "champion"='steve gotsche';
## Task Generate a SQL query to answer the following question: `Where did Steve Gotsche win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners" ( "year" real, "champion" text, "venue" text, "location" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Where did Steve Gotsche win?`: ```sql
SELECT SUM("rank") FROM "completed_buildings" WHERE "built"<2007 AND "building"='howard johnson hotel bucharest';
## Task Generate a SQL query to answer the following question: `What is the sum of Rank with a build year earlier than 2007 for the howard johnson hotel bucharest?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "completed_buildings" ( "rank" real, "building" text, "city" text, "height_m_ft" text, "built" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of Rank with a build year earlier than 2007 for the howard johnson hotel bucharest?`: ```sql
SELECT "height_m_ft" FROM "completed_buildings" WHERE "city"='bucharest' AND "built"=2009 AND "rank"=13;
## Task Generate a SQL query to answer the following question: `What is the Height (m/ft) for bucharest Built in 2009, and a Rank of 13?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "completed_buildings" ( "rank" real, "building" text, "city" text, "height_m_ft" text, "built" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the Height (m/ft) for bucharest Built in 2009, and a Rank of 13?`: ```sql
SELECT "city" FROM "completed_buildings" WHERE "building"='bucharest tower center (btc)';
## Task Generate a SQL query to answer the following question: `What city is the bucharest tower center (btc) located in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "completed_buildings" ( "rank" real, "building" text, "city" text, "height_m_ft" text, "built" real ); ### SQL Given the database schema, here is the SQL query that answers `What city is the bucharest tower center (btc) located in?`: ```sql
SELECT "building" FROM "completed_buildings" WHERE "city"='bucharest' AND "rank"<12;
## Task Generate a SQL query to answer the following question: `What is the name of the building in Bucharest with a rank of less than 12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "completed_buildings" ( "rank" real, "building" text, "city" text, "height_m_ft" text, "built" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the building in Bucharest with a rank of less than 12?`: ```sql
SELECT "city" FROM "completed_buildings" WHERE "built"=1988;
## Task Generate a SQL query to answer the following question: `What city was the building built in 1988?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "completed_buildings" ( "rank" real, "building" text, "city" text, "height_m_ft" text, "built" real ); ### SQL Given the database schema, here is the SQL query that answers `What city was the building built in 1988?`: ```sql
SELECT "score" FROM "boston_bruins_4_hartford_whalers_2" WHERE "home"='boston bruins' AND "date"='april 11';
## Task Generate a SQL query to answer the following question: `What is the score of the Boston Bruins game from April 11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "boston_bruins_4_hartford_whalers_2" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the score of the Boston Bruins game from April 11?`: ```sql
SELECT "record" FROM "boston_bruins_4_hartford_whalers_2" WHERE "home"='hartford whalers' AND "date"='april 13';
## Task Generate a SQL query to answer the following question: `What is the record of the Hartford Whalers home team with the April 13 game date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "boston_bruins_4_hartford_whalers_2" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the record of the Hartford Whalers home team with the April 13 game date?`: ```sql
SELECT "score" FROM "boston_bruins_4_hartford_whalers_2" WHERE "visitor"='hartford whalers' AND "date"='april 11';
## Task Generate a SQL query to answer the following question: `What is the score of the visiting Hartford Whalers game from April 11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "boston_bruins_4_hartford_whalers_2" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the score of the visiting Hartford Whalers game from April 11?`: ```sql
SELECT "passengers" FROM "busiest_international_routes_from_portla" WHERE "carriers"='air canada';
## Task Generate a SQL query to answer the following question: `Which Passengers have Carriers of air canada?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "busiest_international_routes_from_portla" ( "rank" real, "airport" text, "metropolitan_area" text, "passengers" real, "carriers" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Passengers have Carriers of air canada?`: ```sql
SELECT "metropolitan_area" FROM "busiest_international_routes_from_portla" WHERE "passengers">'130,903' AND "rank"=4;
## Task Generate a SQL query to answer the following question: `Which Metropolitan area has Passengers larger than 130,903, and a Rank of 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "busiest_international_routes_from_portla" ( "rank" real, "airport" text, "metropolitan_area" text, "passengers" real, "carriers" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Metropolitan area has Passengers larger than 130,903, and a Rank of 4?`: ```sql
SELECT "metropolitan_area" FROM "busiest_international_routes_from_portla" WHERE "airport"='toronto pearson international airport';
## Task Generate a SQL query to answer the following question: `Which Metropolitan area has an Airport of toronto pearson international airport?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "busiest_international_routes_from_portla" ( "rank" real, "airport" text, "metropolitan_area" text, "passengers" real, "carriers" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Metropolitan area has an Airport of toronto pearson international airport?`: ```sql
SELECT "link" FROM "opinion_polls" WHERE "date_of_polling"='january 31 – february 3, 2011';
## Task Generate a SQL query to answer the following question: `What is the link for january 31 – february 3, 2011?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "polling_firm" text, "date_of_polling" text, "link" text, "liberal" real, "green" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the link for january 31 – february 3, 2011?`: ```sql
SELECT "date_of_polling" FROM "opinion_polls" WHERE "polling_firm"='forum research' AND "green"=7 AND "liberal"<30;
## Task Generate a SQL query to answer the following question: `On what date of polling was the Polling Firm forum research with 7 green and less than 30 liberals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "polling_firm" text, "date_of_polling" text, "link" text, "liberal" real, "green" real ); ### SQL Given the database schema, here is the SQL query that answers `On what date of polling was the Polling Firm forum research with 7 green and less than 30 liberals?`: ```sql
SELECT "polling_firm" FROM "opinion_polls" WHERE "link"='html' AND "liberal"<36 AND "green"<8 AND "date_of_polling"='september 26–28, 2011';
## Task Generate a SQL query to answer the following question: `Which september 26–28, 2011 polling firm had a Link of html, less than 36 liberals, and less than 8 green?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "polling_firm" text, "date_of_polling" text, "link" text, "liberal" real, "green" real ); ### SQL Given the database schema, here is the SQL query that answers `Which september 26–28, 2011 polling firm had a Link of html, less than 36 liberals, and less than 8 green?`: ```sql
SELECT "polling_firm" FROM "opinion_polls" WHERE "green"<13 AND "date_of_polling"='june 21–22, 2011';
## Task Generate a SQL query to answer the following question: `What june 21–22, 2011 polling has green smaller than 13?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "opinion_polls" ( "polling_firm" text, "date_of_polling" text, "link" text, "liberal" real, "green" real ); ### SQL Given the database schema, here is the SQL query that answers `What june 21–22, 2011 polling has green smaller than 13?`: ```sql
SELECT "years_as_tallest" FROM "timeline_of_tallest_skyscrapers_in_afric" WHERE "floors"=31;
## Task Generate a SQL query to answer the following question: `What is listed under the Years as tallest, that has Floors of 31?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "timeline_of_tallest_skyscrapers_in_afric" ( "name" text, "city" text, "years_as_tallest" text, "metres" real, "feet" real, "floors" real ); ### SQL Given the database schema, here is the SQL query that answers `What is listed under the Years as tallest, that has Floors of 31?`: ```sql
SELECT MIN("floors") FROM "timeline_of_tallest_skyscrapers_in_afric" WHERE "feet">262 AND "name"='standard bank building' AND "metres">138.8;
## Task Generate a SQL query to answer the following question: `What's the lowest Floors with Feet that's larger htan 262, has a Name of Standard Bank Building, and Metres that's larger htan 138.8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "timeline_of_tallest_skyscrapers_in_afric" ( "name" text, "city" text, "years_as_tallest" text, "metres" real, "feet" real, "floors" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the lowest Floors with Feet that's larger htan 262, has a Name of Standard Bank Building, and Metres that's larger htan 138.8?`: ```sql
SELECT COUNT("metres") FROM "timeline_of_tallest_skyscrapers_in_afric" WHERE "feet"<196;
## Task Generate a SQL query to answer the following question: `What is the sum of Metres wiht a Feet that's smaller than 196?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "timeline_of_tallest_skyscrapers_in_afric" ( "name" text, "city" text, "years_as_tallest" text, "metres" real, "feet" real, "floors" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of Metres wiht a Feet that's smaller than 196?`: ```sql
SELECT MIN("week") FROM "schedule" WHERE "attendance"<'68,977' AND "date"='october 23, 1977';
## Task Generate a SQL query to answer the following question: `What is the lowest week number that there was a game on October 23, 1977 with less than 68,977 people attending?` ### 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, "record" text, "game_site" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest week number that there was a game on October 23, 1977 with less than 68,977 people attending?`: ```sql
SELECT MAX("weight_kg") FROM "2008_2009_squad" WHERE "position"='scrum half';
## Task Generate a SQL query to answer the following question: `What is the highest weight of the position scrum half?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008_2009_squad" ( "player" text, "position" text, "height_m" real, "weight_kg" real, "years" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest weight of the position scrum half?`: ```sql
SELECT "power" FROM "engines" WHERE "torque"='n·m (lb·ft) at1,500rpm';
## Task Generate a SQL query to answer the following question: `What is the power of the engine with a torque of n·m (lb·ft) at1,500rpm?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "engines" ( "engine" text, "type" text, "displacement" text, "power" text, "torque" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the power of the engine with a torque of n·m (lb·ft) at1,500rpm?`: ```sql
SELECT "torque" FROM "engines" WHERE "engine"='1.3 16v multijet';
## Task Generate a SQL query to answer the following question: `Which torque value is associated with the 1.3 16V multijet engine?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "engines" ( "engine" text, "type" text, "displacement" text, "power" text, "torque" text ); ### SQL Given the database schema, here is the SQL query that answers `Which torque value is associated with the 1.3 16V multijet engine?`: ```sql
SELECT MIN("against") FROM "torneio_rio_s_o_paulo" WHERE "drawn"<2 AND "points"=10 AND "lost"<4;
## Task Generate a SQL query to answer the following question: `What is the lowest against value with less than 2 draws, 10 points, and less than 4 lost?` ### 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" real, "played" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest against value with less than 2 draws, 10 points, and less than 4 lost?`: ```sql
SELECT AVG("position") FROM "torneio_rio_s_o_paulo" WHERE "against"<11;
## Task Generate a SQL query to answer the following question: `What is the average position with an against value less than 11?` ### 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" real, "played" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average position with an against value less than 11?`: ```sql
SELECT MAX("lost") FROM "torneio_rio_s_o_paulo" WHERE "position">10;
## Task Generate a SQL query to answer the following question: `What is the largest value for lost with a position greater than 10?` ### 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" real, "played" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the largest value for lost with a position greater than 10?`: ```sql
SELECT COUNT("against") FROM "torneio_rio_s_o_paulo" WHERE "team"='corinthians' AND "lost"<3;
## Task Generate a SQL query to answer the following question: `What is the total of all against values for the Corinthians with less than 3 lost?` ### 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" real, "played" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total of all against values for the Corinthians with less than 3 lost?`: ```sql
SELECT MIN("against") FROM "torneio_rio_s_o_paulo" WHERE "points"<9 AND "lost">6;
## Task Generate a SQL query to answer the following question: `What is the lowest against value with less than 9 points and more than 6 lost?` ### 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" real, "played" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest against value with less than 9 points and more than 6 lost?`: ```sql
SELECT "tournament" FROM "tournament_results" WHERE "date"='nov 5' AND "location"='mississippi';
## Task Generate a SQL query to answer the following question: `What tournament located is mississippi was nov 5` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tournament_results" ( "date" text, "tournament" text, "location" text, "winner" text, "score" text, "1st_prize" real ); ### SQL Given the database schema, here is the SQL query that answers `What tournament located is mississippi was nov 5`: ```sql
SELECT SUM("1st_prize") FROM "tournament_results" WHERE "date"='may 21';
## Task Generate a SQL query to answer the following question: `what is the 1st prize for may 21` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tournament_results" ( "date" text, "tournament" text, "location" text, "winner" text, "score" text, "1st_prize" real ); ### SQL Given the database schema, here is the SQL query that answers `what is the 1st prize for may 21`: ```sql
SELECT "director" FROM "group_no_4" WHERE "producer"='hiroshi sato' AND "platform_s"='gba';
## Task Generate a SQL query to answer the following question: `Who is the director of the game with HIroshi Sato as the producer on the GBA platform?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_no_4" ( "title" text, "year" real, "platform_s" text, "director" text, "producer" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the director of the game with HIroshi Sato as the producer on the GBA platform?`: ```sql
SELECT "director" FROM "group_no_4" WHERE "title"='last window: the secret of cape west 3';
## Task Generate a SQL query to answer the following question: `Who is the director of Last Window: The Secret of Cape West 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_no_4" ( "title" text, "year" real, "platform_s" text, "director" text, "producer" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the director of Last Window: The Secret of Cape West 3?`: ```sql
SELECT "platform_s" FROM "group_no_4" WHERE "year"=2010 AND "director"='shuichiro nishiya';
## Task Generate a SQL query to answer the following question: `What is the platform of the 2010 game with Shuichiro Nishiya as director?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_no_4" ( "title" text, "year" real, "platform_s" text, "director" text, "producer" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the platform of the 2010 game with Shuichiro Nishiya as director?`: ```sql
SELECT "opponent" FROM "regular_season" WHERE "october"=29;
## Task Generate a SQL query to answer the following question: `Which Opponent is on October of 29?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Opponent is on October of 29?`: ```sql
SELECT MIN("october") FROM "regular_season" WHERE "record"='1–0–0';
## Task Generate a SQL query to answer the following question: `WHich October has a Record of 1–0–0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `WHich October has a Record of 1–0–0?`: ```sql
SELECT "opponent" FROM "regular_season" WHERE "october">20 AND "score"='2–2';
## Task Generate a SQL query to answer the following question: `Which Opponent has a October larger than 20 with a Score of 2–2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Opponent has a October larger than 20 with a Score of 2–2?`: ```sql
SELECT AVG("year") FROM "lpga_major_championship" WHERE "margin_of_victory"='9 strokes' AND "purse"<'2,750,000';
## Task Generate a SQL query to answer the following question: `What year was the margin of victory 9 strokes and the purse under $2,750,000?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lpga_major_championship" ( "year" real, "dates" text, "venue" text, "champion" text, "country" text, "score" real, "to_par" text, "margin_of_victory" text, "runner_s_up" text, "purse" real, "winner_s_share" real ); ### SQL Given the database schema, here is the SQL query that answers `What year was the margin of victory 9 strokes and the purse under $2,750,000?`: ```sql
SELECT COUNT("year") FROM "lpga_major_championship" WHERE "score"=269;
## Task Generate a SQL query to answer the following question: `What year was the score 269?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lpga_major_championship" ( "year" real, "dates" text, "venue" text, "champion" text, "country" text, "score" real, "to_par" text, "margin_of_victory" text, "runner_s_up" text, "purse" real, "winner_s_share" real ); ### SQL Given the database schema, here is the SQL query that answers `What year was the score 269?`: ```sql
SELECT AVG("points") FROM "motorcycle_grand_prix_results" WHERE "class"='250cc' AND "wins"<0;
## Task Generate a SQL query to answer the following question: `What is the average number of points for a team in the 250cc class with fewer than 0 wins?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "rank" text, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the average number of points for a team in the 250cc class with fewer than 0 wins?`: ```sql
SELECT MIN("points") FROM "motorcycle_grand_prix_results" WHERE "year"=1981;
## Task Generate a SQL query to answer the following question: `What is the smallest number of points for a 1981 team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "rank" text, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest number of points for a 1981 team?`: ```sql
SELECT MIN("wins") FROM "motorcycle_grand_prix_results" WHERE "points"<32 AND "class"='350cc' AND "rank"='8th';
## Task Generate a SQL query to answer the following question: `What is the fewest number of wins for a team ranked 8th with fewer than 32 points in the 350cc class?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "rank" text, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the fewest number of wins for a team ranked 8th with fewer than 32 points in the 350cc class?`: ```sql
SELECT "rank" FROM "motorcycle_grand_prix_results" WHERE "class"='250cc' AND "year"=1983;
## Task Generate a SQL query to answer the following question: `What was the rank of the 1983 team in the 250cc class?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "rank" text, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the rank of the 1983 team in the 250cc class?`: ```sql
SELECT "district" FROM "south_carolina" WHERE "incumbent"='joseph t. johnson';
## Task Generate a SQL query to answer the following question: `Which district has joseph t. johnson as an incumbent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which district has joseph t. johnson as an incumbent?`: ```sql
SELECT "result" FROM "south_carolina" WHERE "first_elected"='1904' AND "incumbent"='james o''h. patterson';
## Task Generate a SQL query to answer the following question: `What was the result for james o'h. patterson when first elected in 1904?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the result for james o'h. patterson when first elected in 1904?`: ```sql
SELECT "party" FROM "south_carolina" WHERE "result"='re-elected' AND "district"='south carolina 5';
## Task Generate a SQL query to answer the following question: `Which party was re-elected in south carolina 5 district?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which party was re-elected in south carolina 5 district?`: ```sql
SELECT "party" FROM "south_carolina" WHERE "incumbent"='joseph t. johnson';
## Task Generate a SQL query to answer the following question: `Which party was joseph t. johnson in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which party was joseph t. johnson in?`: ```sql
SELECT "party" FROM "south_carolina" WHERE "first_elected"='1898';
## Task Generate a SQL query to answer the following question: `Which party was first elected in 1898?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which party was first elected in 1898?`: ```sql
SELECT "district" FROM "south_carolina" WHERE "first_elected"='1900';
## Task Generate a SQL query to answer the following question: `Which district won when first elected in 1900?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south_carolina" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which district won when first elected in 1900?`: ```sql
SELECT SUM("wins") FROM "leaders" WHERE "earnings"='6,607,562';
## Task Generate a SQL query to answer the following question: `How many wins did the player who earned $6,607,562 have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leaders" ( "rank" real, "player" text, "country" text, "earnings" real, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `How many wins did the player who earned $6,607,562 have?`: ```sql
SELECT AVG("earnings") FROM "leaders" WHERE "player"='greg norman';
## Task Generate a SQL query to answer the following question: `What is the average earnings made by Greg Norman?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leaders" ( "rank" real, "player" text, "country" text, "earnings" real, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the average earnings made by Greg Norman?`: ```sql
SELECT "city" FROM "1973" WHERE "type_of_game"='friendly' AND "opponent"='tunisia';
## Task Generate a SQL query to answer the following question: `what city has a game of friendly and an opponent of tunisia?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1973" ( "date" text, "city" text, "opponent" text, "results" text, "type_of_game" text ); ### SQL Given the database schema, here is the SQL query that answers `what city has a game of friendly and an opponent of tunisia?`: ```sql
SELECT "results" FROM "1973" WHERE "opponent"='spain';
## Task Generate a SQL query to answer the following question: `what are the results of the opponent of spain?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1973" ( "date" text, "city" text, "opponent" text, "results" text, "type_of_game" text ); ### SQL Given the database schema, here is the SQL query that answers `what are the results of the opponent of spain?`: ```sql
SELECT "results" FROM "1973" WHERE "date"='december 19';
## Task Generate a SQL query to answer the following question: `what results are dated december 19?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1973" ( "date" text, "city" text, "opponent" text, "results" text, "type_of_game" text ); ### SQL Given the database schema, here is the SQL query that answers `what results are dated december 19?`: ```sql
SELECT "city" FROM "1973" WHERE "results"='4:2';
## Task Generate a SQL query to answer the following question: `what city has the results of 4:2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1973" ( "date" text, "city" text, "opponent" text, "results" text, "type_of_game" text ); ### SQL Given the database schema, here is the SQL query that answers `what city has the results of 4:2?`: ```sql