output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "2nd_leg" FROM "matches" WHERE "team_2"='san francisco';
## Task Generate a SQL query to answer the following question: `What's the 2nd leg for team 2 san francisco?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "matches" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the 2nd leg for team 2 san francisco?`: ```sql
SELECT "1st_leg" FROM "matches" WHERE "team_1"='alajuelense';
## Task Generate a SQL query to answer the following question: `What's the 1st leg of team 1 alajuelense?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "matches" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the 1st leg of team 1 alajuelense?`: ```sql
SELECT "format" FROM "release_history" WHERE "catalog"='660-51-015';
## Task Generate a SQL query to answer the following question: `What was the format for catalog 660-51-015?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "year" text, "label" text, "format" text, "catalog" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the format for catalog 660-51-015?`: ```sql
SELECT "region" FROM "release_history" WHERE "year"='may 1974';
## Task Generate a SQL query to answer the following question: `Which region had the year May 1974?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "year" text, "label" text, "format" text, "catalog" text ); ### SQL Given the database schema, here is the SQL query that answers `Which region had the year May 1974?`: ```sql
SELECT "region" FROM "release_history" WHERE "year"='march 10, 1998';
## Task Generate a SQL query to answer the following question: `Which region had a year March 10, 1998?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "year" text, "label" text, "format" text, "catalog" text ); ### SQL Given the database schema, here is the SQL query that answers `Which region had a year March 10, 1998?`: ```sql
SELECT "first_party" FROM "m_ps_1707_1868" WHERE "year"<1857 AND "first_member"='lord john hay';
## Task Generate a SQL query to answer the following question: `What is the first party for Lord John Hay earlier than 1857?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "m_ps_1707_1868" ( "year" real, "first_member" text, "first_party" text, "second_member" text, "second_party" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the first party for Lord John Hay earlier than 1857?`: ```sql
SELECT "second_member" FROM "m_ps_1707_1868" WHERE "year">1790 AND "first_member"='john williams';
## Task Generate a SQL query to answer the following question: `Who is the second member more recently than 1790 when John Williams is the first member?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "m_ps_1707_1868" ( "year" real, "first_member" text, "first_party" text, "second_member" text, "second_party" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the second member more recently than 1790 when John Williams is the first member?`: ```sql
SELECT "second_member" FROM "m_ps_1707_1868" WHERE "first_party"='tory' AND "year"<1804 AND "first_member"='henry isherwood';
## Task Generate a SQL query to answer the following question: `Who is the second member ewarlier than 1804 when Tory Henry Isherwood is the first member?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "m_ps_1707_1868" ( "year" real, "first_member" text, "first_party" text, "second_member" text, "second_party" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the second member ewarlier than 1804 when Tory Henry Isherwood is the first member?`: ```sql
SELECT "second_member" FROM "m_ps_1707_1868" WHERE "first_member"='rt hon. edward stanley';
## Task Generate a SQL query to answer the following question: `Who is the second member when RT Hon. Edward Stanley is the first member?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "m_ps_1707_1868" ( "year" real, "first_member" text, "first_party" text, "second_member" text, "second_party" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the second member when RT Hon. Edward Stanley is the first member?`: ```sql
SELECT "second_party" FROM "m_ps_1707_1868" WHERE "first_party"='tory' AND "year"=1820;
## Task Generate a SQL query to answer the following question: `What is the second party where the first party is Tory and the year is 1820?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "m_ps_1707_1868" ( "year" real, "first_member" text, "first_party" text, "second_member" text, "second_party" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the second party where the first party is Tory and the year is 1820?`: ```sql
SELECT "player" FROM "made_the_cut" WHERE "year_s_won"='1993';
## Task Generate a SQL query to answer the following question: `Who is the player who won in 1993?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the player who won in 1993?`: ```sql
SELECT "year_s_won" FROM "made_the_cut" WHERE "finish"='t71';
## Task Generate a SQL query to answer the following question: `What years did the player with a t71 finish win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `What years did the player with a t71 finish win?`: ```sql
SELECT "year_s_won" FROM "made_the_cut" WHERE "player"='payne stewart';
## Task Generate a SQL query to answer the following question: `What year did player payne stewart win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `What year did player payne stewart win?`: ```sql
SELECT "year_s_won" FROM "made_the_cut" WHERE "finish"='t3';
## Task Generate a SQL query to answer the following question: `What year did the player with a t3 finish win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `What year did the player with a t3 finish win?`: ```sql
SELECT MIN("total") FROM "made_the_cut" WHERE "finish"='t41';
## Task Generate a SQL query to answer the following question: `What is the lowest total of the player with a t41 finish?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest total of the player with a t41 finish?`: ```sql
SELECT "battle" FROM "medieval_bulgarian_army" WHERE "bulgarian_commander"='gavril radomir';
## Task Generate a SQL query to answer the following question: `In what Battle was Bulgarian Commander of Gavril Radomir?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medieval_bulgarian_army" ( "battle" text, "date" text, "bulgarian_commander" text, "byzantine_commander" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `In what Battle was Bulgarian Commander of Gavril Radomir?`: ```sql
SELECT "date" FROM "medieval_bulgarian_army" WHERE "result"='bulgarian victory' AND "battle"='battle of arcadiopolis';
## Task Generate a SQL query to answer the following question: `What is the Date of the Bulgarian Victory at the Battle of Arcadiopolis?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medieval_bulgarian_army" ( "battle" text, "date" text, "bulgarian_commander" text, "byzantine_commander" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Date of the Bulgarian Victory at the Battle of Arcadiopolis?`: ```sql
SELECT "bulgarian_commander" FROM "medieval_bulgarian_army" WHERE "battle"='battle of thessalonica' AND "date"='autumn 1040';
## Task Generate a SQL query to answer the following question: `What is the Bulgarian Commander in Autumn 1040 at the Battle of Thessalonica?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medieval_bulgarian_army" ( "battle" text, "date" text, "bulgarian_commander" text, "byzantine_commander" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Bulgarian Commander in Autumn 1040 at the Battle of Thessalonica?`: ```sql
SELECT "byzantine_commander" FROM "medieval_bulgarian_army" WHERE "result"='bulgarian victory' AND "battle"='siege of lovech';
## Task Generate a SQL query to answer the following question: `What is the Byzantine Commander with a Bulgarian Victory at the Siege of Lovech?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medieval_bulgarian_army" ( "battle" text, "date" text, "bulgarian_commander" text, "byzantine_commander" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Byzantine Commander with a Bulgarian Victory at the Siege of Lovech?`: ```sql
SELECT "result" FROM "medieval_bulgarian_army" WHERE "battle"='battle of marcellae' AND "date"='756';
## Task Generate a SQL query to answer the following question: `What is the Result of the Battle of Marcellae in 756?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medieval_bulgarian_army" ( "battle" text, "date" text, "bulgarian_commander" text, "byzantine_commander" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Result of the Battle of Marcellae in 756?`: ```sql
SELECT "date" FROM "medieval_bulgarian_army" WHERE "result"='bulgarian victory' AND "bulgarian_commander"='gavril radomir';
## Task Generate a SQL query to answer the following question: `What is the date of Gavril Radomir's Bulgarian Victory?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medieval_bulgarian_army" ( "battle" text, "date" text, "bulgarian_commander" text, "byzantine_commander" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of Gavril Radomir's Bulgarian Victory?`: ```sql
SELECT "3_season" FROM "rating_figures" WHERE "1_season"='2 959 699';
## Task Generate a SQL query to answer the following question: `What is 3 Season, when 1 Season is "2 959 699"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rating_figures" ( "episode" text, "1_season" text, "2_season" text, "3_season" text, "4_season" text, "5_season" text, "6_season" text ); ### SQL Given the database schema, here is the SQL query that answers `What is 3 Season, when 1 Season is "2 959 699"?`: ```sql
SELECT "1_season" FROM "rating_figures" WHERE "4_season"='2 101 043 (13 may 2009)';
## Task Generate a SQL query to answer the following question: `What is 1 Season, when 4 Season is "2 101 043 (13 May 2009)"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rating_figures" ( "episode" text, "1_season" text, "2_season" text, "3_season" text, "4_season" text, "5_season" text, "6_season" text ); ### SQL Given the database schema, here is the SQL query that answers `What is 1 Season, when 4 Season is "2 101 043 (13 May 2009)"?`: ```sql
SELECT "5_season" FROM "rating_figures" WHERE "2_season"='3 168 673 (2 april 2008)';
## Task Generate a SQL query to answer the following question: `What is 5 Season, when 2 Season is "3 168 673 (2 April 2008)"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rating_figures" ( "episode" text, "1_season" text, "2_season" text, "3_season" text, "4_season" text, "5_season" text, "6_season" text ); ### SQL Given the database schema, here is the SQL query that answers `What is 5 Season, when 2 Season is "3 168 673 (2 April 2008)"?`: ```sql
SELECT "4_season" FROM "rating_figures" WHERE "2_season"='3 168 673 (2 april 2008)';
## Task Generate a SQL query to answer the following question: `What is 4 Season, when 2 Season is "3 168 673 (2 April 2008)"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rating_figures" ( "episode" text, "1_season" text, "2_season" text, "3_season" text, "4_season" text, "5_season" text, "6_season" text ); ### SQL Given the database schema, here is the SQL query that answers `What is 4 Season, when 2 Season is "3 168 673 (2 April 2008)"?`: ```sql
SELECT "3_season" FROM "rating_figures" WHERE "4_season"='2 628 383 (3 june 2009)';
## Task Generate a SQL query to answer the following question: `What is 3 Season, when 4 Season is "2 628 383 (3 June 2009)"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rating_figures" ( "episode" text, "1_season" text, "2_season" text, "3_season" text, "4_season" text, "5_season" text, "6_season" text ); ### SQL Given the database schema, here is the SQL query that answers `What is 3 Season, when 4 Season is "2 628 383 (3 June 2009)"?`: ```sql
SELECT "1_season" FROM "rating_figures" WHERE "4_season"='3 273 440 (17 march 2009)';
## Task Generate a SQL query to answer the following question: `What is 1st Season, when 4 Season is "3 273 440 (17 March 2009)"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rating_figures" ( "episode" text, "1_season" text, "2_season" text, "3_season" text, "4_season" text, "5_season" text, "6_season" text ); ### SQL Given the database schema, here is the SQL query that answers `What is 1st Season, when 4 Season is "3 273 440 (17 March 2009)"?`: ```sql
SELECT "wind" FROM "all_time_top_25_outdoors" WHERE "rank"<6 AND "location"='new york city';
## Task Generate a SQL query to answer the following question: `What was the wind at New York City when the rank was smaller than 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "all_time_top_25_outdoors" ( "rank" real, "res" text, "wind" text, "athlete" text, "date" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the wind at New York City when the rank was smaller than 6?`: ```sql
SELECT MAX("rank") FROM "all_time_top_25_outdoors" WHERE "location"='kingston';
## Task Generate a SQL query to answer the following question: `What was the highest rink for Kingston?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "all_time_top_25_outdoors" ( "rank" real, "res" text, "wind" text, "athlete" text, "date" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the highest rink for Kingston?`: ```sql
SELECT AVG("first_elected") FROM "south_carolina" WHERE "district"='south carolina 2';
## Task Generate a SQL query to answer the following question: `What is the average first elected for the district South Carolina 2?` ### 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" real, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average first elected for the district South Carolina 2?`: ```sql
SELECT "first_elected" FROM "south_carolina" WHERE "party"='republican';
## Task Generate a SQL query to answer the following question: `Who was the first elected for the republican party?` ### 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" real, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the first elected for the republican party?`: ```sql
SELECT "party" FROM "south_carolina" WHERE "district"='south carolina 2';
## Task Generate a SQL query to answer the following question: `What party has the South Carolina 2 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" real, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `What party has the South Carolina 2 district?`: ```sql
SELECT "type" FROM "in" WHERE "name"='cassano';
## Task Generate a SQL query to answer the following question: `What is the type for Cassano?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "in" ( "nat" text, "name" text, "moving_from" text, "type" text, "transfer_window" text, "ends" real, "transfer_fee" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the type for Cassano?`: ```sql
SELECT "nat" FROM "in" WHERE "name"='diogo';
## Task Generate a SQL query to answer the following question: `What nationality is Diogo?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "in" ( "nat" text, "name" text, "moving_from" text, "type" text, "transfer_window" text, "ends" real, "transfer_fee" text ); ### SQL Given the database schema, here is the SQL query that answers `What nationality is Diogo?`: ```sql
SELECT "name" FROM "in" WHERE "transfer_window"='winter' AND "moving_from"='roma';
## Task Generate a SQL query to answer the following question: `What is the name of the player with a winter transfer window moving from Roma?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "in" ( "nat" text, "name" text, "moving_from" text, "type" text, "transfer_window" text, "ends" real, "transfer_fee" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the player with a winter transfer window moving from Roma?`: ```sql
SELECT "pressure" FROM "season_effects" WHERE "name"='ken';
## Task Generate a SQL query to answer the following question: `What pressure is Ken?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_effects" ( "name" text, "dates_active" text, "windspeeds" text, "pressure" text, "deaths" text ); ### SQL Given the database schema, here is the SQL query that answers `What pressure is Ken?`: ```sql
SELECT "round" FROM "women" WHERE "loser"='barbara hawcroft';
## Task Generate a SQL query to answer the following question: `In which round was Barbara Hawcroft the loser?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women" ( "year" real, "grand_slam" text, "round" text, "winner" text, "loser" text ); ### SQL Given the database schema, here is the SQL query that answers `In which round was Barbara Hawcroft the loser?`: ```sql
SELECT AVG("year") FROM "women" WHERE "loser"='nerida gregory';
## Task Generate a SQL query to answer the following question: `In which year is Nerida Gregory listed as the loser?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women" ( "year" real, "grand_slam" text, "round" text, "winner" text, "loser" text ); ### SQL Given the database schema, here is the SQL query that answers `In which year is Nerida Gregory listed as the loser?`: ```sql
SELECT SUM("year") FROM "women" WHERE "grand_slam"='australian open' AND "loser"='misaki doi';
## Task Generate a SQL query to answer the following question: `In which year did Misaki Doi lose the Australian Open Grand Slam?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women" ( "year" real, "grand_slam" text, "round" text, "winner" text, "loser" text ); ### SQL Given the database schema, here is the SQL query that answers `In which year did Misaki Doi lose the Australian Open Grand Slam?`: ```sql
SELECT AVG("polish_cup") FROM "top_scorers" WHERE "puchat_ligi">0;
## Task Generate a SQL query to answer the following question: `Which Polish Cup has a Puchat Ligi larger than 0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "player" text, "position" text, "ekstraklasa" real, "polish_cup" real, "puchat_ligi" real, "uefa_cup" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Polish Cup has a Puchat Ligi larger than 0?`: ```sql
SELECT "player" FROM "top_scorers" WHERE "total"=3 AND "ekstraklasa"<3 AND "uefa_cup"=2;
## Task Generate a SQL query to answer the following question: `Which Player has a Total of 3, and an Ekstraklasa smaller than 3, and a UEFA Cup of 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "player" text, "position" text, "ekstraklasa" real, "polish_cup" real, "puchat_ligi" real, "uefa_cup" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Player has a Total of 3, and an Ekstraklasa smaller than 3, and a UEFA Cup of 2?`: ```sql
SELECT MIN("puchat_ligi") FROM "top_scorers" WHERE "uefa_cup"<2 AND "player"='takesure chinyama';
## Task Generate a SQL query to answer the following question: `Which Puchat Ligi has a UEFA Cup smaller than 2, and a Player of takesure chinyama?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "player" text, "position" text, "ekstraklasa" real, "polish_cup" real, "puchat_ligi" real, "uefa_cup" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Puchat Ligi has a UEFA Cup smaller than 2, and a Player of takesure chinyama?`: ```sql
SELECT SUM("ekstraklasa") FROM "top_scorers" WHERE "total"<3;
## Task Generate a SQL query to answer the following question: `How much Ekstraklasa has a Total smaller than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "player" text, "position" text, "ekstraklasa" real, "polish_cup" real, "puchat_ligi" real, "uefa_cup" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How much Ekstraklasa has a Total smaller than 3?`: ```sql
SELECT SUM("puchat_ligi") FROM "top_scorers" WHERE "total"<5 AND "ekstraklasa">1;
## Task Generate a SQL query to answer the following question: `How much Puchat Ligi has a Total smaller than 5, and an Ekstraklasa larger than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "player" text, "position" text, "ekstraklasa" real, "polish_cup" real, "puchat_ligi" real, "uefa_cup" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How much Puchat Ligi has a Total smaller than 5, and an Ekstraklasa larger than 1?`: ```sql
SELECT "player" FROM "missed_the_cut" WHERE "to_par">11 AND "total"<155;
## Task Generate a SQL query to answer the following question: `Which player has a to par greater than 11, with a total less than 155?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "missed_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" real ); ### SQL Given the database schema, here is the SQL query that answers `Which player has a to par greater than 11, with a total less than 155?`: ```sql
SELECT "country" FROM "missed_the_cut" WHERE "to_par"<13 AND "player"='wayne grady';
## Task Generate a SQL query to answer the following question: `What country has a to par less than 13, with wayne grady as the player?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "missed_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" real ); ### SQL Given the database schema, here is the SQL query that answers `What country has a to par less than 13, with wayne grady as the player?`: ```sql
SELECT MAX("points_1") FROM "third_division_final_table" WHERE "drawn"=5 AND "goal_difference"='+58' AND "lost">4;
## Task Generate a SQL query to answer the following question: `Which Points 1 has Drawn of 5, and a Goal Difference of +58, and a Lost larger than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_division_final_table" ( "position" real, "team" text, "played" real, "drawn" real, "lost" real, "goals_for" real, "goals_against" real, "goal_difference" text, "points_1" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Points 1 has Drawn of 5, and a Goal Difference of +58, and a Lost larger than 4?`: ```sql
SELECT MAX("lost") FROM "third_division_final_table" WHERE "goals_against">92;
## Task Generate a SQL query to answer the following question: `Which Lost has Goals Against larger than 92?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_division_final_table" ( "position" real, "team" text, "played" real, "drawn" real, "lost" real, "goals_for" real, "goals_against" real, "goal_difference" text, "points_1" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Lost has Goals Against larger than 92?`: ```sql
SELECT MAX("points_1") FROM "third_division_final_table" WHERE "team"='atherton collieries' AND "position"<8;
## Task Generate a SQL query to answer the following question: `Which Points 1 has a Team of atherton collieries, and a Position smaller than 8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_division_final_table" ( "position" real, "team" text, "played" real, "drawn" real, "lost" real, "goals_for" real, "goals_against" real, "goal_difference" text, "points_1" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Points 1 has a Team of atherton collieries, and a Position smaller than 8?`: ```sql
SELECT SUM("played") FROM "third_division_final_table" WHERE "position"=7 AND "drawn"<7;
## Task Generate a SQL query to answer the following question: `How much Played has a Position of 7, and a Drawn smaller than 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_division_final_table" ( "position" real, "team" text, "played" real, "drawn" real, "lost" real, "goals_for" real, "goals_against" real, "goal_difference" text, "points_1" real ); ### SQL Given the database schema, here is the SQL query that answers `How much Played has a Position of 7, and a Drawn smaller than 7?`: ```sql
SELECT COUNT("drawn") FROM "third_division_final_table" WHERE "points_1"=51 AND "lost">5;
## Task Generate a SQL query to answer the following question: `How much Drawn has Points 1 of 51, and a Lost larger than 5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_division_final_table" ( "position" real, "team" text, "played" real, "drawn" real, "lost" real, "goals_for" real, "goals_against" real, "goal_difference" text, "points_1" real ); ### SQL Given the database schema, here is the SQL query that answers `How much Drawn has Points 1 of 51, and a Lost larger than 5?`: ```sql
SELECT AVG("introduced") FROM "fleet_history" WHERE "seating"='115';
## Task Generate a SQL query to answer the following question: `When was the aircraft introduced that could seat 115 people?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet_history" ( "aircraft" text, "introduced" real, "retired" text, "seating" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the aircraft introduced that could seat 115 people?`: ```sql
SELECT "retired" FROM "fleet_history" WHERE "notes"='replaced by 737-300s';
## Task Generate a SQL query to answer the following question: `What year was the aircraft retired when it was replaced by 737-300s?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet_history" ( "aircraft" text, "introduced" real, "retired" text, "seating" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `What year was the aircraft retired when it was replaced by 737-300s?`: ```sql
SELECT "aircraft" FROM "fleet_history" WHERE "retired"='—' AND "introduced"=2004;
## Task Generate a SQL query to answer the following question: `What aircraft was introduced in 2004 and has a retired of —?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet_history" ( "aircraft" text, "introduced" real, "retired" text, "seating" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `What aircraft was introduced in 2004 and has a retired of —?`: ```sql
SELECT "aircraft" FROM "fleet_history" WHERE "seating"='148/9';
## Task Generate a SQL query to answer the following question: `Which aircraft has 148/9 seating?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet_history" ( "aircraft" text, "introduced" real, "retired" text, "seating" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `Which aircraft has 148/9 seating?`: ```sql
SELECT "seating" FROM "fleet_history" WHERE "notes"='in service' AND "introduced"=2008;
## Task Generate a SQL query to answer the following question: `How many people can be seated on the aircraft that was introduced in 2008 and has notes of in service?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet_history" ( "aircraft" text, "introduced" real, "retired" text, "seating" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `How many people can be seated on the aircraft that was introduced in 2008 and has notes of in service?`: ```sql
SELECT "nationality" FROM "selections" WHERE "previous_team"='detroit pistons';
## Task Generate a SQL query to answer the following question: `What is the nationality of the player who was previously with the Detroit Pistons?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "selections" ( "player" text, "pos" text, "nationality" text, "previous_team" text, "years_of_nba_experience_a" real, "career_with_the_franchise" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality of the player who was previously with the Detroit Pistons?`: ```sql
SELECT "career_with_the_franchise" FROM "selections" WHERE "years_of_nba_experience_a"<9 AND "pos"='f/c' AND "previous_team"='phoenix suns';
## Task Generate a SQL query to answer the following question: `What is the career with the franchise of the f/c player with fewer than 9 years of NBA experience who previously played for the Phoenix Suns?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "selections" ( "player" text, "pos" text, "nationality" text, "previous_team" text, "years_of_nba_experience_a" real, "career_with_the_franchise" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the career with the franchise of the f/c player with fewer than 9 years of NBA experience who previously played for the Phoenix Suns?`: ```sql
SELECT "tie_no" FROM "fifth_round_proper" WHERE "home_team"='bournemouth';
## Task Generate a SQL query to answer the following question: `What was the tie number when Bournemouth was the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fifth_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the tie number when Bournemouth was the home team?`: ```sql
SELECT "away_team" FROM "fifth_round_proper" WHERE "home_team"='norwich city';
## Task Generate a SQL query to answer the following question: `Who was the away team when the home team was Norwich City?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fifth_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the away team when the home team was Norwich City?`: ```sql
SELECT "date" FROM "fifth_round_proper" WHERE "home_team"='wimbledon';
## Task Generate a SQL query to answer the following question: `On what date was Wimbledon the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fifth_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was Wimbledon the home team?`: ```sql
SELECT "date" FROM "fifth_round_proper" WHERE "away_team"='west ham united';
## Task Generate a SQL query to answer the following question: `On what date was the away team West Ham United?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fifth_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the away team West Ham United?`: ```sql
SELECT "date" FROM "fifth_round_proper" WHERE "away_team"='bournemouth';
## Task Generate a SQL query to answer the following question: `On what date was the away team Bournemouth?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fifth_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the away team Bournemouth?`: ```sql
SELECT "district" FROM "assembly_segments" WHERE "name"='abhayapuri south';
## Task Generate a SQL query to answer the following question: `What district has abhayapuri south as the name?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "assembly_segments" ( "constituency_number" real, "name" text, "reserved_for_sc_st_none" text, "district" text, "electorates_2011" real ); ### SQL Given the database schema, here is the SQL query that answers `What district has abhayapuri south as the name?`: ```sql
SELECT "bronze" FROM "performances_by_nation" WHERE "gold">1 AND "silver"<3 AND "rank"<5;
## Task Generate a SQL query to answer the following question: `Which Bronze has a Gold larger than 1, and a Silver smaller than 3, and a Rank smaller than 5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_by_nation" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Bronze has a Gold larger than 1, and a Silver smaller than 3, and a Rank smaller than 5?`: ```sql
SELECT MAX("rank") FROM "performances_by_nation" WHERE "gold">1 AND "bronze"=4 AND "silver"<1;
## Task Generate a SQL query to answer the following question: `Which Rank has a Gold larger than 1, and a Bronze of 4, and a Silver smaller than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_by_nation" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Rank has a Gold larger than 1, and a Bronze of 4, and a Silver smaller than 1?`: ```sql
SELECT MIN("rank") FROM "performances_by_nation" WHERE "gold"=3 AND "bronze"=4 AND "total">8;
## Task Generate a SQL query to answer the following question: `Which Rank has a Gold of 3, and a Bronze of 4, and a Total larger than 8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_by_nation" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Rank has a Gold of 3, and a Bronze of 4, and a Total larger than 8?`: ```sql
SELECT SUM("total") FROM "performances_by_nation" WHERE "rank"<10 AND "silver">3 AND "gold">3;
## Task Generate a SQL query to answer the following question: `How much Total has a Rank smaller than 10, and a Silver larger than 3, and a Gold larger than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_by_nation" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How much Total has a Rank smaller than 10, and a Silver larger than 3, and a Gold larger than 3?`: ```sql
SELECT MAX("total") FROM "performances_by_nation" WHERE "rank"=9 AND "silver"<2;
## Task Generate a SQL query to answer the following question: `Which Total has a Rank of 9, and a Silver smaller than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_by_nation" ( "rank" real, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Total has a Rank of 9, and a Silver smaller than 2?`: ```sql
SELECT "event" FROM "medalists" WHERE "name"='xu zhilin';
## Task Generate a SQL query to answer the following question: `What event had Xu Zhilin competing?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medalists" ( "medal" text, "name" text, "sport" text, "event" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What event had Xu Zhilin competing?`: ```sql
SELECT "sport" FROM "medalists" WHERE "name"='ma yuxi';
## Task Generate a SQL query to answer the following question: `What sport has Ma Yuxi in it?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medalists" ( "medal" text, "name" text, "sport" text, "event" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What sport has Ma Yuxi in it?`: ```sql
SELECT COUNT("year") FROM "table_showing_prize_winners_from_the_cle" WHERE "first"='antonio pompa-baldi italy';
## Task Generate a SQL query to answer the following question: `How many years is Antonio Pompa-Baldi Italy first?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table_showing_prize_winners_from_the_cle" ( "year" real, "first" text, "second" text, "third" text, "fourth" text ); ### SQL Given the database schema, here is the SQL query that answers `How many years is Antonio Pompa-Baldi Italy first?`: ```sql
SELECT "fourth" FROM "table_showing_prize_winners_from_the_cle" WHERE "second"='anders martinson usa';
## Task Generate a SQL query to answer the following question: `Who is fourth when Anders Martinson USA is second?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table_showing_prize_winners_from_the_cle" ( "year" real, "first" text, "second" text, "third" text, "fourth" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is fourth when Anders Martinson USA is second?`: ```sql
SELECT SUM("wins") FROM "league_standings" WHERE "club"='abuls smiltene' AND "goals_for"<18;
## Task Generate a SQL query to answer the following question: `Can you tell me the sum of Wins that has the Club of abuls smiltene, and the Goals smaller than 18?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_standings" ( "position" real, "club" text, "played" real, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "points" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the sum of Wins that has the Club of abuls smiltene, and the Goals smaller than 18?`: ```sql
SELECT AVG("wins") FROM "league_standings" WHERE "goal_difference">-24 AND "draws">7;
## Task Generate a SQL query to answer the following question: `Can you tell me the average Wins that has the Goal Difference larger than -24, and the Draws larger than 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_standings" ( "position" real, "club" text, "played" real, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "points" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the average Wins that has the Goal Difference larger than -24, and the Draws larger than 7?`: ```sql
SELECT MAX("draws") FROM "league_standings" WHERE "goal_difference"<64 AND "played">30;
## Task Generate a SQL query to answer the following question: `Can you tell me the highest Draws that has the Goal Difference smaller than 64, and the Played larger than 30?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_standings" ( "position" real, "club" text, "played" real, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "points" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the highest Draws that has the Goal Difference smaller than 64, and the Played larger than 30?`: ```sql
SELECT MAX("points") FROM "league_standings" WHERE "played"<30;
## Task Generate a SQL query to answer the following question: `Can you tell me the highest Points that has the Played smaller than 30?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_standings" ( "position" real, "club" text, "played" real, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "points" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the highest Points that has the Played smaller than 30?`: ```sql
SELECT AVG("rank") FROM "medal_count" WHERE "bronze"<1 AND "silver">1;
## Task Generate a SQL query to answer the following question: `What rank was the country with no bronze but at least 1 silver medals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_count" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What rank was the country with no bronze but at least 1 silver medals?`: ```sql
SELECT MIN("gold") FROM "medal_count" WHERE "bronze"=1 AND "total"=3 AND "rank">7;
## Task Generate a SQL query to answer the following question: `What is the smallest number of gold medals a country with 1 bronze, and a total of 3 medals which is lower than rank 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_count" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest number of gold medals a country with 1 bronze, and a total of 3 medals which is lower than rank 7?`: ```sql
SELECT MIN("gold") FROM "medal_count" WHERE "total"=7;
## Task Generate a SQL query to answer the following question: `What is the smallest number of gold medals a country with 7 medals has?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_count" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest number of gold medals a country with 7 medals has?`: ```sql
SELECT "host_city" FROM "venues" WHERE "games"='vii';
## Task Generate a SQL query to answer the following question: `Can you tell me the Host City that has the Games of vii?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "venues" ( "games" text, "year" real, "host_city" text, "province" text, "dates" text ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the Host City that has the Games of vii?`: ```sql
SELECT "nominated_work" FROM "awards_and_nominations" WHERE "year">2006 AND "award"='drama desk award' AND "category"='outstanding featured actor in a musical';
## Task Generate a SQL query to answer the following question: `What was the nominated work after 2006, that was awarded the Drama Desk award and the Outstanding featured actor in a musical?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "awards_and_nominations" ( "year" real, "award" text, "category" text, "nominated_work" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the nominated work after 2006, that was awarded the Drama Desk award and the Outstanding featured actor in a musical?`: ```sql
SELECT COUNT("year") FROM "awards_and_nominations" WHERE "category"='outstanding featured actor in a musical' AND "nominated_work"='evita';
## Task Generate a SQL query to answer the following question: `What year was Evita nominated for outstanding featured actor in a musical?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "awards_and_nominations" ( "year" real, "award" text, "category" text, "nominated_work" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What year was Evita nominated for outstanding featured actor in a musical?`: ```sql
SELECT "nominated_work" FROM "awards_and_nominations" WHERE "result"='nominated' AND "award"='drama league award' AND "year"<2007;
## Task Generate a SQL query to answer the following question: `What was the nominated work, nominated for the drama league award before 2007?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "awards_and_nominations" ( "year" real, "award" text, "category" text, "nominated_work" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the nominated work, nominated for the drama league award before 2007?`: ```sql
SELECT "pole_position" FROM "race_calendar_and_winners" WHERE "date"='7 august';
## Task Generate a SQL query to answer the following question: `Who had the pole position on 7 August?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Who had the pole position on 7 August?`: ```sql
SELECT "winning_team" FROM "race_calendar_and_winners" WHERE "circuit"='zandvoort';
## Task Generate a SQL query to answer the following question: `Who was the winning team at Zandvoort?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar_and_winners" ( "round" real, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the winning team at Zandvoort?`: ```sql
SELECT MIN("losses") FROM "2010_ladder" WHERE "wins"<6 AND "south_west_dfl"='sandford';
## Task Generate a SQL query to answer the following question: `Which Losses have Wins smaller than 6, and a South West DFL of sandford?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2010_ladder" ( "south_west_dfl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Losses have Wins smaller than 6, and a South West DFL of sandford?`: ```sql
SELECT SUM("against") FROM "2010_ladder" WHERE "draws"=2 AND "losses"<4;
## Task Generate a SQL query to answer the following question: `How much Against has Draws of 2, and Losses smaller than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2010_ladder" ( "south_west_dfl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `How much Against has Draws of 2, and Losses smaller than 4?`: ```sql
SELECT COUNT("losses") FROM "2010_ladder" WHERE "south_west_dfl"='coleraine' AND "against"<891;
## Task Generate a SQL query to answer the following question: `How many Losses have South West DFL of coleraine, and an Against smaller than 891?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2010_ladder" ( "south_west_dfl" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `How many Losses have South West DFL of coleraine, and an Against smaller than 891?`: ```sql
SELECT MIN("played") FROM "group_i" WHERE "goals_for"=47 AND "wins"<14;
## Task Generate a SQL query to answer the following question: `What is the lowest played number when goals for is 47, and wins is smaller than 14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_i" ( "position" real, "club" text, "played" real, "points" real, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest played number when goals for is 47, and wins is smaller than 14?`: ```sql
SELECT "club" FROM "group_i" WHERE "wins"=13 AND "goals_against"<48 AND "position"=4;
## Task Generate a SQL query to answer the following question: `What Club has 13 wins, goals against less than 48, and a position of 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_i" ( "position" real, "club" text, "played" real, "points" real, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `What Club has 13 wins, goals against less than 48, and a position of 4?`: ```sql
SELECT MIN("position") FROM "group_i" WHERE "goals_against"=59 AND "goals_for"<24;
## Task Generate a SQL query to answer the following question: `What is the lowest position number when goals against was 59, and a goals for is smaller than 24?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_i" ( "position" real, "club" text, "played" real, "points" real, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest position number when goals against was 59, and a goals for is smaller than 24?`: ```sql
SELECT MAX("goals_against") FROM "group_i" WHERE "points">31 AND "goal_difference"<9 AND "wins"=13 AND "draws">6;
## Task Generate a SQL query to answer the following question: `What is the highest goals against when points are larger than 31, the goal difference is smaller than 9, wins are 13, and draws are larger than 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_i" ( "position" real, "club" text, "played" real, "points" real, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest goals against when points are larger than 31, the goal difference is smaller than 9, wins are 13, and draws are larger than 6?`: ```sql
SELECT MIN("played") FROM "group_i" WHERE "points">32 AND "wins">18;
## Task Generate a SQL query to answer the following question: `What is the lowest played number when points are larger than 32, and a wins are larger than 18?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "group_i" ( "position" real, "club" text, "played" real, "points" real, "wins" real, "draws" real, "losses" real, "goals_for" real, "goals_against" real, "goal_difference" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest played number when points are larger than 32, and a wins are larger than 18?`: ```sql
SELECT MAX("against") FROM "2002" WHERE "status"='six nations' AND "date"='02/03/2002';
## Task Generate a SQL query to answer the following question: `Can you tell me the highest Against that has the Status of six nations, and the Date of 02/03/2002?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2002" ( "opposing_teams" text, "against" real, "date" text, "venue" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the highest Against that has the Status of six nations, and the Date of 02/03/2002?`: ```sql
SELECT AVG("against") FROM "2002" WHERE "date"='23/03/2002';
## Task Generate a SQL query to answer the following question: `Can you tell me the average Against thaylt has the Date of 23/03/2002?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2002" ( "opposing_teams" text, "against" real, "date" text, "venue" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Can you tell me the average Against thaylt has the Date of 23/03/2002?`: ```sql
SELECT "population" FROM "subdivisions" WHERE "area"='11';
## Task Generate a SQL query to answer the following question: `What is the population of area of 11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "subdivisions" ( "english_name" text, "simplified" text, "traditional" text, "pinyin" text, "area" text, "population" text, "density" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the population of area of 11?`: ```sql
SELECT "traditional" FROM "subdivisions" WHERE "population"='44,803';
## Task Generate a SQL query to answer the following question: `What shows for traditional when the population was 44,803?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "subdivisions" ( "english_name" text, "simplified" text, "traditional" text, "pinyin" text, "area" text, "population" text, "density" text ); ### SQL Given the database schema, here is the SQL query that answers `What shows for traditional when the population was 44,803?`: ```sql
SELECT "population" FROM "subdivisions" WHERE "area"='4,575';
## Task Generate a SQL query to answer the following question: `What is the population when the area is 4,575?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "subdivisions" ( "english_name" text, "simplified" text, "traditional" text, "pinyin" text, "area" text, "population" text, "density" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the population when the area is 4,575?`: ```sql
SELECT "simplified" FROM "subdivisions" WHERE "density"='52';
## Task Generate a SQL query to answer the following question: `What shows for simplified when the density is 52?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "subdivisions" ( "english_name" text, "simplified" text, "traditional" text, "pinyin" text, "area" text, "population" text, "density" text ); ### SQL Given the database schema, here is the SQL query that answers `What shows for simplified when the density is 52?`: ```sql