output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "award" FROM "other_awards" WHERE "year"<2004 AND "episode"='—';
## Task Generate a SQL query to answer the following question: `What award has a year earlier than 2004 and the episode shows —?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "other_awards" ( "year" real, "award" text, "nominee" text, "episode" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What award has a year earlier than 2004 and the episode shows —?`: ```sql
SELECT "award" FROM "other_awards" WHERE "year">2004 AND "episode"='\"the road to damuscus\"';
## Task Generate a SQL query to answer the following question: `What award has a year later than 2004, and the episode was "The Road to Damuscus"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "other_awards" ( "year" real, "award" text, "nominee" text, "episode" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What award has a year later than 2004, and the episode was "The Road to Damuscus"?`: ```sql
SELECT AVG("year") FROM "other_awards" WHERE "nominee"='—' AND "result"='nominated';
## Task Generate a SQL query to answer the following question: `What year has a Nominee of —, and a Result of nominated?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "other_awards" ( "year" real, "award" text, "nominee" text, "episode" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What year has a Nominee of —, and a Result of nominated?`: ```sql
SELECT "country" FROM "references" WHERE "play"='electra';
## Task Generate a SQL query to answer the following question: `What is the Country of the Play Electra?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "references" ( "play" text, "author" text, "company" text, "base" text, "country" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Country of the Play Electra?`: ```sql
SELECT "play" FROM "references" WHERE "base"='athens' AND "company"='dance theatre roes';
## Task Generate a SQL query to answer the following question: `What is the Athens Base play with Dance Theatre Roes Company?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "references" ( "play" text, "author" text, "company" text, "base" text, "country" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Athens Base play with Dance Theatre Roes Company?`: ```sql
SELECT "author" FROM "references" WHERE "play"='electra';
## Task Generate a SQL query to answer the following question: `Who is the author of the Play Electra?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "references" ( "play" text, "author" text, "company" text, "base" text, "country" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the author of the Play Electra?`: ```sql
SELECT "country" FROM "references" WHERE "author"='aristophanes';
## Task Generate a SQL query to answer the following question: `Waht is the Country of the play by Author Aristophanes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "references" ( "play" text, "author" text, "company" text, "base" text, "country" text ); ### SQL Given the database schema, here is the SQL query that answers `Waht is the Country of the play by Author Aristophanes?`: ```sql
SELECT "country" FROM "references" WHERE "base"='mecklenburg' AND "play"='the libation bearers';
## Task Generate a SQL query to answer the following question: `What Country has the Play The Libation Bearers a Base of Mecklenburg?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "references" ( "play" text, "author" text, "company" text, "base" text, "country" text ); ### SQL Given the database schema, here is the SQL query that answers `What Country has the Play The Libation Bearers a Base of Mecklenburg?`: ```sql
SELECT "series" FROM "1957" WHERE "title"='boyhood daze';
## Task Generate a SQL query to answer the following question: `Which series had a title of Boyhood Daze?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1957" ( "title" text, "series" text, "director" text, "release_date" text, "reissue" text ); ### SQL Given the database schema, here is the SQL query that answers `Which series had a title of Boyhood Daze?`: ```sql
SELECT "release_date" FROM "1957" WHERE "title"='rabbit romeo';
## Task Generate a SQL query to answer the following question: `What was the release date of Rabbit Romeo?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1957" ( "title" text, "series" text, "director" text, "release_date" text, "reissue" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the release date of Rabbit Romeo?`: ```sql
SELECT "release_date" FROM "1957" WHERE "title"='three little bops';
## Task Generate a SQL query to answer the following question: `What was the release date of Three Little Bops?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1957" ( "title" text, "series" text, "director" text, "release_date" text, "reissue" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the release date of Three Little Bops?`: ```sql
SELECT MIN("average") FROM "lpga_tour_career_summary" WHERE "year">1998 AND "earnings">'583,796' AND "lpga_wins"=1 AND "money_list_rank">10;
## Task Generate a SQL query to answer the following question: `When earnings ($) is more than 583,796 after 1998 with 1 LPGA wins and greater than 10 Money list rank, what is the smallest average?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lpga_tour_career_summary" ( "year" real, "lpga_wins" real, "earnings" real, "money_list_rank" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `When earnings ($) is more than 583,796 after 1998 with 1 LPGA wins and greater than 10 Money list rank, what is the smallest average?`: ```sql
SELECT MIN("money_list_rank") FROM "lpga_tour_career_summary" WHERE "lpga_wins"<2 AND "year"=2005 AND "earnings"<'615,499';
## Task Generate a SQL query to answer the following question: `In 2005 the earnings is less than 615,499 with less than 2 LPGA wins and what smallest Money list rank?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lpga_tour_career_summary" ( "year" real, "lpga_wins" real, "earnings" real, "money_list_rank" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `In 2005 the earnings is less than 615,499 with less than 2 LPGA wins and what smallest Money list rank?`: ```sql
SELECT COUNT("money_list_rank") FROM "lpga_tour_career_summary" WHERE "average"<73.27 AND "earnings"='583,796' AND "year">1999;
## Task Generate a SQL query to answer the following question: `What is the sum of money list rank after 1999 when the average is less than 73.27 and earnings is 583,796?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lpga_tour_career_summary" ( "year" real, "lpga_wins" real, "earnings" real, "money_list_rank" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of money list rank after 1999 when the average is less than 73.27 and earnings is 583,796?`: ```sql
SELECT "team_name" FROM "membership" WHERE "school"='hammond bishop noll';
## Task Generate a SQL query to answer the following question: `What is the team name from Hammond Bishop Noll?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "membership" ( "school" text, "city" text, "team_name" text, "enrollment_08_09" real, "ihsaa_class" text, "county" text, "year_joined" text, "previous_counference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the team name from Hammond Bishop Noll?`: ```sql
SELECT "city" FROM "membership" WHERE "previous_counference"='lake' AND "ihsaa_class"='3a';
## Task Generate a SQL query to answer the following question: `What city has a team in IHSAA class 3a, and previous conference of lake?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "membership" ( "school" text, "city" text, "team_name" text, "enrollment_08_09" real, "ihsaa_class" text, "county" text, "year_joined" text, "previous_counference" text ); ### SQL Given the database schema, here is the SQL query that answers `What city has a team in IHSAA class 3a, and previous conference of lake?`: ```sql
SELECT AVG("enrollment_08_09") FROM "membership" WHERE "previous_counference"='lake' AND "ihsaa_class"='3a';
## Task Generate a SQL query to answer the following question: `What is the average enrollment 08=09, for the team that had a previous conference of lake and IHSAA class of 3A?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "membership" ( "school" text, "city" text, "team_name" text, "enrollment_08_09" real, "ihsaa_class" text, "county" text, "year_joined" text, "previous_counference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average enrollment 08=09, for the team that had a previous conference of lake and IHSAA class of 3A?`: ```sql
SELECT "date" FROM "champions_tour_wins_25" WHERE "tournament"='kroger classic';
## Task Generate a SQL query to answer the following question: `What is the Date of the Kroger Classic Tournament?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "champions_tour_wins_25" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Date of the Kroger Classic Tournament?`: ```sql
SELECT "date" FROM "champions_tour_wins_25" WHERE "tournament"='ameritech senior open';
## Task Generate a SQL query to answer the following question: `What is the Date of the Ameritech Senior Open?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "champions_tour_wins_25" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Date of the Ameritech Senior Open?`: ```sql
SELECT "tournament" FROM "champions_tour_wins_25" WHERE "winning_score"='−16 (66-64-67=197)';
## Task Generate a SQL query to answer the following question: `What Tournament has a Winning score of −16 (66-64-67=197)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "champions_tour_wins_25" ( "date" text, "tournament" text, "winning_score" text, "margin_of_victory" text, "runner_s_up" text ); ### SQL Given the database schema, here is the SQL query that answers `What Tournament has a Winning score of −16 (66-64-67=197)?`: ```sql
SELECT "japanese_on_yomi" FROM "table" WHERE "cantonese_jyutping"='jyut6';
## Task Generate a SQL query to answer the following question: `What Japanese On'yomi has Catonese Jyutping of jyut6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table" ( "celestial_stem" text, "chinese_mandarin_pinyin" text, "cantonese_jyutping" text, "wuu_wuupin" text, "japanese_kunyomi" text, "japanese_on_yomi" text, "korean_rr" text, "manchu_m_llendorff" text, "vietnamese" text, "yin_and_yang" text, "wu_xing" text, "wu_xing_correlations" text ); ### SQL Given the database schema, here is the SQL query that answers `What Japanese On'yomi has Catonese Jyutping of jyut6?`: ```sql
SELECT "japanese_on_yomi" FROM "table" WHERE "vietnamese"='mậu';
## Task Generate a SQL query to answer the following question: `What Japanese On'yomi has Vietnamese of Mậu?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table" ( "celestial_stem" text, "chinese_mandarin_pinyin" text, "cantonese_jyutping" text, "wuu_wuupin" text, "japanese_kunyomi" text, "japanese_on_yomi" text, "korean_rr" text, "manchu_m_llendorff" text, "vietnamese" text, "yin_and_yang" text, "wu_xing" text, "wu_xing_correlations" text ); ### SQL Given the database schema, here is the SQL query that answers `What Japanese On'yomi has Vietnamese of Mậu?`: ```sql
SELECT "wu_xing" FROM "table" WHERE "korean_rr"='임 (im)';
## Task Generate a SQL query to answer the following question: `What is Wu Xing (五行) with Korean (RR) of 임 (im)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table" ( "celestial_stem" text, "chinese_mandarin_pinyin" text, "cantonese_jyutping" text, "wuu_wuupin" text, "japanese_kunyomi" text, "japanese_on_yomi" text, "korean_rr" text, "manchu_m_llendorff" text, "vietnamese" text, "yin_and_yang" text, "wu_xing" text, "wu_xing_correlations" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Wu Xing (五行) with Korean (RR) of 임 (im)?`: ```sql
SELECT "manchu_m_llendorff" FROM "table" WHERE "wu_xing_correlations"='南 south' AND "wuu_wuupin"='ting44';
## Task Generate a SQL query to answer the following question: `What's Manchu (Möllendorff) with the Wi Xing Correltation of 南 South, along with Wuu Wuupin of ting44?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table" ( "celestial_stem" text, "chinese_mandarin_pinyin" text, "cantonese_jyutping" text, "wuu_wuupin" text, "japanese_kunyomi" text, "japanese_on_yomi" text, "korean_rr" text, "manchu_m_llendorff" text, "vietnamese" text, "yin_and_yang" text, "wu_xing" text, "wu_xing_correlations" text ); ### SQL Given the database schema, here is the SQL query that answers `What's Manchu (Möllendorff) with the Wi Xing Correltation of 南 South, along with Wuu Wuupin of ting44?`: ```sql
SELECT "japanese_title" FROM "2005_spring_season" WHERE "tv_station"='ntv';
## Task Generate a SQL query to answer the following question: `Which Japanese Title has a TV Station of ntv?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2005_spring_season" ( "japanese_title" text, "romaji_title" text, "tv_station" text, "theme_song_s" text, "episodes" real, "average_ratings" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Japanese Title has a TV Station of ntv?`: ```sql
SELECT "tv_station" FROM "2005_spring_season" WHERE "romaji_title"='kegareta shita';
## Task Generate a SQL query to answer the following question: `Which TV Station has a Romaji Title of kegareta shita?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2005_spring_season" ( "japanese_title" text, "romaji_title" text, "tv_station" text, "theme_song_s" text, "episodes" real, "average_ratings" text ); ### SQL Given the database schema, here is the SQL query that answers `Which TV Station has a Romaji Title of kegareta shita?`: ```sql
SELECT "theme_song_s" FROM "2005_spring_season" WHERE "japanese_title"='恋におちたら~僕の成功の秘密~';
## Task Generate a SQL query to answer the following question: `Which Theme Song(s) has a Japanese Title of 恋におちたら~僕の成功の秘密~?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2005_spring_season" ( "japanese_title" text, "romaji_title" text, "tv_station" text, "theme_song_s" text, "episodes" real, "average_ratings" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Theme Song(s) has a Japanese Title of 恋におちたら~僕の成功の秘密~?`: ```sql
SELECT MIN("number_of_electorates_2009") FROM "assembly_segments" WHERE "name"='churai';
## Task Generate a SQL query to answer the following question: `Churai has what as the fewest number of electorates?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "assembly_segments" ( "constituency_number" text, "name" text, "reserved_for_sc_st_none" text, "district" text, "number_of_electorates_2009" real ); ### SQL Given the database schema, here is the SQL query that answers `Churai has what as the fewest number of electorates?`: ```sql
SELECT "title" FROM "1938" WHERE "release_date"='1938-12-17' AND "production_num"='8610';
## Task Generate a SQL query to answer the following question: `what is the title when the release date is 1938-12-17 and the production number is 8610?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1938" ( "title" text, "series" text, "director" text, "production_num" text, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the title when the release date is 1938-12-17 and the production number is 8610?`: ```sql
SELECT "outcome" FROM "singles_0_7" WHERE "date"='july 8, 2007';
## Task Generate a SQL query to answer the following question: `The match played July 8, 2007 had what outcome?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_0_7" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `The match played July 8, 2007 had what outcome?`: ```sql
SELECT "surface" FROM "singles_0_7" WHERE "opponent_in_the_final"='evie dominikovic';
## Task Generate a SQL query to answer the following question: `The final match played against Evie Dominikovic was played on what surface?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_0_7" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `The final match played against Evie Dominikovic was played on what surface?`: ```sql
SELECT "tournament" FROM "singles_0_7" WHERE "opponent_in_the_final"='olga blahotová';
## Task Generate a SQL query to answer the following question: `Olga Blahotová was the opponent in the final at what tournament?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_0_7" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Olga Blahotová was the opponent in the final at what tournament?`: ```sql
SELECT "score" FROM "singles_0_7" WHERE "opponent_in_the_final"='ashley harkleroad';
## Task Generate a SQL query to answer the following question: `In the final against Ashley Harkleroad what was the score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_0_7" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `In the final against Ashley Harkleroad what was the score?`: ```sql
SELECT "name" FROM "volleyball_at_the_2008_summer_olympics_w" WHERE "2008_club"='liaoning';
## Task Generate a SQL query to answer the following question: `What is the name for the 2008 club Liaoning?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "volleyball_at_the_2008_summer_olympics_w" ( "name" text, "height" text, "weight" text, "spike" text, "2008_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name for the 2008 club Liaoning?`: ```sql
SELECT "height" FROM "volleyball_at_the_2008_summer_olympics_w" WHERE "2008_club"='tianjin';
## Task Generate a SQL query to answer the following question: `What is the height for the Tianjin members in 2008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "volleyball_at_the_2008_summer_olympics_w" ( "name" text, "height" text, "weight" text, "spike" text, "2008_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the height for the Tianjin members in 2008?`: ```sql
SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='takaichi hirayama';
## Task Generate a SQL query to answer the following question: `At what time did the opponent Takaichi Hirayama have an event?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `At what time did the opponent Takaichi Hirayama have an event?`: ```sql
SELECT "round" FROM "mixed_martial_arts_record" WHERE "opponent"='gabriel veiga';
## Task Generate a SQL query to answer the following question: `In which round was Gabriel Veiga the opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `In which round was Gabriel Veiga the opponent?`: ```sql
SELECT "method" FROM "mixed_martial_arts_record" WHERE "round"='3' AND "res"='loss' AND "event"='juiz de fora - fight 1';
## Task Generate a SQL query to answer the following question: `Which method had a 3 rounds, result in a loss and the Juiz de Fora - fight 1 event?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Which method had a 3 rounds, result in a loss and the Juiz de Fora - fight 1 event?`: ```sql
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "record"='4-2';
## Task Generate a SQL query to answer the following question: `Which opponent has a record of 4-2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" text, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Which opponent has a record of 4-2?`: ```sql
SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "number_of_electorates_2009">'161,219' AND "constituency_number"='160';
## Task Generate a SQL query to answer the following question: `What is the Reserved for when there are more than 161,219 electorates in 2009 and a constituency of 160?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "assembly_segments" ( "constituency_number" text, "name" text, "reserved_for_sc_st_none" text, "district" text, "number_of_electorates_2009" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the Reserved for when there are more than 161,219 electorates in 2009 and a constituency of 160?`: ```sql
SELECT "name" FROM "assembly_segments" WHERE "number_of_electorates_2009">'161,219' AND "constituency_number"='165';
## Task Generate a SQL query to answer the following question: `What is the name when there are more than 161,219 electorates in 2009 and a constituency of 165?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "assembly_segments" ( "constituency_number" text, "name" text, "reserved_for_sc_st_none" text, "district" text, "number_of_electorates_2009" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the name when there are more than 161,219 electorates in 2009 and a constituency of 165?`: ```sql
SELECT "country" FROM "quarterfinal_3" WHERE "athlete"='zhang xiuyun';
## Task Generate a SQL query to answer the following question: `what is the country for zhang xiuyun?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "quarterfinal_3" ( "rank" real, "athlete" text, "country" text, "time" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the country for zhang xiuyun?`: ```sql
SELECT "country" FROM "quarterfinal_3" WHERE "athlete"='fabiana beltrame';
## Task Generate a SQL query to answer the following question: `what is the country for fabiana beltrame?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "quarterfinal_3" ( "rank" real, "athlete" text, "country" text, "time" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the country for fabiana beltrame?`: ```sql
SELECT "notes" FROM "quarterfinal_3" WHERE "time"='7:58.71';
## Task Generate a SQL query to answer the following question: `what is the notes when the time is 7:58.71?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "quarterfinal_3" ( "rank" real, "athlete" text, "country" text, "time" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the notes when the time is 7:58.71?`: ```sql
SELECT MAX("rank") FROM "quarterfinal_3" WHERE "time"='7:52.65';
## Task Generate a SQL query to answer the following question: `what is the highest rank when the time is 7:52.65?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "quarterfinal_3" ( "rank" real, "athlete" text, "country" text, "time" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the highest rank when the time is 7:52.65?`: ```sql
SELECT "country" FROM "quarterfinal_3" WHERE "notes"='sa/b' AND "rank">1 AND "athlete"='zhang xiuyun';
## Task Generate a SQL query to answer the following question: `what is the country when the nots is sa/b, the rank is more than 1 and the athlete is zhang xiuyun?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "quarterfinal_3" ( "rank" real, "athlete" text, "country" text, "time" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the country when the nots is sa/b, the rank is more than 1 and the athlete is zhang xiuyun?`: ```sql
SELECT "athlete" FROM "qualification_round" WHERE "rank"<17 AND "total"='119';
## Task Generate a SQL query to answer the following question: `Who had a rank under 17 with a total of 119?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "qualification_round" ( "rank" real, "athlete" text, "country" text, "day_1" real, "total" text ); ### SQL Given the database schema, here is the SQL query that answers `Who had a rank under 17 with a total of 119?`: ```sql
SELECT "round" FROM "league_cup" WHERE "result"='2-1' AND "venue"='a';
## Task Generate a SQL query to answer the following question: `What round has 2-1 as the result, and A as the venue?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_cup" ( "round" text, "date" text, "opponent" text, "venue" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What round has 2-1 as the result, and A as the venue?`: ```sql
SELECT MAX("time") FROM "semifinal_2" WHERE "nationality"='south africa' AND "lane">3;
## Task Generate a SQL query to answer the following question: `What is the most time for the swimmer from South Africa who was in a lane greater than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the most time for the swimmer from South Africa who was in a lane greater than 3?`: ```sql
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "enrollment"=887;
## Task Generate a SQL query to answer the following question: `Which school has enrollment of 887?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indiana_high_school_athletics_conference" ( "school" text, "location" text, "mascot" text, "enrollment" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); ### SQL Given the database schema, here is the SQL query that answers `Which school has enrollment of 887?`: ```sql
SELECT AVG("round") FROM "nfl_draft" WHERE "pick_num"<236 AND "position"='offensive guard';
## Task Generate a SQL query to answer the following question: `what is the round when the pick # is less than 236 and the position is offensive guard?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "round" real, "pick_num" real, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the round when the pick # is less than 236 and the position is offensive guard?`: ```sql
SELECT "position" FROM "nfl_draft" WHERE "round"=3;
## Task Generate a SQL query to answer the following question: `what is the position in round 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "round" real, "pick_num" real, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the position in round 3?`: ```sql
SELECT "position" FROM "draft_selections" WHERE "pick"=8;
## Task Generate a SQL query to answer the following question: `What is the Position of the Pick 8 Player?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "draft_selections" ( "round" real, "pick" real, "position" text, "nationality" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Position of the Pick 8 Player?`: ```sql
SELECT "high_assists" FROM "regular_season" WHERE "score"='w 71-56';
## Task Generate a SQL query to answer the following question: `Which High assists has a Score of w 71-56?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "game" real, "date" text, "opponent" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Which High assists has a Score of w 71-56?`: ```sql
SELECT "score" FROM "regular_season" WHERE "high_assists"='whalen (5)';
## Task Generate a SQL query to answer the following question: `Which Score has a High assists of whalen (5)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "game" real, "date" text, "opponent" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Score has a High assists of whalen (5)?`: ```sql
SELECT "high_rebounds" FROM "regular_season" WHERE "game"<9 AND "opponent"='detroit';
## Task Generate a SQL query to answer the following question: `Which High rebounds has a Game smaller than 9, and a Opponent of detroit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "game" real, "date" text, "opponent" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Which High rebounds has a Game smaller than 9, and a Opponent of detroit?`: ```sql
SELECT "high_rebounds" FROM "regular_season" WHERE "score"='w 81-69';
## Task Generate a SQL query to answer the following question: `Which High rebounds has a Score of w 81-69?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "game" real, "date" text, "opponent" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Which High rebounds has a Score of w 81-69?`: ```sql
SELECT "surface" FROM "best_5_matches_by_atp_world_tour_com" WHERE "result"='fernando verdasco';
## Task Generate a SQL query to answer the following question: `Which Surface has a Result of fernando verdasco?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "best_5_matches_by_atp_world_tour_com" ( "event" real, "round" text, "surface" text, "winner" text, "opponent" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Surface has a Result of fernando verdasco?`: ```sql
SELECT COUNT("event") FROM "best_5_matches_by_atp_world_tour_com" WHERE "winner"='clay';
## Task Generate a SQL query to answer the following question: `How many events did clay win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "best_5_matches_by_atp_world_tour_com" ( "event" real, "round" text, "surface" text, "winner" text, "opponent" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `How many events did clay win?`: ```sql
SELECT "surface" FROM "best_5_matches_by_atp_world_tour_com" WHERE "opponent"='rafael nadal' AND "event"=2;
## Task Generate a SQL query to answer the following question: `Which Surface has an Opponent of rafael nadal, and an Event of 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "best_5_matches_by_atp_world_tour_com" ( "event" real, "round" text, "surface" text, "winner" text, "opponent" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Surface has an Opponent of rafael nadal, and an Event of 2?`: ```sql
SELECT "opponent" FROM "best_5_matches_by_atp_world_tour_com" WHERE "result"='iván navarro';
## Task Generate a SQL query to answer the following question: `Who is iván navarro's opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "best_5_matches_by_atp_world_tour_com" ( "event" real, "round" text, "surface" text, "winner" text, "opponent" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is iván navarro's opponent?`: ```sql
SELECT MAX("event") FROM "best_5_matches_by_atp_world_tour_com" WHERE "surface"='semifinal' AND "winner"='hard (i)';
## Task Generate a SQL query to answer the following question: `Which Event has a Surface of semifinal, and a Winner of hard (i)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "best_5_matches_by_atp_world_tour_com" ( "event" real, "round" text, "surface" text, "winner" text, "opponent" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Event has a Surface of semifinal, and a Winner of hard (i)?`: ```sql
SELECT "leader_at_the_summit" FROM "appearances_in_tour_de_france_since_1947" WHERE "year"<1956 AND "finish"='carcassonne';
## Task Generate a SQL query to answer the following question: `Who was the leader at the summit earlier than 1956, when Carcassonne shows for finish?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "appearances_in_tour_de_france_since_1947" ( "year" real, "stage" real, "start" text, "finish" text, "leader_at_the_summit" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the leader at the summit earlier than 1956, when Carcassonne shows for finish?`: ```sql
SELECT SUM("year") FROM "appearances_in_tour_de_france_since_1947" WHERE "finish"='toulouse' AND "stage">12;
## Task Generate a SQL query to answer the following question: `What year was finish Toulouse, and stage was larger than 12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "appearances_in_tour_de_france_since_1947" ( "year" real, "stage" real, "start" text, "finish" text, "leader_at_the_summit" text ); ### SQL Given the database schema, here is the SQL query that answers `What year was finish Toulouse, and stage was larger than 12?`: ```sql
SELECT MAX("stage") FROM "appearances_in_tour_de_france_since_1947" WHERE "year">1948 AND "leader_at_the_summit"='group' AND "finish"='bagnères-de-bigorre';
## Task Generate a SQL query to answer the following question: `What is the highest stage number for a year later than 1948, leader at the summit was group, and finish was Bagnères-De-Bigorre?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "appearances_in_tour_de_france_since_1947" ( "year" real, "stage" real, "start" text, "finish" text, "leader_at_the_summit" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest stage number for a year later than 1948, leader at the summit was group, and finish was Bagnères-De-Bigorre?`: ```sql
SELECT "vacator" FROM "senate" WHERE "reason_for_change"='resigned november 10, 1965';
## Task Generate a SQL query to answer the following question: `which Vacator has a Reason for change of resigned november 10, 1965?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successor_s_formal_installation" text ); ### SQL Given the database schema, here is the SQL query that answers `which Vacator has a Reason for change of resigned november 10, 1965?`: ```sql
SELECT "reason_for_change" FROM "senate" WHERE "state_class"='tennessee (2)';
## Task Generate a SQL query to answer the following question: `Which Reason has a State (class) of tennessee (2)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successor_s_formal_installation" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Reason has a State (class) of tennessee (2)?`: ```sql
SELECT "date_of_successor_s_formal_installation" FROM "senate" WHERE "vacator"='ross bass (d)';
## Task Generate a SQL query to answer the following question: `When is it that successor's formal installation has a Vacator of ross bass (d)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successor_s_formal_installation" text ); ### SQL Given the database schema, here is the SQL query that answers `When is it that successor's formal installation has a Vacator of ross bass (d)?`: ```sql
SELECT "state_class" FROM "senate" WHERE "successor"='harry f. byrd, jr. (d)';
## Task Generate a SQL query to answer the following question: `Which State (class) has a Successor of harry f. byrd, jr. (d)? Question` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successor_s_formal_installation" text ); ### SQL Given the database schema, here is the SQL query that answers `Which State (class) has a Successor of harry f. byrd, jr. (d)? Question`: ```sql
SELECT "date_of_successor_s_formal_installation" FROM "senate" WHERE "state_class"='michigan (2)';
## Task Generate a SQL query to answer the following question: `Which date of Date of successor's formal installation has a State (class) of michigan (2)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "senate" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successor_s_formal_installation" text ); ### SQL Given the database schema, here is the SQL query that answers `Which date of Date of successor's formal installation has a State (class) of michigan (2)?`: ```sql
SELECT "country" FROM "surrounding" WHERE "col_m"=1374;
## Task Generate a SQL query to answer the following question: `Which country has a Col (m) of 1374?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "surrounding" ( "peak" text, "country" text, "elevation_m" real, "prominence_m" real, "col_m" real ); ### SQL Given the database schema, here is the SQL query that answers `Which country has a Col (m) of 1374?`: ```sql
SELECT SUM("games") FROM "1970s" WHERE "years_at_club"='1971–1974' AND "debut_year">1971;
## Task Generate a SQL query to answer the following question: `How many Games have Years at club of 1971–1974, and a Debut year larger than 1971?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1970s" ( "debut_year" real, "player" text, "games" real, "goals" real, "years_at_club" text ); ### SQL Given the database schema, here is the SQL query that answers `How many Games have Years at club of 1971–1974, and a Debut year larger than 1971?`: ```sql
SELECT AVG("games") FROM "1970s" WHERE "years_at_club"='1974–1975' AND "goals"=4;
## Task Generate a SQL query to answer the following question: `Which Games have Years at club of 1974–1975, and Goals of 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1970s" ( "debut_year" real, "player" text, "games" real, "goals" real, "years_at_club" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Games have Years at club of 1974–1975, and Goals of 4?`: ```sql
SELECT "years_at_club" FROM "1970s" WHERE "games"<7 AND "goals">2 AND "player"='john frazer';
## Task Generate a SQL query to answer the following question: `Which Years at club have Games smaller than 7, and Goals larger than 2, and a Player of john frazer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1970s" ( "debut_year" real, "player" text, "games" real, "goals" real, "years_at_club" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Years at club have Games smaller than 7, and Goals larger than 2, and a Player of john frazer?`: ```sql
SELECT AVG("games") FROM "1970s" WHERE "years_at_club"='1977' AND "goals"=17 AND "debut_year"<1977;
## Task Generate a SQL query to answer the following question: `Which Games have Years at club of 1977, and Goals of 17, and a Debut year smaller than 1977?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1970s" ( "debut_year" real, "player" text, "games" real, "goals" real, "years_at_club" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Games have Years at club of 1977, and Goals of 17, and a Debut year smaller than 1977?`: ```sql
SELECT MIN("goals") FROM "1970s" WHERE "games"<41 AND "player"='mark amos';
## Task Generate a SQL query to answer the following question: `Which Goals have Games smaller than 41, and a Player of mark amos?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1970s" ( "debut_year" real, "player" text, "games" real, "goals" real, "years_at_club" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Goals have Games smaller than 41, and a Player of mark amos?`: ```sql
SELECT SUM("rank") FROM "round_1" WHERE "name"='melaine walker';
## Task Generate a SQL query to answer the following question: `What is Melaine Walker's Rank?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_1" ( "rank" real, "heat" real, "name" text, "nationality" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Melaine Walker's Rank?`: ```sql
SELECT "name" FROM "round_1" WHERE "heat"=4 AND "rank"<23 AND "result"='55.91';
## Task Generate a SQL query to answer the following question: `What is the Name of the Player with a Rank of 23 or less, Heat of 4 and Result of 55.91?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_1" ( "rank" real, "heat" real, "name" text, "nationality" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Name of the Player with a Rank of 23 or less, Heat of 4 and Result of 55.91?`: ```sql
SELECT "heat" FROM "round_1" WHERE "rank"<18 AND "result"='55.15';
## Task Generate a SQL query to answer the following question: `What is the Heat of the Player with a Rank of 18 or less and Result of 55.15?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_1" ( "rank" real, "heat" real, "name" text, "nationality" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Heat of the Player with a Rank of 18 or less and Result of 55.15?`: ```sql
SELECT "quantity_preserved" FROM "mallet_and_simple_articulated_locomotive" WHERE "fleet_number_s"='3000–3015';
## Task Generate a SQL query to answer the following question: `What is the quantity preserved for fleet number(s) 3000–3015?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mallet_and_simple_articulated_locomotive" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the quantity preserved for fleet number(s) 3000–3015?`: ```sql
SELECT "manufacturer" FROM "mallet_and_simple_articulated_locomotive" WHERE "wheel_arrangement"='4-6-6-4' AND "class"='z-7';
## Task Generate a SQL query to answer the following question: `What manufacturer has a wheel arrangement of 4-6-6-4, and a Class of z-7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mallet_and_simple_articulated_locomotive" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text ); ### SQL Given the database schema, here is the SQL query that answers `What manufacturer has a wheel arrangement of 4-6-6-4, and a Class of z-7?`: ```sql
SELECT "year_made" FROM "mallet_and_simple_articulated_locomotive" WHERE "fleet_number_s"='5000';
## Task Generate a SQL query to answer the following question: `What is the Year for fleet number 5000?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mallet_and_simple_articulated_locomotive" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Year for fleet number 5000?`: ```sql
SELECT "year_made" FROM "mallet_and_simple_articulated_locomotive" WHERE "quantity_made"='4';
## Task Generate a SQL query to answer the following question: `What year made has a Quantity made of 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mallet_and_simple_articulated_locomotive" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text ); ### SQL Given the database schema, here is the SQL query that answers `What year made has a Quantity made of 4?`: ```sql
SELECT "quantity_preserved" FROM "mallet_and_simple_articulated_locomotive" WHERE "serial_numbers"='mallet and simple articulated locomotives';
## Task Generate a SQL query to answer the following question: `What is the quantity preserved for the serial number of mallet and simple articulated locomotives?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mallet_and_simple_articulated_locomotive" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the quantity preserved for the serial number of mallet and simple articulated locomotives?`: ```sql
SELECT "silver" FROM "world_championships_total_medals" WHERE "gold">1 AND "total"<97 AND "nation"='estonia';
## Task Generate a SQL query to answer the following question: `How many silver medals did Estonia, which won more than 1 gold and less than 97 medals total, win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championships_total_medals" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many silver medals did Estonia, which won more than 1 gold and less than 97 medals total, win?`: ```sql
SELECT MIN("gold") FROM "world_championships_total_medals" WHERE "nation"='denmark';
## Task Generate a SQL query to answer the following question: `How many gold medals did Denmark win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championships_total_medals" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many gold medals did Denmark win?`: ```sql
SELECT COUNT("gold") FROM "world_championships_total_medals" WHERE "bronze">27 AND "total"<305;
## Task Generate a SQL query to answer the following question: `What is the total number of gold medals won among nations that won more than 27 bronze and less than 305 medals total?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championships_total_medals" ( "rank" text, "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 total number of gold medals won among nations that won more than 27 bronze and less than 305 medals total?`: ```sql
SELECT COUNT("gold") FROM "world_championships_total_medals" WHERE "silver">4 AND "bronze">14 AND "total"=97;
## Task Generate a SQL query to answer the following question: `How many gold medals were won by the nation that won over 4 silver medals, over 14 bronze, and 97 medals total?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championships_total_medals" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many gold medals were won by the nation that won over 4 silver medals, over 14 bronze, and 97 medals total?`: ```sql
SELECT MAX("championship") FROM "goalscorers" WHERE "league_cup"=1 AND "total"='17';
## Task Generate a SQL query to answer the following question: `What is the highest championship that has 1 as the league cup, and 17 as the total?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "goalscorers" ( "name" text, "championship" real, "league_cup" real, "fa_cup" real, "total" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest championship that has 1 as the league cup, and 17 as the total?`: ```sql
SELECT COUNT("league_cup") FROM "goalscorers" WHERE "fa_cup"<0;
## Task Generate a SQL query to answer the following question: `How many league cups have an FA Cup less than 0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "goalscorers" ( "name" text, "championship" real, "league_cup" real, "fa_cup" real, "total" text ); ### SQL Given the database schema, here is the SQL query that answers `How many league cups have an FA Cup less than 0?`: ```sql
SELECT "date" FROM "ships_attacked" WHERE "tonnage">'5,008' AND "name_of_ship"='brookwood';
## Task Generate a SQL query to answer the following question: `On what date was the Brookwood, which weighed over 5,008 tons, attacked?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ships_attacked" ( "date" text, "name_of_ship" text, "flag" text, "tonnage" real, "fate" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the Brookwood, which weighed over 5,008 tons, attacked?`: ```sql
SELECT AVG("rank") FROM "medal_table" WHERE "silver">1 AND "gold"<11 AND "bronze"=2 AND "nation"='west germany (frg)';
## Task Generate a SQL query to answer the following question: `What is the average rank of west germany (frg), which has more than 1 silver, less than 11 gold, and 2 bronze medals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the average rank of west germany (frg), which has more than 1 silver, less than 11 gold, and 2 bronze medals?`: ```sql
SELECT "date" FROM "women" WHERE "nation"='russia' AND "place"='beijing, china' AND "athlete"='yelena isinbayeva';
## Task Generate a SQL query to answer the following question: `What's the date when Yelena Isinbayeva for Russia was in Beijing, China?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women" ( "event" text, "performance" text, "athlete" text, "nation" text, "place" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the date when Yelena Isinbayeva for Russia was in Beijing, China?`: ```sql
SELECT "performance" FROM "women" WHERE "athlete"='dire tune';
## Task Generate a SQL query to answer the following question: `What's the performance of Dire Tune?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women" ( "event" text, "performance" text, "athlete" text, "nation" text, "place" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the performance of Dire Tune?`: ```sql
SELECT "place" FROM "women" WHERE "performance"='14:11.15';
## Task Generate a SQL query to answer the following question: `What place had 14:11.15 as the performance?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women" ( "event" text, "performance" text, "athlete" text, "nation" text, "place" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What place had 14:11.15 as the performance?`: ```sql
SELECT "event" FROM "women" WHERE "nation"='ethiopia' AND "performance"='14:11.15';
## Task Generate a SQL query to answer the following question: `What's the event that had a performance of 14:11.15 by Ethiopia?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women" ( "event" text, "performance" text, "athlete" text, "nation" text, "place" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the event that had a performance of 14:11.15 by Ethiopia?`: ```sql
SELECT "position" FROM "twelfth_round" WHERE "pick">94 AND "team"='boston patriots';
## Task Generate a SQL query to answer the following question: `What was the position of the player picked after 94, by the Boston Patriots?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "twelfth_round" ( "pick" real, "team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the position of the player picked after 94, by the Boston Patriots?`: ```sql
SELECT "college" FROM "twelfth_round" WHERE "pick"=93;
## Task Generate a SQL query to answer the following question: `What college had the 93 pick?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "twelfth_round" ( "pick" real, "team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What college had the 93 pick?`: ```sql
SELECT "reissue" FROM "1952" WHERE "characters"='bugs bunny' AND "director"='robert mckimson';
## Task Generate a SQL query to answer the following question: `Does the Robert McKimson title featuring Bugs Bunny have a reissue?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1952" ( "title" text, "series" text, "director" text, "characters" text, "release_date" text, "reissue" text ); ### SQL Given the database schema, here is the SQL query that answers `Does the Robert McKimson title featuring Bugs Bunny have a reissue?`: ```sql
SELECT "venue" FROM "mark_van_bommel_international_goals" WHERE "competition"='euro 2004 q.';
## Task Generate a SQL query to answer the following question: `What venue has euro 2004 q. as the competition?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mark_van_bommel_international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What venue has euro 2004 q. as the competition?`: ```sql