output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "position" FROM "p" WHERE "school_country"='arkansas';
## Task Generate a SQL query to answer the following question: `What position does the player from arkansas play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "p" ( "player" text, "nationality" text, "position" text, "from" text, "school_country" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does the player from arkansas play?`: ```sql
SELECT "away_team" FROM "round_11" WHERE "venue"='glenferrie oval';
## Task Generate a SQL query to answer the following question: `Who is the away side at glenferrie oval?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_11" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the away side at glenferrie oval?`: ```sql
SELECT "away_team_score" FROM "round_11" WHERE "home_team"='richmond';
## Task Generate a SQL query to answer the following question: `What is the away side's score when richmond is at home?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_11" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the away side's score when richmond is at home?`: ```sql
SELECT "home_team_score" FROM "round_7" WHERE "crowd">'20,000' AND "away_team"='collingwood';
## Task Generate a SQL query to answer the following question: `WHAT WAS THE HOME TEAM'S SCORE WHEN THEY HAD A CROWD GREATER THAN 20,000 AND PLAYED AGAINST COLLINGWOOD?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_7" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `WHAT WAS THE HOME TEAM'S SCORE WHEN THEY HAD A CROWD GREATER THAN 20,000 AND PLAYED AGAINST COLLINGWOOD?`: ```sql
SELECT "venue" FROM "round_7" WHERE "home_team_score"='10.11 (71)';
## Task Generate a SQL query to answer the following question: `AT WHAT VENUE DID THE HOME TEAM SCORE 10.11 (71)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_7" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `AT WHAT VENUE DID THE HOME TEAM SCORE 10.11 (71)?`: ```sql
SELECT "venue" FROM "round_7" WHERE "home_team_score"='10.9 (69)';
## Task Generate a SQL query to answer the following question: `AT WHAT VENUE DID THE HOME TEAM SCORE 10.9 (69)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_7" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `AT WHAT VENUE DID THE HOME TEAM SCORE 10.9 (69)?`: ```sql
SELECT "home_team" FROM "round_7" WHERE "home_team_score"='9.11 (65)';
## Task Generate a SQL query to answer the following question: `WHAT HOME TEAM SCORED 9.11 (65)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_7" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `WHAT HOME TEAM SCORED 9.11 (65)?`: ```sql
SELECT "crowd" FROM "round_6" WHERE "home_team"='collingwood';
## Task Generate a SQL query to answer the following question: `What was the crowd size at Collingwood's match?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the crowd size at Collingwood's match?`: ```sql
SELECT "crowd" FROM "round_6" WHERE "venue"='arden street oval';
## Task Generate a SQL query to answer the following question: `What was the crowd size at Arden Street Oval?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the crowd size at Arden Street Oval?`: ```sql
SELECT "status_of_match" FROM "international_matches_between_the_home_n" WHERE "fixture"='scotland v northern ireland';
## Task Generate a SQL query to answer the following question: `What is the status of the match between Scotland v Northern Ireland?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_matches_between_the_home_n" ( "date" text, "stadium" text, "fixture" text, "status_of_match" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the status of the match between Scotland v Northern Ireland?`: ```sql
SELECT AVG("week") FROM "exhibition_schedule" WHERE "date"='august 10, 1956';
## Task Generate a SQL query to answer the following question: `In what week was the game on August 10, 1956 played?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "exhibition_schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `In what week was the game on August 10, 1956 played?`: ```sql
SELECT "attendance" FROM "exhibition_schedule" WHERE "week"=6;
## Task Generate a SQL query to answer the following question: `What was the attendance of the game in week 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "exhibition_schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the attendance of the game in week 6?`: ```sql
SELECT MAX("week") FROM "exhibition_schedule" WHERE "date"='august 24, 1956' AND "attendance">'40,175';
## Task Generate a SQL query to answer the following question: `In what week was the game on August 24, 1956 played in front of 40,175 fans?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "exhibition_schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `In what week was the game on August 24, 1956 played in front of 40,175 fans?`: ```sql
SELECT "signal_quality" FROM "media" WHERE "station_call_letters"='kcal-dt';
## Task Generate a SQL query to answer the following question: `What signal quality does the KCAL-DT channel have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "media" ( "translator_call_letters" text, "b_mountain_channel" text, "laurel_mountain_channel" text, "psip" text, "station_call_letters" text, "network_affiliation_id" text, "original_channel" text, "signal_quality" text ); ### SQL Given the database schema, here is the SQL query that answers `What signal quality does the KCAL-DT channel have?`: ```sql
SELECT "original_channel" FROM "media" WHERE "b_mountain_channel"='9';
## Task Generate a SQL query to answer the following question: `What original channel is associated with B Mountain Channel 9?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "media" ( "translator_call_letters" text, "b_mountain_channel" text, "laurel_mountain_channel" text, "psip" text, "station_call_letters" text, "network_affiliation_id" text, "original_channel" text, "signal_quality" text ); ### SQL Given the database schema, here is the SQL query that answers `What original channel is associated with B Mountain Channel 9?`: ```sql
SELECT "b_mountain_channel" FROM "media" WHERE "station_call_letters"='k41go';
## Task Generate a SQL query to answer the following question: `What B Mountain Channel has station call letters of k41go?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "media" ( "translator_call_letters" text, "b_mountain_channel" text, "laurel_mountain_channel" text, "psip" text, "station_call_letters" text, "network_affiliation_id" text, "original_channel" text, "signal_quality" text ); ### SQL Given the database schema, here is the SQL query that answers `What B Mountain Channel has station call letters of k41go?`: ```sql
SELECT "laurel_mountain_channel" FROM "media" WHERE "b_mountain_channel"='7';
## Task Generate a SQL query to answer the following question: `What Laurel Mountain Channel is associated with B Mountain Channel of 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "media" ( "translator_call_letters" text, "b_mountain_channel" text, "laurel_mountain_channel" text, "psip" text, "station_call_letters" text, "network_affiliation_id" text, "original_channel" text, "signal_quality" text ); ### SQL Given the database schema, here is the SQL query that answers `What Laurel Mountain Channel is associated with B Mountain Channel of 7?`: ```sql
SELECT "translator_call_letters" FROM "media" WHERE "station_call_letters"='kcop-dt';
## Task Generate a SQL query to answer the following question: `What are the translator call letters for station call letters of KCOP-DT?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "media" ( "translator_call_letters" text, "b_mountain_channel" text, "laurel_mountain_channel" text, "psip" text, "station_call_letters" text, "network_affiliation_id" text, "original_channel" text, "signal_quality" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the translator call letters for station call letters of KCOP-DT?`: ```sql
SELECT "away_team" FROM "round_12" WHERE "away_team_score"='9.11 (65)';
## Task Generate a SQL query to answer the following question: `What team was the away team with a score of 9.11 (65)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_12" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What team was the away team with a score of 9.11 (65)?`: ```sql
SELECT "date" FROM "round_12" WHERE "home_team"='fitzroy';
## Task Generate a SQL query to answer the following question: `What date was fitzroy the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_12" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What date was fitzroy the home team?`: ```sql
SELECT "away_team_score" FROM "round_12" WHERE "home_team"='richmond';
## Task Generate a SQL query to answer the following question: `What was the score for the away team when the home team was richmond?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_12" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score for the away team when the home team was richmond?`: ```sql
SELECT "away_team" FROM "round_6" WHERE "venue"='arden street oval';
## Task Generate a SQL query to answer the following question: `Who is the away team at the game at Arden Street Oval?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the away team at the game at Arden Street Oval?`: ```sql
SELECT "venue" FROM "round_6" WHERE "home_team"='footscray';
## Task Generate a SQL query to answer the following question: `What is the venue where the home team is Footscray?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the venue where the home team is Footscray?`: ```sql
SELECT "venue" FROM "round_6" WHERE "date"='1 june 1929' AND "away_team"='richmond';
## Task Generate a SQL query to answer the following question: `What is the venue for the game on 1 June 1929 where Richmond was the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the venue for the game on 1 June 1929 where Richmond was the away team?`: ```sql
SELECT "speed" FROM "1971_isle_of_man_senior_tt_500cc_final_s" WHERE "points"=1;
## Task Generate a SQL query to answer the following question: `What was the speed of the rider that earned 1 point?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1971_isle_of_man_senior_tt_500cc_final_s" ( "place" real, "rider" text, "country" text, "machine" text, "speed" text, "time" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the speed of the rider that earned 1 point?`: ```sql
SELECT "partner" FROM "blue_team" WHERE "years_on_learners"<17 AND "driver_s_age">32;
## Task Generate a SQL query to answer the following question: `Which partner has fewer than 17 years on learners and a driver's age over 32?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "blue_team" ( "learner_driver" text, "partner" text, "driver_s_age" real, "years_on_learners" real, "licence_test_attempts" real, "passed_yet" text ); ### SQL Given the database schema, here is the SQL query that answers `Which partner has fewer than 17 years on learners and a driver's age over 32?`: ```sql
SELECT "away_team" FROM "round_16" WHERE "venue"='brunswick street oval';
## Task Generate a SQL query to answer the following question: `What away team is playing at the Brunswick Street Oval Venue?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_16" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What away team is playing at the Brunswick Street Oval Venue?`: ```sql
SELECT "date" FROM "round_16" WHERE "home_team"='richmond';
## Task Generate a SQL query to answer the following question: `What date does the Home team of Richmond have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_16" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What date does the Home team of Richmond have?`: ```sql
SELECT "home_team" FROM "round_1" WHERE "date"='20 april 1957' AND "venue"='victoria park';
## Task Generate a SQL query to answer the following question: `Who is the home team at Victoria Park on 20 April 1957?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_1" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the home team at Victoria Park on 20 April 1957?`: ```sql
SELECT "home_team_score" FROM "round_1" WHERE "away_team_score"='6.14 (50)';
## Task Generate a SQL query to answer the following question: `Who is the home team at the game where the away team scored 6.14 (50)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_1" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the home team at the game where the away team scored 6.14 (50)?`: ```sql
SELECT "municipality" FROM "former_stations" WHERE "station"='harmon cove';
## Task Generate a SQL query to answer the following question: `What municipality is the Harmon Cove station located in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_stations" ( "station" text, "municipality" text, "county" text, "former_railroad" text, "closed" real ); ### SQL Given the database schema, here is the SQL query that answers `What municipality is the Harmon Cove station located in?`: ```sql
SELECT "municipality" FROM "former_stations" WHERE "station"='benson street';
## Task Generate a SQL query to answer the following question: `What municipality is the Benson Street station located in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_stations" ( "station" text, "municipality" text, "county" text, "former_railroad" text, "closed" real ); ### SQL Given the database schema, here is the SQL query that answers `What municipality is the Benson Street station located in?`: ```sql
SELECT "date" FROM "doubles_30_12_18" WHERE "partner"='corrado barazzutti';
## Task Generate a SQL query to answer the following question: `What date shows corrado barazzutti's partner?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_30_12_18" ( "outcome" text, "date" text, "tournament" text, "partner" text, "opponents_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `What date shows corrado barazzutti's partner?`: ```sql
SELECT "date" FROM "doubles_30_12_18" WHERE "outcome"='runner-up' AND "opponents_in_the_final"='tom gullikson butch walts';
## Task Generate a SQL query to answer the following question: `Which date has the tom gullikson butch walts final, and who was the runner-up?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_30_12_18" ( "outcome" text, "date" text, "tournament" text, "partner" text, "opponents_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Which date has the tom gullikson butch walts final, and who was the runner-up?`: ```sql
SELECT "home_team" FROM "round_6" WHERE "away_team"='essendon';
## Task Generate a SQL query to answer the following question: `Who is the home team of the game against Essendon?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the home team of the game against Essendon?`: ```sql
SELECT "color_commentator_s" FROM "1990s" WHERE "network"='espn';
## Task Generate a SQL query to answer the following question: `Who is the color commentator for ESPN from 1990 to 1992?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1990s" ( "year" real, "network" text, "play_by_play" text, "color_commentator_s" text, "sideline_reporter_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the color commentator for ESPN from 1990 to 1992?`: ```sql
SELECT "sideline_reporter_s" FROM "1990s" WHERE "year"<1993;
## Task Generate a SQL query to answer the following question: `Who was the sideline reporter prior to 1993?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1990s" ( "year" real, "network" text, "play_by_play" text, "color_commentator_s" text, "sideline_reporter_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the sideline reporter prior to 1993?`: ```sql
SELECT "play_by_play" FROM "1990s" WHERE "network"='abc' AND "year">1998;
## Task Generate a SQL query to answer the following question: `Who was the play by play commentator for ABC after 1998?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1990s" ( "year" real, "network" text, "play_by_play" text, "color_commentator_s" text, "sideline_reporter_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the play by play commentator for ABC after 1998?`: ```sql
SELECT MIN("year") FROM "1990s" WHERE "play_by_play"='al michaels' AND "sideline_reporter_s"='lesley visser and dan fouts';
## Task Generate a SQL query to answer the following question: `What's the earliest year that Al Michaels was the play-by-play commentator, in which Lesley Visser and Dan Fouts were also sideline reporters?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1990s" ( "year" real, "network" text, "play_by_play" text, "color_commentator_s" text, "sideline_reporter_s" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the earliest year that Al Michaels was the play-by-play commentator, in which Lesley Visser and Dan Fouts were also sideline reporters?`: ```sql
SELECT COUNT("year") FROM "1990s" WHERE "color_commentator_s"='frank gifford and dan dierdorf';
## Task Generate a SQL query to answer the following question: `For how many years combined were Frank Gifford and Dan Dierdorf color commentators?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1990s" ( "year" real, "network" text, "play_by_play" text, "color_commentator_s" text, "sideline_reporter_s" text ); ### SQL Given the database schema, here is the SQL query that answers `For how many years combined were Frank Gifford and Dan Dierdorf color commentators?`: ```sql
SELECT "sideline_reporter_s" FROM "1990s" WHERE "color_commentator_s"='frank gifford and dan dierdorf';
## Task Generate a SQL query to answer the following question: `Which sideline reporters worked alongside Frank Gifford and Dan Dierdorf?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1990s" ( "year" real, "network" text, "play_by_play" text, "color_commentator_s" text, "sideline_reporter_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Which sideline reporters worked alongside Frank Gifford and Dan Dierdorf?`: ```sql
SELECT "withdrawn" FROM "southern_railway_batch" WHERE "name"='lundy';
## Task Generate a SQL query to answer the following question: `When was the Lundy withdrawn?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "southern_railway_batch" ( "br_no" real, "sr_no" text, "name" text, "builder" text, "whenbuilt" text, "withdrawn" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the Lundy withdrawn?`: ```sql
SELECT "whenbuilt" FROM "southern_railway_batch" WHERE "name"='fighter command';
## Task Generate a SQL query to answer the following question: `When was the locomotive named fighter command built?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "southern_railway_batch" ( "br_no" real, "sr_no" text, "name" text, "builder" text, "whenbuilt" text, "withdrawn" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the locomotive named fighter command built?`: ```sql
SELECT MAX("total") FROM "medal_table" WHERE "rank"='2' AND "silver"<6;
## Task Generate a SQL query to answer the following question: `Which country has a rand of 2 and a silver less than 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Which country has a rand of 2 and a silver less than 6?`: ```sql
SELECT MIN("total") FROM "medal_table" WHERE "gold"=3 AND "silver"<3;
## Task Generate a SQL query to answer the following question: `What is the lowest total of medals that has a gold of 3 and a silver less than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" text, "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 lowest total of medals that has a gold of 3 and a silver less than 3?`: ```sql
SELECT AVG("crowd") FROM "round_17" WHERE "home_team_score"='10.10 (70)';
## Task Generate a SQL query to answer the following question: `What was the average size of the crowd for games where the home team had a score of 10.10 (70)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the average size of the crowd for games where the home team had a score of 10.10 (70)?`: ```sql
SELECT "home_team_score" FROM "round_17" WHERE "venue"='mcg';
## Task Generate a SQL query to answer the following question: `What was the home team score for the game played at MCG?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the home team score for the game played at MCG?`: ```sql
SELECT "away_team" FROM "round_17" WHERE "venue"='windy hill';
## Task Generate a SQL query to answer the following question: `For the game played at Windy Hill, who was the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `For the game played at Windy Hill, who was the away team?`: ```sql
SELECT "venue" FROM "round_17" WHERE "away_team"='north melbourne';
## Task Generate a SQL query to answer the following question: `For the game where the away team was North Melbourne, what was the venue?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `For the game where the away team was North Melbourne, what was the venue?`: ```sql
SELECT "weight" FROM "current_squad" WHERE "2012_club"='victorian tigers';
## Task Generate a SQL query to answer the following question: `What is the Weight for the 2012 club, Victorian Tigers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_squad" ( "name" text, "pos" text, "height" text, "weight" text, "2012_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Weight for the 2012 club, Victorian Tigers?`: ```sql
SELECT "weight" FROM "current_squad" WHERE "name"='billy miller category:articles with hcards';
## Task Generate a SQL query to answer the following question: `What is the Weight for the Name Billy Miller Category:Articles with hcards?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_squad" ( "name" text, "pos" text, "height" text, "weight" text, "2012_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Weight for the Name Billy Miller Category:Articles with hcards?`: ```sql
SELECT "2012_club" FROM "current_squad" WHERE "name"='billy miller category:articles with hcards';
## Task Generate a SQL query to answer the following question: `What is the 2012 club for the Billy Miller Category:Articles with hcards (Name)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_squad" ( "name" text, "pos" text, "height" text, "weight" text, "2012_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the 2012 club for the Billy Miller Category:Articles with hcards (Name)?`: ```sql
SELECT MIN("total") FROM "medals_table" WHERE "nation"='china';
## Task Generate a SQL query to answer the following question: `How many medals did China receive?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medals_table" ( "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 medals did China receive?`: ```sql
SELECT AVG("num_of_candidates") FROM "general_election_results" WHERE "pct_of_popular_vote"='41.37%';
## Task Generate a SQL query to answer the following question: `What is the # of candidates that have a popular vote of 41.37%?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "general_election_results" ( "general_election" real, "num_of_candidates" real, "num_of_seats_won" real, "pct_of_popular_vote" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the # of candidates that have a popular vote of 41.37%?`: ```sql
SELECT AVG("num_of_candidates") FROM "general_election_results" WHERE "result"='liberal majority' AND "num_of_seats_won"=51 AND "general_election">2008;
## Task Generate a SQL query to answer the following question: `What is the # of candidates of liberal majority with 51 wins and larger number of 2008 in general elections?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "general_election_results" ( "general_election" real, "num_of_candidates" real, "num_of_seats_won" real, "pct_of_popular_vote" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the # of candidates of liberal majority with 51 wins and larger number of 2008 in general elections?`: ```sql
SELECT COUNT("general_election") FROM "general_election_results" WHERE "num_of_seats_won"<23 AND "num_of_candidates">108;
## Task Generate a SQL query to answer the following question: `How many general elections that have won smaller than 23 with candidates larger than 108?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "general_election_results" ( "general_election" real, "num_of_candidates" real, "num_of_seats_won" real, "pct_of_popular_vote" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `How many general elections that have won smaller than 23 with candidates larger than 108?`: ```sql
SELECT "venue" FROM "round_17" WHERE "away_team"='melbourne';
## Task Generate a SQL query to answer the following question: `What venue did melbourne play at as the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What venue did melbourne play at as the away team?`: ```sql
SELECT "home_team_score" FROM "round_17" WHERE "home_team"='essendon';
## Task Generate a SQL query to answer the following question: `What was the essendon score when they were at home?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the essendon score when they were at home?`: ```sql
SELECT "date" FROM "round_17" WHERE "home_team_score"='7.11 (53)';
## Task Generate a SQL query to answer the following question: `What is the date of the game where the home team score was 7.11 (53)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of the game where the home team score was 7.11 (53)?`: ```sql
SELECT "venue" FROM "round_17" WHERE "away_team"='melbourne';
## Task Generate a SQL query to answer the following question: `What venue did melbourne play at as the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What venue did melbourne play at as the away team?`: ```sql
SELECT "years" FROM "references" WHERE "goals"=82;
## Task Generate a SQL query to answer the following question: `What Years have a Goal of 82?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "references" ( "nationality" text, "position" text, "apps" real, "goals" real, "years" text ); ### SQL Given the database schema, here is the SQL query that answers `What Years have a Goal of 82?`: ```sql
SELECT COUNT("overall") FROM "1998_new_england_patriots_draft_selectio" WHERE "position"='safety' AND "round">1;
## Task Generate a SQL query to answer the following question: `What is the total of overall values with a safety position in a round greater than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1998_new_england_patriots_draft_selectio" ( "round" real, "overall" real, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total of overall values with a safety position in a round greater than 1?`: ```sql
SELECT AVG("overall") FROM "1998_new_england_patriots_draft_selectio" WHERE "round"<4 AND "college"='georgia';
## Task Generate a SQL query to answer the following question: `What is the average overall value for a round less than 4 associated with the College of Georgia?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1998_new_england_patriots_draft_selectio" ( "round" real, "overall" real, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average overall value for a round less than 4 associated with the College of Georgia?`: ```sql
SELECT AVG("attendance") FROM "schedule" WHERE "week">16;
## Task Generate a SQL query to answer the following question: `What was the average attendance in weeks after 16?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the average attendance in weeks after 16?`: ```sql
SELECT MAX("killed") FROM "2011" WHERE "incident_no"='14';
## Task Generate a SQL query to answer the following question: `What is the highest number killed in incident #14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011" ( "incident_no" text, "date" text, "place" text, "killed" real, "injured" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number killed in incident #14?`: ```sql
SELECT COUNT("crowd") FROM "round_10" WHERE "away_team_score"='7.19 (61)';
## Task Generate a SQL query to answer the following question: `What was the crowd size when the away team scored 7.19 (61)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the crowd size when the away team scored 7.19 (61)?`: ```sql
SELECT MAX("crowd") FROM "round_10" WHERE "venue"='arden street oval';
## Task Generate a SQL query to answer the following question: `What was the largest crowd at Arden Street Oval?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the largest crowd at Arden Street Oval?`: ```sql
SELECT "home_team_score" FROM "round_10" WHERE "venue"='arden street oval';
## Task Generate a SQL query to answer the following question: `What was the home teams score at Arden Street Oval?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the home teams score at Arden Street Oval?`: ```sql
SELECT MIN("crowd") FROM "round_10" WHERE "away_team_score"='7.19 (61)';
## Task Generate a SQL query to answer the following question: `What was the lowest crowd size when the away team scored 7.19 (61)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the lowest crowd size when the away team scored 7.19 (61)?`: ```sql
SELECT "venue" FROM "round_10" WHERE "home_team_score"='11.12 (78)';
## Task Generate a SQL query to answer the following question: `What was the venue where the home team scored 11.12 (78)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the venue where the home team scored 11.12 (78)?`: ```sql
SELECT MIN("gold") FROM "medal_table" WHERE "total">44;
## Task Generate a SQL query to answer the following question: `What was the gold medal total for a total of 44 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 was the gold medal total for a total of 44 medals?`: ```sql
SELECT AVG("silver") FROM "medal_table" WHERE "total"<3 AND "rank">9;
## Task Generate a SQL query to answer the following question: `How many silver medals were won with a total medal of 3 and a rank above 9?` ### 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 `How many silver medals were won with a total medal of 3 and a rank above 9?`: ```sql
SELECT COUNT("week") FROM "exhibition_schedule" WHERE "attendance">'68,000';
## Task Generate a SQL query to answer the following question: `How many weeks had an attendance of over 68,000?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "exhibition_schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `How many weeks had an attendance of over 68,000?`: ```sql
SELECT "engine" FROM "indy_500_results" WHERE "finish"='2nd';
## Task Generate a SQL query to answer the following question: `What engine was used by the team the finished 2nd?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "year" real, "chassis" text, "engine" text, "start" text, "finish" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What engine was used by the team the finished 2nd?`: ```sql
SELECT "chassis" FROM "indy_500_results" WHERE "engine"='chevrolet' AND "year"=1991;
## Task Generate a SQL query to answer the following question: `What chassis was used with the Chevrolet engine in 1991?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "year" real, "chassis" text, "engine" text, "start" text, "finish" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What chassis was used with the Chevrolet engine in 1991?`: ```sql
SELECT MAX("year") FROM "indy_500_results" WHERE "start"='1st' AND "chassis"='g-force';
## Task Generate a SQL query to answer the following question: `What was the most recent year when a g-force chassis started in 1st?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "year" real, "chassis" text, "engine" text, "start" text, "finish" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the most recent year when a g-force chassis started in 1st?`: ```sql
SELECT "start" FROM "indy_500_results" WHERE "year"<1986;
## Task Generate a SQL query to answer the following question: `What was the starting position in the year before 1986?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "year" real, "chassis" text, "engine" text, "start" text, "finish" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the starting position in the year before 1986?`: ```sql
SELECT "vessel_name" FROM "fleet" WHERE "flag"='malta' AND "type"='panamax' AND "class"='gl' AND "built">2010;
## Task Generate a SQL query to answer the following question: `What is the name of the Malta vessel built after 2010 that is a GL class Panamax vessel?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet" ( "vessel_name" text, "type" text, "built" real, "class" text, "flag" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the Malta vessel built after 2010 that is a GL class Panamax vessel?`: ```sql
SELECT SUM("built") FROM "fleet" WHERE "class"='dnv' AND "type"='panamax' AND "vessel_name"='deva';
## Task Generate a SQL query to answer the following question: `Which year was the vessel Deva built as a Panamax DNV class ship?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet" ( "vessel_name" text, "type" text, "built" real, "class" text, "flag" text ); ### SQL Given the database schema, here is the SQL query that answers `Which year was the vessel Deva built as a Panamax DNV class ship?`: ```sql
SELECT "class" FROM "fleet" WHERE "vessel_name"='hyundai smart';
## Task Generate a SQL query to answer the following question: `What is the class of vessel of the ship Hyundai Smart?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet" ( "vessel_name" text, "type" text, "built" real, "class" text, "flag" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the class of vessel of the ship Hyundai Smart?`: ```sql
SELECT "class" FROM "fleet" WHERE "vessel_name"='hyundai tenacity';
## Task Generate a SQL query to answer the following question: `In which class would the vessel Hyundai Tenacity be placed?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fleet" ( "vessel_name" text, "type" text, "built" real, "class" text, "flag" text ); ### SQL Given the database schema, here is the SQL query that answers `In which class would the vessel Hyundai Tenacity be placed?`: ```sql
SELECT "result" FROM "schedule" WHERE "week"=14;
## Task Generate a SQL query to answer the following question: `What was the result for week 14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the result for week 14?`: ```sql
SELECT "home_team_score" FROM "round_9" WHERE "away_team_score"='5.9 (39)';
## Task Generate a SQL query to answer the following question: `Who was the home team when the away team scored 5.9 (39)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_9" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the home team when the away team scored 5.9 (39)?`: ```sql
SELECT MIN("rank") FROM "rebounds" WHERE "reb_avg">9 AND "total_rebounds"=920 AND "games">79;
## Task Generate a SQL query to answer the following question: `Which lowest rank(player) has a rebound average larger than 9, out of 920 rebounds, and who played more than 79 games?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rebounds" ( "rank" real, "player" text, "years" text, "games" real, "reb_avg" real, "total_rebounds" real ); ### SQL Given the database schema, here is the SQL query that answers `Which lowest rank(player) has a rebound average larger than 9, out of 920 rebounds, and who played more than 79 games?`: ```sql
SELECT COUNT("rank") FROM "rebounds" WHERE "reb_avg"<6.1;
## Task Generate a SQL query to answer the following question: `How many ranks have a rebound average smaller than 6.1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rebounds" ( "rank" real, "player" text, "years" text, "games" real, "reb_avg" real, "total_rebounds" real ); ### SQL Given the database schema, here is the SQL query that answers `How many ranks have a rebound average smaller than 6.1?`: ```sql
SELECT "player" FROM "nfl_draft" WHERE "overall"<374 AND "school_club_team"='stephen f. austin';
## Task Generate a SQL query to answer the following question: `Which player was drafted higher than 374 and went to the school Stephen F. Austin?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "round" real, "overall" real, "player" text, "position" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which player was drafted higher than 374 and went to the school Stephen F. Austin?`: ```sql
SELECT MIN("round") FROM "nfl_draft" WHERE "school_club_team"='trinity' AND "overall"<21;
## Task Generate a SQL query to answer the following question: `What is the lowest round Trinity school was drafted with an overall higher than 21?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "round" real, "overall" real, "player" text, "position" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest round Trinity school was drafted with an overall higher than 21?`: ```sql
SELECT "swimmer" FROM "final" WHERE "time"='7:52.04';
## Task Generate a SQL query to answer the following question: `Who got the time of 7:52.04?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final" ( "lane" real, "swimmer" text, "nationality" text, "100m" real, "200m" text, "300m" text, "400m" text, "500m" text, "600m" text, "700m" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `Who got the time of 7:52.04?`: ```sql
SELECT "swimmer" FROM "final" WHERE "700m"='6:57.69';
## Task Generate a SQL query to answer the following question: `Which swimmer completed the 700m within 6:57.69?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final" ( "lane" real, "swimmer" text, "nationality" text, "100m" real, "200m" text, "300m" text, "400m" text, "500m" text, "600m" text, "700m" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `Which swimmer completed the 700m within 6:57.69?`: ```sql
SELECT "200m" FROM "final" WHERE "100m">57.34 AND "600m"='5:54.45';
## Task Generate a SQL query to answer the following question: `Which swimmer has a 100m time longer than 57.34 and a 600m of 5:54.45?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final" ( "lane" real, "swimmer" text, "nationality" text, "100m" real, "200m" text, "300m" text, "400m" text, "500m" text, "600m" text, "700m" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `Which swimmer has a 100m time longer than 57.34 and a 600m of 5:54.45?`: ```sql
SELECT "opponent" FROM "schedule" WHERE "box_scores"='bye';
## Task Generate a SQL query to answer the following question: `Which of the opponents has bye as their box score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "stadium" text, "record" text, "box_scores" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `Which of the opponents has bye as their box score?`: ```sql
SELECT "attendance" FROM "schedule" WHERE "opponent"='pittsburgh steelers';
## Task Generate a SQL query to answer the following question: `How many people attended the game against the pittsburgh steelers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "stadium" text, "record" text, "box_scores" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `How many people attended the game against the pittsburgh steelers?`: ```sql
SELECT "result" FROM "schedule" WHERE "box_scores"='box' AND "date"='september 25';
## Task Generate a SQL query to answer the following question: `What was the result of the game on September 25 with a box score of box?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "stadium" text, "record" text, "box_scores" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the result of the game on September 25 with a box score of box?`: ```sql
SELECT "date" FROM "schedule" WHERE "week">13 AND "attendance"='41,862';
## Task Generate a SQL query to answer the following question: `What is the date of the game later than week 13 and 41,862 people attended?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "stadium" text, "record" text, "box_scores" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of the game later than week 13 and 41,862 people attended?`: ```sql
SELECT SUM("caps") FROM "most_caps" WHERE "goals"<9 AND "rank">8;
## Task Generate a SQL query to answer the following question: `What is the sum of caps for players with less than 9 goals ranked below 8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "most_caps" ( "rank" real, "player" text, "nation" text, "caps" real, "goals" real, "years" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of caps for players with less than 9 goals ranked below 8?`: ```sql
SELECT "senior_status" FROM "former_judges" WHERE "active_service"='1972–1995';
## Task Generate a SQL query to answer the following question: `What were the years of senior status for active service in 1972–1995?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_judges" ( "state" text, "born_died" text, "active_service" text, "chief_judge" text, "senior_status" text, "appointed_by" text, "reason_for_termination" text ); ### SQL Given the database schema, here is the SQL query that answers `What were the years of senior status for active service in 1972–1995?`: ```sql
SELECT "born_died" FROM "former_judges" WHERE "active_service"='1972–1995';
## Task Generate a SQL query to answer the following question: `What were the birth and death years when active service was 1972–1995?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_judges" ( "state" text, "born_died" text, "active_service" text, "chief_judge" text, "senior_status" text, "appointed_by" text, "reason_for_termination" text ); ### SQL Given the database schema, here is the SQL query that answers `What were the birth and death years when active service was 1972–1995?`: ```sql
SELECT "active_service" FROM "former_judges" WHERE "reason_for_termination"='death' AND "senior_status"='1972–2005';
## Task Generate a SQL query to answer the following question: `Which active services years ended in death and had senior status in 1972–2005?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_judges" ( "state" text, "born_died" text, "active_service" text, "chief_judge" text, "senior_status" text, "appointed_by" text, "reason_for_termination" text ); ### SQL Given the database schema, here is the SQL query that answers `Which active services years ended in death and had senior status in 1972–2005?`: ```sql
SELECT "date" FROM "schedule" WHERE "opponent"='boston patriots';
## Task Generate a SQL query to answer the following question: `Which date featured the Boston Patriots as the opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `Which date featured the Boston Patriots as the opponent?`: ```sql
SELECT "opponent" FROM "schedule" WHERE "week"=8;
## Task Generate a SQL query to answer the following question: `Who was the opponent during week 8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the opponent during week 8?`: ```sql