output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "date_of_birth" FROM "ghanaian_presidents_ages" WHERE "num"=2;
## Task Generate a SQL query to answer the following question: `what's the date of birth with # being 2` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ghanaian_presidents_ages" ( "num" real, "president" text, "date_of_birth" text, "date_of_inauguration" text, "age_at_inauguration" text, "end_of_term" text, "length_of_retirement" text, "date_of_death" text, "lifespan" text ); ### SQL Given the database schema, here is the SQL query that answers `what's the date of birth with # being 2`: ```sql
SELECT COUNT("end_of_term") FROM "ghanaian_presidents_ages" WHERE "age_at_inauguration"='64-066 64years, 66days';
## Task Generate a SQL query to answer the following question: ` how many end of term with age at inauguration being 64-066 64years, 66days` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ghanaian_presidents_ages" ( "num" real, "president" text, "date_of_birth" text, "date_of_inauguration" text, "age_at_inauguration" text, "end_of_term" text, "length_of_retirement" text, "date_of_death" text, "lifespan" text ); ### SQL Given the database schema, here is the SQL query that answers ` how many end of term with age at inauguration being 64-066 64years, 66days`: ```sql
SELECT "winning_pitcher" FROM "lone_star_series" WHERE "date"='June 25';
## Task Generate a SQL query to answer the following question: `Who was the winning pitcher on june 25?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lone_star_series" ( "date" text, "winning_team" text, "score" text, "winning_pitcher" text, "losing_pitcher" text, "attendance" real, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the winning pitcher on june 25?`: ```sql
SELECT COUNT("attendance") FROM "lone_star_series" WHERE "date"='May 20';
## Task Generate a SQL query to answer the following question: `How many games were on May 20?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lone_star_series" ( "date" text, "winning_team" text, "score" text, "winning_pitcher" text, "losing_pitcher" text, "attendance" real, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `How many games were on May 20?`: ```sql
SELECT "losing_pitcher" FROM "lone_star_series" WHERE "winning_pitcher"='Roy Oswalt';
## Task Generate a SQL query to answer the following question: `Who is the losing pitcher when the winning pitcher is roy oswalt?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lone_star_series" ( "date" text, "winning_team" text, "score" text, "winning_pitcher" text, "losing_pitcher" text, "attendance" real, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the losing pitcher when the winning pitcher is roy oswalt?`: ```sql
SELECT "winning_pitcher" FROM "lone_star_series" WHERE "attendance"=38109;
## Task Generate a SQL query to answer the following question: `Who is the winning pitcher when attendance is 38109?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lone_star_series" ( "date" text, "winning_team" text, "score" text, "winning_pitcher" text, "losing_pitcher" text, "attendance" real, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the winning pitcher when attendance is 38109?`: ```sql
SELECT COUNT("nhl_team") FROM "round_two" WHERE "player"='Terry French';
## Task Generate a SQL query to answer the following question: `How many NHL teams does Terry French play for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_two" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `How many NHL teams does Terry French play for?`: ```sql
SELECT "player" FROM "round_two" WHERE "nhl_team"='New York Rangers';
## Task Generate a SQL query to answer the following question: `Who's the player for the New York Rangers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_two" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Who's the player for the New York Rangers?`: ```sql
SELECT COUNT("position") FROM "round_two" WHERE "nhl_team"='Chicago Black Hawks';
## Task Generate a SQL query to answer the following question: `How many positions do the players of Chicago Black Hawks play in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_two" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `How many positions do the players of Chicago Black Hawks play in?`: ```sql
SELECT "nationality" FROM "round_two" WHERE "nhl_team"='Buffalo Sabres';
## Task Generate a SQL query to answer the following question: `What is the nationality of the player from Buffalo Sabres?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_two" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality of the player from Buffalo Sabres?`: ```sql
SELECT "position" FROM "round_two" WHERE "college_junior_club_team"='Peterborough Petes (OHA)';
## Task Generate a SQL query to answer the following question: `What position does the player from Peterborough Petes (OHA) play on?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_two" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does the player from Peterborough Petes (OHA) play on?`: ```sql
SELECT COUNT("pick_num") FROM "round_two" WHERE "player"='Dave Fortier';
## Task Generate a SQL query to answer the following question: `What's Dave Fortier's pick number?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_two" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What's Dave Fortier's pick number?`: ```sql
SELECT "college_junior_club_team" FROM "round_four" WHERE "player"='George Hulme';
## Task Generate a SQL query to answer the following question: `What team does George Hulme play for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What team does George Hulme play for?`: ```sql
SELECT "position" FROM "round_four" WHERE "player"='Neil Komadoski';
## Task Generate a SQL query to answer the following question: `What position does Neil Komadoski play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does Neil Komadoski play?`: ```sql
SELECT "college_junior_club_team" FROM "round_five" WHERE "player"='Mike McNiven';
## Task Generate a SQL query to answer the following question: `where is team player mike mcniven played for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_five" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `where is team player mike mcniven played for?`: ```sql
SELECT "college_junior_club_team" FROM "round_five" WHERE "nhl_team"='Chicago Black Hawks';
## Task Generate a SQL query to answer the following question: `what college has nhl team chicago black hawks?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_five" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `what college has nhl team chicago black hawks?`: ```sql
SELECT "college_junior_club_team" FROM "round_five" WHERE "nhl_team"='Chicago Black Hawks';
## Task Generate a SQL query to answer the following question: `what is the college that has the nhl chicago black hawks?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_five" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the college that has the nhl chicago black hawks?`: ```sql
SELECT "player" FROM "round_five" WHERE "nationality"='Canada' AND "pick_num"=65;
## Task Generate a SQL query to answer the following question: `who is the player with the nationality of canada and pick # is 65?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_five" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `who is the player with the nationality of canada and pick # is 65?`: ```sql
SELECT COUNT("nhl_team") FROM "round_three" WHERE "player"='Bob Peppler';
## Task Generate a SQL query to answer the following question: `How many teams did Bob Peppler play for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_three" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `How many teams did Bob Peppler play for?`: ```sql
SELECT "position" FROM "round_three" WHERE "nhl_team"='Philadelphia Flyers';
## Task Generate a SQL query to answer the following question: `What is the position listed for the team the Philadelphia Flyers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_three" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the position listed for the team the Philadelphia Flyers?`: ```sql
SELECT COUNT("nationality") FROM "round_three" WHERE "player"='Glen Irwin';
## Task Generate a SQL query to answer the following question: `How many nationalities are listed for the player Glen Irwin?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_three" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `How many nationalities are listed for the player Glen Irwin?`: ```sql
SELECT "player" FROM "round_seven" WHERE "position"='Centre' AND "nhl_team"='New York Rangers';
## Task Generate a SQL query to answer the following question: `Which players have the position of centre and play for the nhl team new york rangers` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which players have the position of centre and play for the nhl team new york rangers`: ```sql
SELECT "nhl_team" FROM "round_seven" WHERE "college_junior_club_team"='University of Notre Dame (NCAA)';
## Task Generate a SQL query to answer the following question: `Which nhl team has a college/junior/club team named university of notre dame (ncaa)` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which nhl team has a college/junior/club team named university of notre dame (ncaa)`: ```sql
SELECT "position" FROM "round_seven" WHERE "player"='Al Simmons';
## Task Generate a SQL query to answer the following question: `what are all the position where player is al simmons` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `what are all the position where player is al simmons`: ```sql
SELECT "nationality" FROM "round_seven" WHERE "pick_num"=89;
## Task Generate a SQL query to answer the following question: `What nationality is pick # 89` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What nationality is pick # 89`: ```sql
SELECT "college_junior_club_team" FROM "round_seven" WHERE "nationality"='Canada' AND "nhl_team"='Minnesota North Stars';
## Task Generate a SQL query to answer the following question: `Which college/junior/club teams nationality is canada and nhl team is minnesota north stars` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which college/junior/club teams nationality is canada and nhl team is minnesota north stars`: ```sql
SELECT COUNT("pick_num") FROM "round_seven" WHERE "nhl_team"='Philadelphia Flyers';
## Task Generate a SQL query to answer the following question: `what is the total number of pick # where nhl team is philadelphia flyers` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_seven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the total number of pick # where nhl team is philadelphia flyers`: ```sql
SELECT "nationality" FROM "round_six" WHERE "nhl_team"='Detroit Red Wings';
## Task Generate a SQL query to answer the following question: `What is the nationality of the player from the Detroit Red Wings?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_six" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality of the player from the Detroit Red Wings?`: ```sql
SELECT "position" FROM "round_six" WHERE "player"='Jim Johnston';
## Task Generate a SQL query to answer the following question: `What position does Jim Johnston play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_six" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does Jim Johnston play?`: ```sql
SELECT "nhl_team" FROM "round_six" WHERE "player"='Pierre Duguay';
## Task Generate a SQL query to answer the following question: `Which team does Pierre Duguay play for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_six" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which team does Pierre Duguay play for?`: ```sql
SELECT "nationality" FROM "round_six" WHERE "position"='Goaltender';
## Task Generate a SQL query to answer the following question: `What country does the goaltender come from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_six" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What country does the goaltender come from?`: ```sql
SELECT "writer" FROM "table1_12148018_2" WHERE "viewers"='5.16m';
## Task Generate a SQL query to answer the following question: ` who is the writer where viewers is 5.16m` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12148018_2" ( "num" real, "episode" text, "director" text, "writer" text, "original_airdate" text, "viewers" text ); ### SQL Given the database schema, here is the SQL query that answers ` who is the writer where viewers is 5.16m`: ```sql
SELECT "writer" FROM "table1_12148018_2" WHERE "episode"='\"Episode 7\"';
## Task Generate a SQL query to answer the following question: ` who is the writer for episode "episode 7"` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12148018_2" ( "num" real, "episode" text, "director" text, "writer" text, "original_airdate" text, "viewers" text ); ### SQL Given the database schema, here is the SQL query that answers ` who is the writer for episode "episode 7"`: ```sql
SELECT "league" FROM "year_by_year" WHERE "open_cup"='Quarter Finals';
## Task Generate a SQL query to answer the following question: `For which league is the open cup the quarter finals` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" real, "division" text, "league" text, "regular_season" text, "playoffs" text, "open_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `For which league is the open cup the quarter finals`: ```sql
SELECT "open_cup" FROM "year_by_year" WHERE "year"=2002;
## Task Generate a SQL query to answer the following question: `What open cups where played in 2002` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" real, "division" text, "league" text, "regular_season" text, "playoffs" text, "open_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `What open cups where played in 2002`: ```sql
SELECT "league" FROM "year_by_year" WHERE "division"='3';
## Task Generate a SQL query to answer the following question: `What leagues includes division 3` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" real, "division" text, "league" text, "regular_season" text, "playoffs" text, "open_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `What leagues includes division 3`: ```sql
SELECT "playoffs" FROM "year_by_year" WHERE "regular_season"='7th, Southeast';
## Task Generate a SQL query to answer the following question: `What was the result of the playoffs when the regular season was 7th, southeast` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" real, "division" text, "league" text, "regular_season" text, "playoffs" text, "open_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the result of the playoffs when the regular season was 7th, southeast`: ```sql
SELECT "original_air_date" FROM "table1_12159115_2" WHERE "production_code"='2T6719';
## Task Generate a SQL query to answer the following question: `What's the original air date of the episode with production code 2T6719?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12159115_2" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the original air date of the episode with production code 2T6719?`: ```sql
SELECT "written_by" FROM "table1_12159115_2" WHERE "u_s_viewers_millions"='12.13';
## Task Generate a SQL query to answer the following question: `Who's the writer of the episode see by 12.13 million US viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12159115_2" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `Who's the writer of the episode see by 12.13 million US viewers?`: ```sql
SELECT COUNT("title") FROM "table1_12159115_2" WHERE "production_code"='2T6705';
## Task Generate a SQL query to answer the following question: `What's the total number of episodes with production code 2T6705?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12159115_2" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the total number of episodes with production code 2T6705?`: ```sql
SELECT COUNT("directed_by") FROM "table1_12159115_2" WHERE "u_s_viewers_millions"='11.34';
## Task Generate a SQL query to answer the following question: `What's the total number of directors who've directed episodes seen by 11.34 million US viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12159115_2" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the total number of directors who've directed episodes seen by 11.34 million US viewers?`: ```sql
SELECT "production_code" FROM "table1_12159115_2" WHERE "u_s_viewers_millions"='11.64';
## Task Generate a SQL query to answer the following question: `What's the production code of the episode seen by 11.64 million US viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12159115_2" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the production code of the episode seen by 11.64 million US viewers?`: ```sql
SELECT "season" FROM "nations_cup" WHERE "winner"='Norway' AND "winner_women"='Russia';
## Task Generate a SQL query to answer the following question: `What is the season where the winner is norway and the winner women is russia?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nations_cup" ( "season" text, "winner" text, "runner_up" text, "third" text, "winner_men" text, "winner_women" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the season where the winner is norway and the winner women is russia?`: ```sql
SELECT "winner_women" FROM "nations_cup" WHERE "third"='Italy' AND "runner_up"='Finland';
## Task Generate a SQL query to answer the following question: `What is the winner women and third is italy and runner-up is finland?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nations_cup" ( "season" text, "winner" text, "runner_up" text, "third" text, "winner_men" text, "winner_women" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the winner women and third is italy and runner-up is finland?`: ```sql
SELECT COUNT("runner_up") FROM "nations_cup" WHERE "winner_women"='Norway' AND "third"='Sweden';
## Task Generate a SQL query to answer the following question: `What is the number of runner up when the winner of women is norway and third is sweden?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nations_cup" ( "season" text, "winner" text, "runner_up" text, "third" text, "winner_men" text, "winner_women" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of runner up when the winner of women is norway and third is sweden?`: ```sql
SELECT "report" FROM "drivers_standings" WHERE "fastest_lap"='Felipe Massa' AND "winning_driver"='Jenson Button';
## Task Generate a SQL query to answer the following question: `what's the report with fastest lap being felipe massa and winning driver being jenson button` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drivers_standings" ( "rd" real, "grand_prix" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `what's the report with fastest lap being felipe massa and winning driver being jenson button`: ```sql
SELECT "grand_prix" FROM "drivers_standings" WHERE "winning_driver"='Jenson Button';
## Task Generate a SQL query to answer the following question: `what's the grand prix with winning driver being jenson button` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drivers_standings" ( "rd" real, "grand_prix" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `what's the grand prix with winning driver being jenson button`: ```sql
SELECT "pole_position" FROM "drivers_standings" WHERE "grand_prix"='Italian Grand Prix';
## Task Generate a SQL query to answer the following question: `who is the the pole position with grand prix being italian grand prix` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drivers_standings" ( "rd" real, "grand_prix" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `who is the the pole position with grand prix being italian grand prix`: ```sql
SELECT "fastest_lap" FROM "drivers_standings" WHERE "grand_prix"='European Grand Prix';
## Task Generate a SQL query to answer the following question: `who is the the fastest lap with grand prix being european grand prix` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drivers_standings" ( "rd" real, "grand_prix" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `who is the the fastest lap with grand prix being european grand prix`: ```sql
SELECT "u_s_viewers_millions" FROM "table1_12159115_3" WHERE "directed_by"='Tawnia McKiernan';
## Task Generate a SQL query to answer the following question: `How many viewers, in millions, were for the episode directed by Tawnia McKiernan?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12159115_3" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many viewers, in millions, were for the episode directed by Tawnia McKiernan?`: ```sql
SELECT COUNT("series_num") FROM "table1_12159115_3" WHERE "written_by"='William N. Fordes';
## Task Generate a SQL query to answer the following question: `How many episodes were written only by William N. Fordes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12159115_3" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many episodes were written only by William N. Fordes?`: ```sql
SELECT "u_s_viewers_millions" FROM "table1_12159115_3" WHERE "series_num"=26;
## Task Generate a SQL query to answer the following question: `How many U.S Viewers, in millions, were for series # 26?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12159115_3" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many U.S Viewers, in millions, were for series # 26?`: ```sql
SELECT "third_year" FROM "table1_12148147_2" WHERE "subjects"='Science';
## Task Generate a SQL query to answer the following question: `What is the third year course in science?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12148147_2" ( "subjects" text, "first_year" text, "second_year" text, "third_year" text, "fourth_year" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the third year course in science?`: ```sql
SELECT "second_year" FROM "table1_12148147_2" WHERE "first_year"='Pag-unawa';
## Task Generate a SQL query to answer the following question: `What is the second year class following pag-unawa?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12148147_2" ( "subjects" text, "first_year" text, "second_year" text, "third_year" text, "fourth_year" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the second year class following pag-unawa?`: ```sql
SELECT COUNT("third_year") FROM "table1_12148147_2" WHERE "first_year"='Pag-unawa';
## Task Generate a SQL query to answer the following question: `How many classes are taken in the third year when pag-unawa was taken in the first year?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12148147_2" ( "subjects" text, "first_year" text, "second_year" text, "third_year" text, "fourth_year" text ); ### SQL Given the database schema, here is the SQL query that answers `How many classes are taken in the third year when pag-unawa was taken in the first year?`: ```sql
SELECT "first_year" FROM "table1_12148147_2" WHERE "third_year"='Geometry';
## Task Generate a SQL query to answer the following question: `What is the first year course in the program where geometry is taken in the third year?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12148147_2" ( "subjects" text, "first_year" text, "second_year" text, "third_year" text, "fourth_year" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the first year course in the program where geometry is taken in the third year?`: ```sql
SELECT "second_year" FROM "table1_12148147_2" WHERE "fourth_year"='Physics';
## Task Generate a SQL query to answer the following question: `What is the second year course in the program where physics is taken in the fourth year?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12148147_2" ( "subjects" text, "first_year" text, "second_year" text, "third_year" text, "fourth_year" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the second year course in the program where physics is taken in the fourth year?`: ```sql
SELECT "womens_singles" FROM "previous_winners" WHERE "mens_singles"='Jonas Lyduch';
## Task Generate a SQL query to answer the following question: `Who won the womens singles event the year that Jonas Lyduch won?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won the womens singles event the year that Jonas Lyduch won?`: ```sql
SELECT "mens_doubles" FROM "previous_winners" WHERE "womens_singles"='Alison Humby';
## Task Generate a SQL query to answer the following question: `Who won the mens doubles the year Alison Humby won the womens singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won the mens doubles the year Alison Humby won the womens singles?`: ```sql
SELECT "308_winchester_cartridge_type" FROM "design_details" WHERE "300_m_group_mm"='38';
## Task Generate a SQL query to answer the following question: `What are all the .308 Winchester cartridge types with 38 for the 300 m group (mm)` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "design_details" ( "308_winchester_cartridge_type" text, "100_m_group_mm" text, "100_m_group_moa" text, "300_m_group_mm" text, "300_m_group_moa" text ); ### SQL Given the database schema, here is the SQL query that answers `What are all the .308 Winchester cartridge types with 38 for the 300 m group (mm)`: ```sql
SELECT "100_m_group_moa" FROM "design_details" WHERE "300_m_group_moa"='0.63';
## Task Generate a SQL query to answer the following question: `For which 100 m group ( moa ) is the 300 m group ( moa ) 0.63` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "design_details" ( "308_winchester_cartridge_type" text, "100_m_group_mm" text, "100_m_group_moa" text, "300_m_group_mm" text, "300_m_group_moa" text ); ### SQL Given the database schema, here is the SQL query that answers `For which 100 m group ( moa ) is the 300 m group ( moa ) 0.63`: ```sql
SELECT "300_m_group_mm" FROM "design_details" WHERE "308_winchester_cartridge_type"='RUAG Swiss P Target 168 gr HP-BT';
## Task Generate a SQL query to answer the following question: `What are all the 300 m group (mm) with a .308 winchester cartridge type of ruag swiss p target 168 gr hp-bt` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "design_details" ( "308_winchester_cartridge_type" text, "100_m_group_mm" text, "100_m_group_moa" text, "300_m_group_mm" text, "300_m_group_moa" text ); ### SQL Given the database schema, here is the SQL query that answers `What are all the 300 m group (mm) with a .308 winchester cartridge type of ruag swiss p target 168 gr hp-bt`: ```sql
SELECT "308_winchester_cartridge_type" FROM "design_details" WHERE "300_m_group_moa"='0.51';
## Task Generate a SQL query to answer the following question: `For which .308 winchester cartridge type is the 300 m group ( moa ) 0.51` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "design_details" ( "308_winchester_cartridge_type" text, "100_m_group_mm" text, "100_m_group_moa" text, "300_m_group_mm" text, "300_m_group_moa" text ); ### SQL Given the database schema, here is the SQL query that answers `For which .308 winchester cartridge type is the 300 m group ( moa ) 0.51`: ```sql
SELECT "300_m_group_moa" FROM "design_details" WHERE "300_m_group_mm"='45';
## Task Generate a SQL query to answer the following question: `For which 300 m group ( moa ) is the 300 m group (mm) 45` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "design_details" ( "308_winchester_cartridge_type" text, "100_m_group_mm" text, "100_m_group_moa" text, "300_m_group_mm" text, "300_m_group_moa" text ); ### SQL Given the database schema, here is the SQL query that answers `For which 300 m group ( moa ) is the 300 m group (mm) 45`: ```sql
SELECT "100_m_group_mm" FROM "design_details" WHERE "308_winchester_cartridge_type"='.300 Winchester Magnum cartridge type';
## Task Generate a SQL query to answer the following question: `What are all the 100 m group (mm) with a .308 winchester cartridge type of .300 winchester magnum cartridge type` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "design_details" ( "308_winchester_cartridge_type" text, "100_m_group_mm" text, "100_m_group_moa" text, "300_m_group_mm" text, "300_m_group_moa" text ); ### SQL Given the database schema, here is the SQL query that answers `What are all the 100 m group (mm) with a .308 winchester cartridge type of .300 winchester magnum cartridge type`: ```sql
SELECT COUNT("year") FROM "previous_winners" WHERE "mens_singles"='Peter Mikkelsen';
## Task Generate a SQL query to answer the following question: `How many years did Peter Mikkelsen win the Mens Singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `How many years did Peter Mikkelsen win the Mens Singles?`: ```sql
SELECT "mens_doubles" FROM "previous_winners" WHERE "womens_singles"='Karina de Wit';
## Task Generate a SQL query to answer the following question: `Who won the Men's Doubles when Karina de Wit won the Women's Singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won the Men's Doubles when Karina de Wit won the Women's Singles?`: ```sql
SELECT COUNT("mixed_doubles") FROM "previous_winners" WHERE "mens_singles"='Oliver Pongratz';
## Task Generate a SQL query to answer the following question: `How many Mixed Doubles won when Oliver Pongratz won the Men's Singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `How many Mixed Doubles won when Oliver Pongratz won the Men's Singles?`: ```sql
SELECT "mens_doubles" FROM "previous_winners" WHERE "womens_singles"='Guo Xin';
## Task Generate a SQL query to answer the following question: `Who won the Men's Doubles when Guo Xin won the Women's Singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "previous_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won the Men's Doubles when Guo Xin won the Women's Singles?`: ```sql
SELECT "college" FROM "round_one" WHERE "player"='Dennis Byrd';
## Task Generate a SQL query to answer the following question: `Which college did Dennis Byrd come from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_one" ( "overall_pick_num" real, "afl_team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Which college did Dennis Byrd come from?`: ```sql
SELECT "afl_team" FROM "round_one" WHERE "player"='Bob Johnson';
## Task Generate a SQL query to answer the following question: `Bob Johnson plays for which AFL team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_one" ( "overall_pick_num" real, "afl_team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Bob Johnson plays for which AFL team?`: ```sql
SELECT "position" FROM "round_one" WHERE "afl_team"='Cincinnati Bengals';
## Task Generate a SQL query to answer the following question: `What position does the Cincinnati Bengals' player have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_one" ( "overall_pick_num" real, "afl_team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does the Cincinnati Bengals' player have?`: ```sql
SELECT "position" FROM "round_one" WHERE "college"='Syracuse';
## Task Generate a SQL query to answer the following question: `What position does Syracuse's player have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_one" ( "overall_pick_num" real, "afl_team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does Syracuse's player have?`: ```sql
SELECT "college" FROM "round_one" WHERE "afl_team"='Cincinnati Bengals';
## Task Generate a SQL query to answer the following question: `What college did the Cincinnati Bengals' player come from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_one" ( "overall_pick_num" real, "afl_team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What college did the Cincinnati Bengals' player come from?`: ```sql
SELECT "pinyin" FROM "contents" WHERE "translation"='Explaining Music';
## Task Generate a SQL query to answer the following question: `What is the pinyin for explaining music?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "contents" ( "chapter" real, "chinese" text, "pinyin" text, "translation" text, "subject" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the pinyin for explaining music?`: ```sql
SELECT COUNT("subject") FROM "contents" WHERE "pinyin"='Shixun';
## Task Generate a SQL query to answer the following question: `How many subjects have the pinyin shixun?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "contents" ( "chapter" real, "chinese" text, "pinyin" text, "translation" text, "subject" text ); ### SQL Given the database schema, here is the SQL query that answers `How many subjects have the pinyin shixun?`: ```sql
SELECT "pinyin" FROM "contents" WHERE "translation"='Explaining Beasts';
## Task Generate a SQL query to answer the following question: `What is the pinyin for explaining beasts?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "contents" ( "chapter" real, "chinese" text, "pinyin" text, "translation" text, "subject" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the pinyin for explaining beasts?`: ```sql
SELECT COUNT("pinyin") FROM "contents" WHERE "chinese"='釋蟲';
## Task Generate a SQL query to answer the following question: `How many pinyin transaltions are available for the chinese phrase 釋蟲?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "contents" ( "chapter" real, "chinese" text, "pinyin" text, "translation" text, "subject" text ); ### SQL Given the database schema, here is the SQL query that answers `How many pinyin transaltions are available for the chinese phrase 釋蟲?`: ```sql
SELECT MIN("chapter") FROM "contents" WHERE "pinyin"='Shiqiu';
## Task Generate a SQL query to answer the following question: `What chapter number is Shiqiu?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "contents" ( "chapter" real, "chinese" text, "pinyin" text, "translation" text, "subject" text ); ### SQL Given the database schema, here is the SQL query that answers `What chapter number is Shiqiu?`: ```sql
SELECT COUNT("mens_doubles") FROM "past_winners" WHERE "womens_doubles"='Catrine Bengtsson Margit Borg';
## Task Generate a SQL query to answer the following question: `How many mens doubles when womens doubles is catrine bengtsson margit borg?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `How many mens doubles when womens doubles is catrine bengtsson margit borg?`: ```sql
SELECT "mens_doubles" FROM "past_winners" WHERE "womens_doubles"='Anastasia Chervyakova Romina Gabdullina';
## Task Generate a SQL query to answer the following question: `Who is the mens doubles when womens doubles is anastasia chervyakova romina gabdullina?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the mens doubles when womens doubles is anastasia chervyakova romina gabdullina?`: ```sql
SELECT "mens_doubles" FROM "past_winners" WHERE "mens_singles"='Flemming Delfs';
## Task Generate a SQL query to answer the following question: `Who is themens doubles when the mens singles is flemming delfs?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is themens doubles when the mens singles is flemming delfs?`: ```sql
SELECT "womens_doubles" FROM "past_winners" WHERE "mixed_doubles"='Jacco Arends Selena Piek';
## Task Generate a SQL query to answer the following question: `Who was the womens doubles when the mixed doubles is jacco arends selena piek?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the womens doubles when the mixed doubles is jacco arends selena piek?`: ```sql
SELECT "mens_doubles" FROM "past_winners" WHERE "womens_singles"='Mette Sørensen';
## Task Generate a SQL query to answer the following question: `Who was the mens doubles when womens singles is mette sørensen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_winners" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the mens doubles when womens singles is mette sørensen?`: ```sql
SELECT "moto_gp_winner" FROM "grands_prix" WHERE "circuit"='Catalunya';
## Task Generate a SQL query to answer the following question: `Who is the Motogp winnder for the Catalunya Circuit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the Motogp winnder for the Catalunya Circuit?`: ```sql
SELECT "125cc_winner" FROM "grands_prix" WHERE "circuit"='Phillip Island';
## Task Generate a SQL query to answer the following question: `Who is the 125cc winnder for the Phillip Island circuit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the 125cc winnder for the Phillip Island circuit?`: ```sql
SELECT "date" FROM "grands_prix" WHERE "grand_prix"='German Grand Prix';
## Task Generate a SQL query to answer the following question: `What is the date of the German Grand Prix?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of the German Grand Prix?`: ```sql
SELECT "circuit" FROM "grands_prix" WHERE "date"='4 May';
## Task Generate a SQL query to answer the following question: `What circuit was on the date 4 May?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "round" real, "date" text, "grand_prix" text, "circuit" text, "125cc_winner" text, "250cc_winner" text, "moto_gp_winner" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What circuit was on the date 4 May?`: ```sql
SELECT COUNT("mens_doubles") FROM "table1_12193259_1" WHERE "season"='2004/2005';
## Task Generate a SQL query to answer the following question: `Name the number of mens doubles for 2004/2005` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12193259_1" ( "season" text, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number of mens doubles for 2004/2005`: ```sql
SELECT COUNT("mens_singles") FROM "table1_12193259_1" WHERE "season"='2002/2003';
## Task Generate a SQL query to answer the following question: `Name the total number for mens single for 2002/2003` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12193259_1" ( "season" text, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number for mens single for 2002/2003`: ```sql
SELECT "mens_singles" FROM "table1_12193259_1" WHERE "season"='1944/1945';
## Task Generate a SQL query to answer the following question: `Name the mens singles for 1944/1945` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12193259_1" ( "season" text, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the mens singles for 1944/1945`: ```sql
SELECT COUNT("date") FROM "list_of_boxing_quadruple_or_four_divisio" WHERE "opponent"='Pernell Whitaker';
## Task Generate a SQL query to answer the following question: `How many times was pernell whitaker an opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_boxing_quadruple_or_four_divisio" ( "number" real, "name" text, "titles" text, "date" text, "opponent" text, "result" text, "defenses" real ); ### SQL Given the database schema, here is the SQL query that answers `How many times was pernell whitaker an opponent?`: ```sql
SELECT "number" FROM "list_of_boxing_quadruple_or_four_divisio" WHERE "opponent"='Iran Barkley';
## Task Generate a SQL query to answer the following question: `How many times was iran barkley an opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_boxing_quadruple_or_four_divisio" ( "number" real, "name" text, "titles" text, "date" text, "opponent" text, "result" text, "defenses" real ); ### SQL Given the database schema, here is the SQL query that answers `How many times was iran barkley an opponent?`: ```sql
SELECT "opponent" FROM "list_of_boxing_quadruple_or_four_divisio" WHERE "result"='UD 12/12' AND "date"='1993-05-22';
## Task Generate a SQL query to answer the following question: `Who was the opponent when the result was ud 12/12 and date was 1993-05-22?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_boxing_quadruple_or_four_divisio" ( "number" real, "name" text, "titles" text, "date" text, "opponent" text, "result" text, "defenses" real ); ### SQL Given the database schema, here is the SQL query that answers `Who was the opponent when the result was ud 12/12 and date was 1993-05-22?`: ```sql
SELECT COUNT("opponent") FROM "list_of_boxing_quadruple_or_four_divisio" WHERE "date"='1982-12-03';
## Task Generate a SQL query to answer the following question: `How many opponents fought on 1982-12-03?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_boxing_quadruple_or_four_divisio" ( "number" real, "name" text, "titles" text, "date" text, "opponent" text, "result" text, "defenses" real ); ### SQL Given the database schema, here is the SQL query that answers `How many opponents fought on 1982-12-03?`: ```sql
SELECT "name" FROM "list_of_boxing_quadruple_or_four_divisio" WHERE "titles"='The Ring Light heavyweight (175)';
## Task Generate a SQL query to answer the following question: `What is the name of the title winner in the ring light heavyweight (175) division?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_boxing_quadruple_or_four_divisio" ( "number" real, "name" text, "titles" text, "date" text, "opponent" text, "result" text, "defenses" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the title winner in the ring light heavyweight (175) division?`: ```sql
SELECT COUNT("arrival") FROM "table1_12221135_3" WHERE "operator"='LNWR' AND "calling_at"='Castor, Overton, Peterborough East';
## Task Generate a SQL query to answer the following question: `How many trains call at Castor, Overton, Peterborough East and are operated by LNWR?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12221135_3" ( "departure" text, "going_to" text, "calling_at" text, "arrival" text, "operator" text ); ### SQL Given the database schema, here is the SQL query that answers `How many trains call at Castor, Overton, Peterborough East and are operated by LNWR?`: ```sql
SELECT "mens_singles" FROM "table1_12204717_1" WHERE "year"=2009;
## Task Generate a SQL query to answer the following question: `Who won the mens singles in 2009?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_12204717_1" ( "year" real, "mens_singles" text, "womens_singles" text, "mens_doubles" text, "womens_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won the mens singles in 2009?`: ```sql
SELECT "colors" FROM "member_institutions" WHERE "institution"='University of Richmond';
## Task Generate a SQL query to answer the following question: `What are the the University of Richmond's school colors?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "member_institutions" ( "institution" text, "location" text, "founded" real, "type" text, "joined" real, "nickname" text, "colors" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the the University of Richmond's school colors?`: ```sql
SELECT "colors" FROM "member_institutions" WHERE "institution"='University of New Hampshire';
## Task Generate a SQL query to answer the following question: `What are the school colors of the University of New Hampshire?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "member_institutions" ( "institution" text, "location" text, "founded" real, "type" text, "joined" real, "nickname" text, "colors" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the school colors of the University of New Hampshire?`: ```sql