output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT COUNT("no_in_season") FROM "table1_17624965_1" WHERE "title"='\"Strangled, Not Stirred\"';
## Task Generate a SQL query to answer the following question: `How many seasons did "strangled, not stirred" air?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17624965_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `How many seasons did "strangled, not stirred" air?`: ```sql
SELECT COUNT("written_by") FROM "table1_17624965_1" WHERE "directed_by"='Alison Maclean';
## Task Generate a SQL query to answer the following question: `How many episodes did Alison Maclean direct?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17624965_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `How many episodes did Alison Maclean direct?`: ```sql
SELECT "high_points" FROM "playoffs" WHERE "date"='May 29';
## Task Generate a SQL query to answer the following question: `Name the high points for may 29` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "series" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the high points for may 29`: ```sql
SELECT "date" FROM "playoffs" WHERE "series"='2-2';
## Task Generate a SQL query to answer the following question: `Name the date for series 2-2` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "series" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the date for series 2-2`: ```sql
SELECT "high_assists" FROM "playoffs" WHERE "date"='May 21';
## Task Generate a SQL query to answer the following question: `Name the high assists for may 21` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "series" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the high assists for may 21`: ```sql
SELECT COUNT("play_by_play") FROM "2000s" WHERE "pregame_analysts"='Darren Flutie, Eric Tillman and Greg Frers';
## Task Generate a SQL query to answer the following question: `How many different play-by-play announcers also had pregame analysis by Darren Flutie, Eric Tillman and Greg Frers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2000s" ( "year" real, "network" text, "play_by_play" text, "colour_commentator_s" text, "sideline_reporters" text, "pregame_host" text, "pregame_analysts" text ); ### SQL Given the database schema, here is the SQL query that answers `How many different play-by-play announcers also had pregame analysis by Darren Flutie, Eric Tillman and Greg Frers?`: ```sql
SELECT "play_by_play" FROM "2000s" WHERE "pregame_host"='Brian Williams' AND "sideline_reporters"='Steve Armitage and Brenda Irving';
## Task Generate a SQL query to answer the following question: `Who did the play-by-play when the pregame host was Brian Williams and the sideline reporters were Steve Armitage and Brenda Irving?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2000s" ( "year" real, "network" text, "play_by_play" text, "colour_commentator_s" text, "sideline_reporters" text, "pregame_host" text, "pregame_analysts" text ); ### SQL Given the database schema, here is the SQL query that answers `Who did the play-by-play when the pregame host was Brian Williams and the sideline reporters were Steve Armitage and Brenda Irving?`: ```sql
SELECT "pregame_host" FROM "2000s" WHERE "sideline_reporters"='Steve Armitage and Brenda Irving';
## Task Generate a SQL query to answer the following question: `Who were the pregame hosts when the sideline reporters were Steve Armitage and Brenda Irving?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2000s" ( "year" real, "network" text, "play_by_play" text, "colour_commentator_s" text, "sideline_reporters" text, "pregame_host" text, "pregame_analysts" text ); ### SQL Given the database schema, here is the SQL query that answers `Who were the pregame hosts when the sideline reporters were Steve Armitage and Brenda Irving?`: ```sql
SELECT "pregame_analysts" FROM "2000s" WHERE "year"=2002;
## Task Generate a SQL query to answer the following question: `Who did pregame analysis in 2002?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2000s" ( "year" real, "network" text, "play_by_play" text, "colour_commentator_s" text, "sideline_reporters" text, "pregame_host" text, "pregame_analysts" text ); ### SQL Given the database schema, here is the SQL query that answers `Who did pregame analysis in 2002?`: ```sql
SELECT "state" FROM "list_of_the_most_populous_us_counties_so" WHERE "county"='Lake County';
## Task Generate a SQL query to answer the following question: `Name the state for lake county` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_the_most_populous_us_counties_so" ( "rank" real, "county" text, "state" text, "land_area_km" text, "land_area_mi" text, "april_1_2010_census" real, "april_1_2010_density_km" real, "april_1_2010_density_mi" real, "july_1_2010_official_estimate" real, "july_1_2010_density_km" real, "july_1_2010_density_mi" real, "july_1_2011_official_estimate" real, "july_1_2011_density_km" real, "july_1_2011_density_mi" real, "mid_2010_to_mid_2011_change_absolute" real, "mid_2010_to_mid_2011_change_pct" text, "county_seat_or_courthouse" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the state for lake county`: ```sql
SELECT COUNT("county_seat_or_courthouse") FROM "list_of_the_most_populous_us_counties_so" WHERE "april_1_2010_density_mi"=2205;
## Task Generate a SQL query to answer the following question: `Name the total number of county seat or courthouse for april 1 2010 denisty is 2205` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_the_most_populous_us_counties_so" ( "rank" real, "county" text, "state" text, "land_area_km" text, "land_area_mi" text, "april_1_2010_census" real, "april_1_2010_density_km" real, "april_1_2010_density_mi" real, "july_1_2010_official_estimate" real, "july_1_2010_density_km" real, "july_1_2010_density_mi" real, "july_1_2011_official_estimate" real, "july_1_2011_density_km" real, "july_1_2011_density_mi" real, "mid_2010_to_mid_2011_change_absolute" real, "mid_2010_to_mid_2011_change_pct" text, "county_seat_or_courthouse" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of county seat or courthouse for april 1 2010 denisty is 2205`: ```sql
SELECT COUNT("state") FROM "list_of_the_most_populous_us_counties_so" WHERE "july_1_2010_density_mi"=1209;
## Task Generate a SQL query to answer the following question: `Name the total number of states for july 1 2010 density is 1209` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_the_most_populous_us_counties_so" ( "rank" real, "county" text, "state" text, "land_area_km" text, "land_area_mi" text, "april_1_2010_census" real, "april_1_2010_density_km" real, "april_1_2010_density_mi" real, "july_1_2010_official_estimate" real, "july_1_2010_density_km" real, "july_1_2010_density_mi" real, "july_1_2011_official_estimate" real, "july_1_2011_density_km" real, "july_1_2011_density_mi" real, "mid_2010_to_mid_2011_change_absolute" real, "mid_2010_to_mid_2011_change_pct" text, "county_seat_or_courthouse" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of states for july 1 2010 density is 1209`: ```sql
SELECT MIN("season") FROM "semi_pro_seasons_1987_1993";
## Task Generate a SQL query to answer the following question: `What is the lowest season?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semi_pro_seasons_1987_1993" ( "season" real, "winners" text, "total_wins" real, "runners_up" text, "third_place" text, "number_of_clubs" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest season?`: ```sql
SELECT COUNT("number_of_clubs") FROM "semi_pro_seasons_1987_1993" WHERE "runners_up"='Shandong';
## Task Generate a SQL query to answer the following question: `How many values for number of clubs have Shandong as the runner-up?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semi_pro_seasons_1987_1993" ( "season" real, "winners" text, "total_wins" real, "runners_up" text, "third_place" text, "number_of_clubs" real ); ### SQL Given the database schema, here is the SQL query that answers `How many values for number of clubs have Shandong as the runner-up?`: ```sql
SELECT COUNT("total_wins") FROM "semi_pro_seasons_1987_1993" WHERE "runners_up"='Shanghai';
## Task Generate a SQL query to answer the following question: `How many total wins with Shanghai as runner-up?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semi_pro_seasons_1987_1993" ( "season" real, "winners" text, "total_wins" real, "runners_up" text, "third_place" text, "number_of_clubs" real ); ### SQL Given the database schema, here is the SQL query that answers `How many total wins with Shanghai as runner-up?`: ```sql
SELECT "club" FROM "league_table" WHERE "tries_for"='32';
## Task Generate a SQL query to answer the following question: `Name the club for when tries for is 32` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the club for when tries for is 32`: ```sql
SELECT COUNT("lost") FROM "league_table" WHERE "tries_for"='109';
## Task Generate a SQL query to answer the following question: `Name the number of lost where tries for is 109` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number of lost where tries for is 109`: ```sql
SELECT "won" FROM "league_table" WHERE "tries_against"='72';
## Task Generate a SQL query to answer the following question: `Name the won when tries against is 72` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the won when tries against is 72`: ```sql
SELECT "points_against" FROM "league_table" WHERE "drawn"='1' AND "points"='51';
## Task Generate a SQL query to answer the following question: `Name the points aginst when drawn is 1 and points is 51` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the points aginst when drawn is 1 and points is 51`: ```sql
SELECT "original_air_date" FROM "table1_17625876_1" WHERE "no_in_season"=1;
## Task Generate a SQL query to answer the following question: `Name the original air date for number in season being 1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17625876_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the original air date for number in season being 1`: ```sql
SELECT "won" FROM "league_table" WHERE "lost"='5';
## Task Generate a SQL query to answer the following question: `How many were won when 5 were lost? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `How many were won when 5 were lost? `: ```sql
SELECT "drawn" FROM "league_table" WHERE "lost"='13';
## Task Generate a SQL query to answer the following question: `How many were drawn when 13 were lost? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `How many were drawn when 13 were lost? `: ```sql
SELECT "points_for" FROM "league_table" WHERE "tries_against"='63';
## Task Generate a SQL query to answer the following question: `How many points are there for 63 tries against? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `How many points are there for 63 tries against? `: ```sql
SELECT "try_bonus" FROM "league_table" WHERE "tries_against"='17';
## Task Generate a SQL query to answer the following question: `What is the try bonus when the tries against are 17? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the try bonus when the tries against are 17? `: ```sql
SELECT "tries_for" FROM "league_table" WHERE "won"='11';
## Task Generate a SQL query to answer the following question: `How many tries for are there when 11 were won? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `How many tries for are there when 11 were won? `: ```sql
SELECT COUNT("points") FROM "league_table" WHERE "losing_bonus"='2' AND "points_for"='642';
## Task Generate a SQL query to answer the following question: `How many points categories are there when the losing bonus is 2 and points for are 642?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `How many points categories are there when the losing bonus is 2 and points for are 642?`: ```sql
SELECT COUNT("written_by") FROM "table1_17641206_2" WHERE "viewership"='6.34 million';
## Task Generate a SQL query to answer the following question: `How many people wrote the episode that had 6.34 million viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17641206_2" ( "episode" real, "title" text, "directed_by" text, "written_by" text, "original_airdate" text, "duration" text, "viewership" text ); ### SQL Given the database schema, here is the SQL query that answers `How many people wrote the episode that had 6.34 million viewers?`: ```sql
SELECT "original_title" FROM "table1_17641206_4" WHERE "viewership"='5.04 million';
## Task Generate a SQL query to answer the following question: `What was the title of the episode with 5.04 million viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17641206_4" ( "episode" real, "original_title" text, "directed_by" text, "written_by" text, "original_airdate" text, "duration" text, "viewership" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the title of the episode with 5.04 million viewers?`: ```sql
SELECT "original_airdate" FROM "table1_17641206_4" WHERE "viewership"='4.77 million';
## Task Generate a SQL query to answer the following question: `What was the first airdate with a viewership of 4.77 million?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17641206_4" ( "episode" real, "original_title" text, "directed_by" text, "written_by" text, "original_airdate" text, "duration" text, "viewership" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the first airdate with a viewership of 4.77 million?`: ```sql
SELECT COUNT("duration") FROM "table1_17641206_4" WHERE "written_by"='John Sullivan';
## Task Generate a SQL query to answer the following question: `How many episodes of 30 minutes were written by John Sullivan?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17641206_4" ( "episode" real, "original_title" text, "directed_by" text, "written_by" text, "original_airdate" text, "duration" text, "viewership" text ); ### SQL Given the database schema, here is the SQL query that answers `How many episodes of 30 minutes were written by John Sullivan?`: ```sql
SELECT "directed_by" FROM "table1_17641206_4" WHERE "written_by"='John Sullivan';
## Task Generate a SQL query to answer the following question: `Who was the director when the writer was John Sullivan?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17641206_4" ( "episode" real, "original_title" text, "directed_by" text, "written_by" text, "original_airdate" text, "duration" text, "viewership" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the director when the writer was John Sullivan?`: ```sql
SELECT COUNT("duration") FROM "table1_17641206_8" WHERE "original_title"='\" One Man''s Junk \"';
## Task Generate a SQL query to answer the following question: `What is the total length when the title is " one man's junk "` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17641206_8" ( "episode" real, "original_title" text, "directed_by" text, "written_by" text, "original_airdate" text, "duration" text, "viewership" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total length when the title is " one man's junk "`: ```sql
SELECT "directed_by" FROM "table1_17641206_8" WHERE "written_by"='John Sullivan' AND "original_airdate"='15January2009';
## Task Generate a SQL query to answer the following question: `What are the movies that are written and dircted by john sullivan with the airdate of 15january2009.` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17641206_8" ( "episode" real, "original_title" text, "directed_by" text, "written_by" text, "original_airdate" text, "duration" text, "viewership" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the movies that are written and dircted by john sullivan with the airdate of 15january2009.`: ```sql
SELECT "viewership" FROM "table1_17641206_8" WHERE "original_title"='\" Your Cheating Art \"';
## Task Generate a SQL query to answer the following question: `What is the total viewership where the title is " your cheating art ".` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17641206_8" ( "episode" real, "original_title" text, "directed_by" text, "written_by" text, "original_airdate" text, "duration" text, "viewership" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total viewership where the title is " your cheating art ".`: ```sql
SELECT COUNT("episode") FROM "table1_17641206_8" WHERE "original_airdate"='22January2009';
## Task Generate a SQL query to answer the following question: `How many episodes aired on 22january2009` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17641206_8" ( "episode" real, "original_title" text, "directed_by" text, "written_by" text, "original_airdate" text, "duration" text, "viewership" text ); ### SQL Given the database schema, here is the SQL query that answers `How many episodes aired on 22january2009`: ```sql
SELECT MIN("transfers_out") FROM "statistics" WHERE "total_transfers"=21;
## Task Generate a SQL query to answer the following question: `Name the least transfers out when transfers is 21` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "statistics" ( "country" text, "transfers_in" real, "transfers_out" real, "internal_transfers" real, "total_transfers" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the least transfers out when transfers is 21`: ```sql
SELECT MIN("total_transfers") FROM "statistics" WHERE "country"='Romania';
## Task Generate a SQL query to answer the following question: `Name the least total transfers for romania` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "statistics" ( "country" text, "transfers_in" real, "transfers_out" real, "internal_transfers" real, "total_transfers" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the least total transfers for romania`: ```sql
SELECT MIN("internal_transfers") FROM "statistics";
## Task Generate a SQL query to answer the following question: `Name the least internal transfers` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "statistics" ( "country" text, "transfers_in" real, "transfers_out" real, "internal_transfers" real, "total_transfers" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the least internal transfers`: ```sql
SELECT COUNT("status") FROM "westmorland_county_new_brunswick" WHERE "official_name"='Moncton';
## Task Generate a SQL query to answer the following question: `How many status are there for Moncton?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "westmorland_county_new_brunswick" ( "official_name" text, "status" text, "area_km_2" text, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `How many status are there for Moncton?`: ```sql
SELECT "census_ranking" FROM "westmorland_county_new_brunswick" WHERE "population"=959;
## Task Generate a SQL query to answer the following question: `What is the census ranking of the location with population of 959?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "westmorland_county_new_brunswick" ( "official_name" text, "status" text, "area_km_2" text, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the census ranking of the location with population of 959?`: ```sql
SELECT "official_name" FROM "westmorland_county_new_brunswick" WHERE "area_km_2"='582.20';
## Task Generate a SQL query to answer the following question: `What is the name of the place with 582.20 square km area?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "westmorland_county_new_brunswick" ( "official_name" text, "status" text, "area_km_2" text, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the place with 582.20 square km area?`: ```sql
SELECT "official_name" FROM "westmorland_county_new_brunswick" WHERE "area_km_2"='578.28';
## Task Generate a SQL query to answer the following question: `What is the name of the place where area is 578.28 square km?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "westmorland_county_new_brunswick" ( "official_name" text, "status" text, "area_km_2" text, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the place where area is 578.28 square km?`: ```sql
SELECT "team" FROM "results" WHERE "points"='20';
## Task Generate a SQL query to answer the following question: `If the points is 20, what was the team name?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "fin_pos" real, "car_no" real, "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "laps_led" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `If the points is 20, what was the team name?`: ```sql
SELECT "time_retired" FROM "results" WHERE "driver"='Marco Andretti';
## Task Generate a SQL query to answer the following question: `What is the time/retired if the driver is Marco Andretti?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "fin_pos" real, "car_no" real, "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "laps_led" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the time/retired if the driver is Marco Andretti?`: ```sql
SELECT MAX("laps_led") FROM "results" WHERE "laps"=191;
## Task Generate a SQL query to answer the following question: `If the laps is 191, what is the maximum laps led?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "fin_pos" real, "car_no" real, "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "laps_led" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `If the laps is 191, what is the maximum laps led?`: ```sql
SELECT "time_retired" FROM "results" WHERE "driver"='Ed Carpenter';
## Task Generate a SQL query to answer the following question: `What is the time/retired if the driver is Ed Carpenter?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "fin_pos" real, "car_no" real, "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "laps_led" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the time/retired if the driver is Ed Carpenter?`: ```sql
SELECT MAX("laps") FROM "results" WHERE "time_retired"='+1 lap';
## Task Generate a SQL query to answer the following question: `If the time/retired is +1 lap, what is the amount of maximum laps?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "fin_pos" real, "car_no" real, "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "laps_led" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `If the time/retired is +1 lap, what is the amount of maximum laps?`: ```sql
SELECT "team" FROM "results" WHERE "driver"='Milka Duno';
## Task Generate a SQL query to answer the following question: `If the driver is Milka Duno, what is the name of the team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "fin_pos" real, "car_no" real, "driver" text, "team" text, "laps" real, "time_retired" text, "grid" real, "laps_led" real, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `If the driver is Milka Duno, what is the name of the team?`: ```sql
SELECT COUNT("stage") FROM "jersey_progress" WHERE "winner"='Robbie McEwen';
## Task Generate a SQL query to answer the following question: `How many stages were won by Robbie McEwen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "jersey_progress" ( "stage" real, "winner" text, "general_classification" text, "mountains_classification" text, "points_classification" text, "sprints_classification" text, "team_classification" text ); ### SQL Given the database schema, here is the SQL query that answers `How many stages were won by Robbie McEwen?`: ```sql
SELECT COUNT("car_num") FROM "nascar_sprint_cup_series_race_winners" WHERE "winning_driver"='Rusty Wallace';
## Task Generate a SQL query to answer the following question: `How many car numbers were listed for Rusty Wallace?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nascar_sprint_cup_series_race_winners" ( "season" real, "date" text, "winning_driver" text, "car_num" real, "sponsor" text, "make" text, "team" text, "avg_speed" text, "margin_of_victory" text ); ### SQL Given the database schema, here is the SQL query that answers `How many car numbers were listed for Rusty Wallace?`: ```sql
SELECT MAX("season") FROM "nascar_sprint_cup_series_race_winners" WHERE "winning_driver"='Rusty Wallace';
## Task Generate a SQL query to answer the following question: `In what season did Rusty Wallace win?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nascar_sprint_cup_series_race_winners" ( "season" real, "date" text, "winning_driver" text, "car_num" real, "sponsor" text, "make" text, "team" text, "avg_speed" text, "margin_of_victory" text ); ### SQL Given the database schema, here is the SQL query that answers `In what season did Rusty Wallace win?`: ```sql
SELECT "team" FROM "nascar_sprint_cup_series_race_winners" WHERE "date"='June 27';
## Task Generate a SQL query to answer the following question: `What was the represented team on June 27?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nascar_sprint_cup_series_race_winners" ( "season" real, "date" text, "winning_driver" text, "car_num" real, "sponsor" text, "make" text, "team" text, "avg_speed" text, "margin_of_victory" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the represented team on June 27?`: ```sql
SELECT "winning_driver" FROM "nascar_sprint_cup_series_race_winners" WHERE "team"='Hendrick Motorsports' AND "make"='Chevrolet Impala SS';
## Task Generate a SQL query to answer the following question: `Who was the winning driver for Hendrick Motorsports in a Chevrolet Impala SS?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nascar_sprint_cup_series_race_winners" ( "season" real, "date" text, "winning_driver" text, "car_num" real, "sponsor" text, "make" text, "team" text, "avg_speed" text, "margin_of_victory" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the winning driver for Hendrick Motorsports in a Chevrolet Impala SS?`: ```sql
SELECT "lost" FROM "second_division_final_table" WHERE "drawn"=10 AND "goals_for"=45;
## Task Generate a SQL query to answer the following question: `When 45 is the goals for and 10 is the drawn what is the lost?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_division_final_table" ( "position" real, "team" text, "played" real, "won" real, "drawn" real, "lost" real, "goals_for" real, "goals_against" real, "goal_difference" text, "points_1" text ); ### SQL Given the database schema, here is the SQL query that answers `When 45 is the goals for and 10 is the drawn what is the lost?`: ```sql
SELECT "goals_for" FROM "second_division_final_table" WHERE "goal_difference"='+10';
## Task Generate a SQL query to answer the following question: `When +10 is the goal difference what is the goals for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_division_final_table" ( "position" real, "team" text, "played" real, "won" real, "drawn" real, "lost" real, "goals_for" real, "goals_against" real, "goal_difference" text, "points_1" text ); ### SQL Given the database schema, here is the SQL query that answers `When +10 is the goal difference what is the goals for?`: ```sql
SELECT "points_1" FROM "second_division_final_table" WHERE "team"='Ellesmere Port & Neston';
## Task Generate a SQL query to answer the following question: `When ellesmere port & neston is the team what are the points 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_division_final_table" ( "position" real, "team" text, "played" real, "won" real, "drawn" real, "lost" real, "goals_for" real, "goals_against" real, "goal_difference" text, "points_1" text ); ### SQL Given the database schema, here is the SQL query that answers `When ellesmere port & neston is the team what are the points 1?`: ```sql
SELECT COUNT("driver") FROM "table1_1771753_3" WHERE "season"='2005';
## Task Generate a SQL query to answer the following question: `When 2005 is the season how many drivers are there?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1771753_3" ( "season" text, "date" text, "driver" text, "team" text, "chassis" text, "engine" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `When 2005 is the season how many drivers are there?`: ```sql
SELECT "average_speed_mph" FROM "table1_1771753_3" WHERE "driver"='Tony Kanaan';
## Task Generate a SQL query to answer the following question: `When tony kanaan is the driver what is the average speed miles per hour?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1771753_3" ( "season" text, "date" text, "driver" text, "team" text, "chassis" text, "engine" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `When tony kanaan is the driver what is the average speed miles per hour?`: ```sql
SELECT "chassis" FROM "table1_1771753_3" WHERE "average_speed_mph"='169.182';
## Task Generate a SQL query to answer the following question: `When 169.182 is the average speed miles per hour what is the chassis?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1771753_3" ( "season" text, "date" text, "driver" text, "team" text, "chassis" text, "engine" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `When 169.182 is the average speed miles per hour what is the chassis?`: ```sql
SELECT "miles_km" FROM "table1_1771753_3" WHERE "race_time"='1:34:01';
## Task Generate a SQL query to answer the following question: `When 1:34:01 is the race time what is the miles in kilometers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1771753_3" ( "season" text, "date" text, "driver" text, "team" text, "chassis" text, "engine" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `When 1:34:01 is the race time what is the miles in kilometers?`: ```sql
SELECT "race_time" FROM "table1_1771753_3" WHERE "team"='Chip Ganassi Racing' AND "laps"='228';
## Task Generate a SQL query to answer the following question: `When 228 is the lap and chip ganassi racing is the team what is the race time?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1771753_3" ( "season" text, "date" text, "driver" text, "team" text, "chassis" text, "engine" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `When 228 is the lap and chip ganassi racing is the team what is the race time?`: ```sql
SELECT MIN("tie_no") FROM "table1_17736890_5" WHERE "home_team"='Chelsea';
## Task Generate a SQL query to answer the following question: `What tie number featured Chelsea as the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17736890_5" ( "tie_no" real, "home_team" text, "score_1" text, "away_team" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What tie number featured Chelsea as the home team?`: ```sql
SELECT MAX("tie_no") FROM "table1_17736890_5" WHERE "away_team"='Leeds United';
## Task Generate a SQL query to answer the following question: `In what tie were Leeds United the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17736890_5" ( "tie_no" real, "home_team" text, "score_1" text, "away_team" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `In what tie were Leeds United the away team?`: ```sql
SELECT "home_team" FROM "table1_17736890_5" WHERE "away_team"='Burnley';
## Task Generate a SQL query to answer the following question: `Who was the home team when Burnley were the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17736890_5" ( "tie_no" real, "home_team" text, "score_1" text, "away_team" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `Who was the home team when Burnley were the away team?`: ```sql
SELECT MIN("year") FROM "women_s_doubles_10_4_titles_6_runner_ups";
## Task Generate a SQL query to answer the following question: `what is the lowest year represented?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the lowest year represented?`: ```sql
SELECT "score" FROM "women_s_doubles_10_4_titles_6_runner_ups" WHERE "partner"='Françoise Dürr';
## Task Generate a SQL query to answer the following question: `What was the score when Françoise Dürr was partner?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score when Françoise Dürr was partner?`: ```sql
SELECT "outcome" FROM "women_s_doubles_10_4_titles_6_runner_ups" WHERE "year"=1975;
## Task Generate a SQL query to answer the following question: `What was the outcome in 1975?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the outcome in 1975?`: ```sql
SELECT "surface" FROM "women_s_doubles_10_4_titles_6_runner_ups" WHERE "score"='6–4, 6–4';
## Task Generate a SQL query to answer the following question: `On what surface was the game played with a score of 6–4, 6–4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "women_s_doubles_10_4_titles_6_runner_ups" ( "outcome" text, "year" real, "championship" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `On what surface was the game played with a score of 6–4, 6–4?`: ```sql
SELECT "years_of_appearance" FROM "active_teams" WHERE "team"='Prince Albert Raiders';
## Task Generate a SQL query to answer the following question: `What is the year of appearance for the Prince Albert Raiders? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "active_teams" ( "tournament_appearances" real, "team" text, "league" text, "wins" real, "final_losses" real, "semi_final_losses" real, "fourth_place" real, "final_win_pct" text, "years_of_appearance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the year of appearance for the Prince Albert Raiders? `: ```sql
SELECT "wins" FROM "active_teams" WHERE "team"='Erie Otters';
## Task Generate a SQL query to answer the following question: `How many wins do the Erie Otters have? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "active_teams" ( "tournament_appearances" real, "team" text, "league" text, "wins" real, "final_losses" real, "semi_final_losses" real, "fourth_place" real, "final_win_pct" text, "years_of_appearance" text ); ### SQL Given the database schema, here is the SQL query that answers `How many wins do the Erie Otters have? `: ```sql
SELECT "final_win_pct" FROM "active_teams" WHERE "team"='Sault Ste. Marie Greyhounds';
## Task Generate a SQL query to answer the following question: `What is the final win percentage of the Sault Ste. Marie Greyhounds? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "active_teams" ( "tournament_appearances" real, "team" text, "league" text, "wins" real, "final_losses" real, "semi_final_losses" real, "fourth_place" real, "final_win_pct" text, "years_of_appearance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the final win percentage of the Sault Ste. Marie Greyhounds? `: ```sql
SELECT MAX("semi_final_losses") FROM "active_teams" WHERE "team"='Kitchener Rangers';
## Task Generate a SQL query to answer the following question: `What is the total number of semi-final losses for the Kitchener Rangers? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "active_teams" ( "tournament_appearances" real, "team" text, "league" text, "wins" real, "final_losses" real, "semi_final_losses" real, "fourth_place" real, "final_win_pct" text, "years_of_appearance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of semi-final losses for the Kitchener Rangers? `: ```sql
SELECT MAX("wins") FROM "active_teams" WHERE "team"='Red Deer Rebels';
## Task Generate a SQL query to answer the following question: `How many wins do the Red Deer Rebels have? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "active_teams" ( "tournament_appearances" real, "team" text, "league" text, "wins" real, "final_losses" real, "semi_final_losses" real, "fourth_place" real, "final_win_pct" text, "years_of_appearance" text ); ### SQL Given the database schema, here is the SQL query that answers `How many wins do the Red Deer Rebels have? `: ```sql
SELECT "record" FROM "regular_season" WHERE "date"='November 26, 1961';
## Task Generate a SQL query to answer the following question: `What is the record for November 26, 1961?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the record for November 26, 1961?`: ```sql
SELECT "game_site" FROM "regular_season" WHERE "opponent"='Dallas Texans';
## Task Generate a SQL query to answer the following question: `What was the game site against the Dallas Texans?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the game site against the Dallas Texans?`: ```sql
SELECT COUNT("year_s") FROM "commentators_and_spokespersons" WHERE "final_television_commentator"='Tom Fleming';
## Task Generate a SQL query to answer the following question: `In how many years was Tom Fleming the final television commentator? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "commentators_and_spokespersons" ( "year_s" real, "final_television_commentator" text, "radio_commentator" text, "spokesperson" text, "semi_final_television_commentator" text, "semi_final_second_television_commentator" text ); ### SQL Given the database schema, here is the SQL query that answers `In how many years was Tom Fleming the final television commentator? `: ```sql
SELECT MAX("year_s") FROM "commentators_and_spokespersons" WHERE "spokesperson"='Colin Berry';
## Task Generate a SQL query to answer the following question: `What was the latest year that Colin Berry was the spokesperson? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "commentators_and_spokespersons" ( "year_s" real, "final_television_commentator" text, "radio_commentator" text, "spokesperson" text, "semi_final_television_commentator" text, "semi_final_second_television_commentator" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the latest year that Colin Berry was the spokesperson? `: ```sql
SELECT "semi_final_television_commentator" FROM "commentators_and_spokespersons" WHERE "spokesperson"='Colin Berry' AND "final_television_commentator"='Pete Murray';
## Task Generate a SQL query to answer the following question: `Who was the semi-final television commentator when the spokesperson was Colin Berry and the final television commentator was Pete Murray?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "commentators_and_spokespersons" ( "year_s" real, "final_television_commentator" text, "radio_commentator" text, "spokesperson" text, "semi_final_television_commentator" text, "semi_final_second_television_commentator" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the semi-final television commentator when the spokesperson was Colin Berry and the final television commentator was Pete Murray?`: ```sql
SELECT "radio_commentator" FROM "commentators_and_spokespersons" WHERE "final_television_commentator"='John Dunn';
## Task Generate a SQL query to answer the following question: `Who was the radio commentator when the final television commentator was John Dunn? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "commentators_and_spokespersons" ( "year_s" real, "final_television_commentator" text, "radio_commentator" text, "spokesperson" text, "semi_final_television_commentator" text, "semi_final_second_television_commentator" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the radio commentator when the final television commentator was John Dunn? `: ```sql
SELECT MAX("year_s") FROM "commentators_and_spokespersons" WHERE "final_television_commentator"='David Jacobs';
## Task Generate a SQL query to answer the following question: `What is the latest year that the final television commentator was David Jacobs? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "commentators_and_spokespersons" ( "year_s" real, "final_television_commentator" text, "radio_commentator" text, "spokesperson" text, "semi_final_television_commentator" text, "semi_final_second_television_commentator" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the latest year that the final television commentator was David Jacobs? `: ```sql
SELECT "record" FROM "regular_season" WHERE "attendance"=14489;
## Task Generate a SQL query to answer the following question: `What was their record when the attendance at the game was 14489?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What was their record when the attendance at the game was 14489?`: ```sql
SELECT "date" FROM "regular_season" WHERE "game_site"='Cotton Bowl';
## Task Generate a SQL query to answer the following question: `When did they play at the Cotton Bowl?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `When did they play at the Cotton Bowl?`: ```sql
SELECT "per_cent_age" FROM "external_links" WHERE "abbre_viation"='Nor';
## Task Generate a SQL query to answer the following question: `What is the percentage of this constellation abbreviated as 'nor'?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "external_links" ( "rank" real, "family" text, "abbre_viation" text, "constellation" text, "area_sq_deg" text, "area_msr" text, "per_cent_age" text, "right_ascension_hm" text, "decli_nation_dm" text, "quad" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the percentage of this constellation abbreviated as 'nor'?`: ```sql
SELECT COUNT("right_ascension_hm") FROM "external_links" WHERE "abbre_viation"='Oph';
## Task Generate a SQL query to answer the following question: `This constellation, abbreviated as 'oph' has how many right ascension (in hm)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "external_links" ( "rank" real, "family" text, "abbre_viation" text, "constellation" text, "area_sq_deg" text, "area_msr" text, "per_cent_age" text, "right_ascension_hm" text, "decli_nation_dm" text, "quad" text ); ### SQL Given the database schema, here is the SQL query that answers `This constellation, abbreviated as 'oph' has how many right ascension (in hm)?`: ```sql
SELECT "constellation" FROM "external_links" WHERE "area_sq_deg"='245.375';
## Task Generate a SQL query to answer the following question: `What is the name of this constellation with an area of 245.375 sq. deg.?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "external_links" ( "rank" real, "family" text, "abbre_viation" text, "constellation" text, "area_sq_deg" text, "area_msr" text, "per_cent_age" text, "right_ascension_hm" text, "decli_nation_dm" text, "quad" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of this constellation with an area of 245.375 sq. deg.?`: ```sql
SELECT COUNT("per_cent_age") FROM "external_links" WHERE "rank"=51;
## Task Generate a SQL query to answer the following question: `This constellation with a ranking of 51 has how many percentages on record?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "external_links" ( "rank" real, "family" text, "abbre_viation" text, "constellation" text, "area_sq_deg" text, "area_msr" text, "per_cent_age" text, "right_ascension_hm" text, "decli_nation_dm" text, "quad" text ); ### SQL Given the database schema, here is the SQL query that answers `This constellation with a ranking of 51 has how many percentages on record?`: ```sql
SELECT "per_cent_age" FROM "external_links" WHERE "area_sq_deg"='248.885';
## Task Generate a SQL query to answer the following question: `What is the percentage of this constellation with an area of 248.885 sq. deg.?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "external_links" ( "rank" real, "family" text, "abbre_viation" text, "constellation" text, "area_sq_deg" text, "area_msr" text, "per_cent_age" text, "right_ascension_hm" text, "decli_nation_dm" text, "quad" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the percentage of this constellation with an area of 248.885 sq. deg.?`: ```sql
SELECT "broadcast_date" FROM "table1_1776943_1" WHERE "viewers_in_millions"='6.4' AND "archive"='16mm t/r';
## Task Generate a SQL query to answer the following question: `Name the broadcast date for 6.4 million viewers for the archive of 16mm t/r` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1776943_1" ( "episode" text, "broadcast_date" text, "run_time" text, "viewers_in_millions" text, "archive" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the broadcast date for 6.4 million viewers for the archive of 16mm t/r`: ```sql
SELECT "archive" FROM "table1_1776943_1" WHERE "run_time"='24:04';
## Task Generate a SQL query to answer the following question: `Name the archive where run time 24:04` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1776943_1" ( "episode" text, "broadcast_date" text, "run_time" text, "viewers_in_millions" text, "archive" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the archive where run time 24:04`: ```sql
SELECT "game_site" FROM "regular_season" WHERE "date"='November 1, 1964';
## Task Generate a SQL query to answer the following question: `On November 1, 1964, where was the game site?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `On November 1, 1964, where was the game site?`: ```sql
SELECT "attendance" FROM "regular_season" WHERE "week"=8;
## Task Generate a SQL query to answer the following question: `How many people attended the Week 8 game when Denver played Buffalo?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `How many people attended the Week 8 game when Denver played Buffalo?`: ```sql
SELECT COUNT("record") FROM "regular_season" WHERE "opponent"='Dallas Texans';
## Task Generate a SQL query to answer the following question: `How many times did the Denver Broncos face the Dallas Texans this season?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `How many times did the Denver Broncos face the Dallas Texans this season?`: ```sql
SELECT MAX("year") FROM "table1_17801022_1" WHERE "race_time"='1:55:13';
## Task Generate a SQL query to answer the following question: `What year was the winning race time 1:55:13?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17801022_1" ( "year" real, "date" text, "driver" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text ); ### SQL Given the database schema, here is the SQL query that answers `What year was the winning race time 1:55:13?`: ```sql
SELECT "race_time" FROM "table1_17801022_1" WHERE "average_speed_mph"='113.835';
## Task Generate a SQL query to answer the following question: `For races with an average speed of 113.835 mph, what are the winning race times?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17801022_1" ( "year" real, "date" text, "driver" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text ); ### SQL Given the database schema, here is the SQL query that answers `For races with an average speed of 113.835 mph, what are the winning race times?`: ```sql
SELECT "manufacturer" FROM "table1_17801022_1" WHERE "date"='November 2';
## Task Generate a SQL query to answer the following question: `What manufacturer won the race on November 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17801022_1" ( "year" real, "date" text, "driver" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text ); ### SQL Given the database schema, here is the SQL query that answers `What manufacturer won the race on November 2?`: ```sql
SELECT "date" FROM "table1_17801022_1" WHERE "driver"='Jamie McMurray';
## Task Generate a SQL query to answer the following question: `What date did Jamie McMurray win the race?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17801022_1" ( "year" real, "date" text, "driver" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text ); ### SQL Given the database schema, here is the SQL query that answers `What date did Jamie McMurray win the race?`: ```sql
SELECT "date" FROM "table1_17801022_1" WHERE "race_time"='1:55:13';
## Task Generate a SQL query to answer the following question: `What was the date of the race with a winning time of 1:55:13?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17801022_1" ( "year" real, "date" text, "driver" text, "manufacturer" text, "laps" real, "miles_km" text, "race_time" text, "average_speed_mph" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the date of the race with a winning time of 1:55:13?`: ```sql
SELECT "team" FROM "table1_17802778_1" WHERE "average_speed_mph"='138.14';
## Task Generate a SQL query to answer the following question: `What team(s) enjoyed an average spped (mph) of 138.14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17802778_1" ( "year" real, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text ); ### SQL Given the database schema, here is the SQL query that answers `What team(s) enjoyed an average spped (mph) of 138.14?`: ```sql
SELECT "laps" FROM "table1_17802778_1" WHERE "year"=2001;
## Task Generate a SQL query to answer the following question: `How many laps recorded in 2001?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17802778_1" ( "year" real, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text ); ### SQL Given the database schema, here is the SQL query that answers `How many laps recorded in 2001?`: ```sql
SELECT "team" FROM "table1_17802778_1" WHERE "year"=2003;
## Task Generate a SQL query to answer the following question: `What team(s) were in 2003?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_17802778_1" ( "year" real, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text ); ### SQL Given the database schema, here is the SQL query that answers `What team(s) were in 2003?`: ```sql