output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "date" FROM "changes_during_term" WHERE "winner"='Edward Shaw';
## Task Generate a SQL query to answer the following question: `When edward shaw is the winner what is the date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "changes_during_term" ( "by_election" real, "electorate" text, "date" text, "incumbent" text, "reason" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `When edward shaw is the winner what is the date?`: ```sql
SELECT "reason" FROM "changes_during_term" WHERE "electorate"='Peninsula';
## Task Generate a SQL query to answer the following question: `When peninsula is the electorate what is the reason?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "changes_during_term" ( "by_election" real, "electorate" text, "date" text, "incumbent" text, "reason" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `When peninsula is the electorate what is the reason?`: ```sql
SELECT "reason" FROM "changes_during_term" WHERE "incumbent"='James Seaton';
## Task Generate a SQL query to answer the following question: `When james seaton is the incumbent what is the reason?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "changes_during_term" ( "by_election" real, "electorate" text, "date" text, "incumbent" text, "reason" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `When james seaton is the incumbent what is the reason?`: ```sql
SELECT "handicap" FROM "race_record" WHERE "prize_money"='120s';
## Task Generate a SQL query to answer the following question: `What was the handicap when the prize money was 120s?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_record" ( "age" real, "date" text, "track" text, "race" text, "distance_miles" text, "jockey" text, "handicap" text, "field_no_horses" text, "place" text, "time" text, "prize_money" text, "sweepstake" text, "archer_s_winnings" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the handicap when the prize money was 120s?`: ```sql
SELECT "date" FROM "race_record" WHERE "handicap"='8 st 12 lb';
## Task Generate a SQL query to answer the following question: `On what date was the handicap 8 st 12 lb?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_record" ( "age" real, "date" text, "track" text, "race" text, "distance_miles" text, "jockey" text, "handicap" text, "field_no_horses" text, "place" text, "time" text, "prize_money" text, "sweepstake" text, "archer_s_winnings" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the handicap 8 st 12 lb?`: ```sql
SELECT "date" FROM "race_record" WHERE "track"='Ballarat';
## Task Generate a SQL query to answer the following question: `On what date was the track Ballarat? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_record" ( "age" real, "date" text, "track" text, "race" text, "distance_miles" text, "jockey" text, "handicap" text, "field_no_horses" text, "place" text, "time" text, "prize_money" text, "sweepstake" text, "archer_s_winnings" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the track Ballarat? `: ```sql
SELECT "literate_female_pct" FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "male_pct"='51.66';
## Task Generate a SQL query to answer the following question: `How many literate females(%) are there where the male(%) is 51.66` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `How many literate females(%) are there where the male(%) is 51.66`: ```sql
SELECT MAX("literate_male") FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "taluka_name"='Nevasa';
## Task Generate a SQL query to answer the following question: `How many literate males are there in the taluka name nevasa?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `How many literate males are there in the taluka name nevasa?`: ```sql
SELECT COUNT("literate_male_pct") FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "pct_of_district_population"='3.28';
## Task Generate a SQL query to answer the following question: `How many literate male (%) are there in the district that has a population of 3.28?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `How many literate male (%) are there in the district that has a population of 3.28?`: ```sql
SELECT "literate_male" FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "pct_of_district_population"='6.65';
## Task Generate a SQL query to answer the following question: `how many literate males are there that has a district population of 6.65?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `how many literate males are there that has a district population of 6.65?`: ```sql
SELECT "male" FROM "list_of_talukas_in_ahmednagar_district_b" WHERE "female"=139361;
## Task Generate a SQL query to answer the following question: `How many males are in the group that has an amount of 139361` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_talukas_in_ahmednagar_district_b" ( "taluka_name" text, "population_2001_census" real, "pct_of_district_population" text, "male" real, "male_pct" text, "female" real, "female_pct" text, "sex_ratio" real, "literacy" real, "literacy_pct" text, "literate_male" real, "literate_male_pct" text, "literate_female" real, "literate_female_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `How many males are in the group that has an amount of 139361`: ```sql
SELECT "runners_up" FROM "series_overview" WHERE "finale"='16 October 2012';
## Task Generate a SQL query to answer the following question: `List all the runners-up on 16 October 2012?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `List all the runners-up on 16 October 2012?`: ```sql
SELECT "finale" FROM "series_overview" WHERE "runners_up"='Miranda Gore Browne';
## Task Generate a SQL query to answer the following question: `What is the date when Miranda Gore Browne was runner-up?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date when Miranda Gore Browne was runner-up?`: ```sql
SELECT "finale" FROM "series_overview" WHERE "runners_up"='Holly Bell';
## Task Generate a SQL query to answer the following question: `What is the date of the finale where Holly Bell was runner-up?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of the finale where Holly Bell was runner-up?`: ```sql
SELECT "premiere" FROM "series_overview" WHERE "runners_up"='Holly Bell';
## Task Generate a SQL query to answer the following question: `What is the premiere of the season where Holly Bell was the runner-up?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the premiere of the season where Holly Bell was the runner-up?`: ```sql
SELECT COUNT("runners_up") FROM "series_overview" WHERE "winner"='Joanne Wheatley';
## Task Generate a SQL query to answer the following question: `How many runners-up were there when Joanne Wheatley won?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `How many runners-up were there when Joanne Wheatley won?`: ```sql
SELECT "winner" FROM "series_overview" WHERE "runners_up"='Brendan Lynch';
## Task Generate a SQL query to answer the following question: `Who won the season for which Brendan Lynch is the runner-up?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "series_overview" ( "series" real, "premiere" text, "finale" text, "runners_up" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won the season for which Brendan Lynch is the runner-up?`: ```sql
SELECT "pick_num" FROM "round_three" WHERE "nhl_team"='New Jersey Devils';
## Task Generate a SQL query to answer the following question: `What is the pick # when the new jersey devils is the nhl team?` ### 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 pick # when the new jersey devils is the nhl team?`: ```sql
SELECT "college_junior_club_team" FROM "round_three" WHERE "position"='Defence' AND "nationality"='Canada' AND "pick_num"<61.0;
## Task Generate a SQL query to answer the following question: `Which college/junior/team has defence as the position with canada as the nationality and the pick # is less than 61.0?` ### 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 `Which college/junior/team has defence as the position with canada as the nationality and the pick # is less than 61.0?`: ```sql
SELECT "nhl_team" FROM "round_three" WHERE "player"='Kris Draper';
## Task Generate a SQL query to answer the following question: `Which nhl team has kris draper as the player?` ### 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 `Which nhl team has kris draper as the player?`: ```sql
SELECT "position" FROM "round_three" WHERE "nhl_team"='New Jersey Devils';
## Task Generate a SQL query to answer the following question: `Which position has new Jersey Devils as the nhl team?` ### 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 `Which position has new Jersey Devils as the nhl team?`: ```sql
SELECT "college_junior_club_team" FROM "round_three" WHERE "player"='Jim Mathieson';
## Task Generate a SQL query to answer the following question: `Which college/junior/club team has jim mathieson as the player?` ### 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 `Which college/junior/club team has jim mathieson as the player?`: ```sql
SELECT "series_num" FROM "table1_28967275_2" WHERE "episode_title"='\"The Fallen Star\"';
## Task Generate a SQL query to answer the following question: `What is the series number of "the fallen star"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the series number of "the fallen star"?`: ```sql
SELECT "production_code" FROM "table1_28967275_2" WHERE "series_num"=8;
## Task Generate a SQL query to answer the following question: `What is the production code of the episode with series #8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the production code of the episode with series #8?`: ```sql
SELECT COUNT("episode_num") FROM "table1_28967275_2" WHERE "episode_title"='\"The Suspension\"';
## Task Generate a SQL query to answer the following question: `How many episodes are titled "the suspension"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `How many episodes are titled "the suspension"?`: ```sql
SELECT "episode_title" FROM "table1_28967275_2" WHERE "series_num"=14;
## Task Generate a SQL query to answer the following question: `What is the title of the episode with series number 14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the title of the episode with series number 14?`: ```sql
SELECT "original_air_date" FROM "table1_28967275_2" WHERE "episode_num"=31;
## Task Generate a SQL query to answer the following question: `What is the original airdate of episode #31?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28967275_2" ( "episode_num" real, "series_num" real, "episode_title" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the original airdate of episode #31?`: ```sql
SELECT "player" FROM "round_eight" WHERE "nhl_team"='Vancouver Canucks';
## Task Generate a SQL query to answer the following question: `Who was drafted to the Vancouver Canucks?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_eight" ( "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 was drafted to the Vancouver Canucks?`: ```sql
SELECT COUNT("nhl_team") FROM "round_eight" WHERE "position"='Center';
## Task Generate a SQL query to answer the following question: `How many figures are provided for the team when the position drafted is center?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_eight" ( "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 figures are provided for the team when the position drafted is center?`: ```sql
SELECT MIN("pick_num") FROM "round_eight" WHERE "player"='Paul Krake';
## Task Generate a SQL query to answer the following question: `What was the pick number when Paul Krake was selected?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_eight" ( "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 was the pick number when Paul Krake was selected?`: ```sql
SELECT "pick_num" FROM "round_eight" WHERE "nhl_team"='New York Rangers';
## Task Generate a SQL query to answer the following question: `What pick number did the New York Rangers have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_eight" ( "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 pick number did the New York Rangers have?`: ```sql
SELECT "pick_num" FROM "round_eight" WHERE "position"='Defence' AND "nhl_team"='Boston Bruins';
## Task Generate a SQL query to answer the following question: `What pick number was the Boston Bruins selection for defence?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_eight" ( "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 pick number was the Boston Bruins selection for defence?`: ```sql
SELECT "player" FROM "round_four" WHERE "pick_num"=64;
## Task Generate a SQL query to answer the following question: `Which player is pick 64?` ### 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 `Which player is pick 64?`: ```sql
SELECT "player" FROM "round_four" WHERE "position"='Centre' AND "nhl_team"='Detroit Red Wings';
## Task Generate a SQL query to answer the following question: `Which player is the centre for the Detroit Red Wings?` ### 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 `Which player is the centre for the Detroit Red Wings?`: ```sql
SELECT COUNT("position") FROM "round_four" WHERE "nhl_team"='Minnesota North Stars';
## Task Generate a SQL query to answer the following question: `How many positions drafted for the Minnesota North Stars?` ### 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 `How many positions drafted for the Minnesota North Stars?`: ```sql
SELECT "position" FROM "round_seven" WHERE "college_junior_club_team"='Roseau High School (USHS-MN)';
## Task Generate a SQL query to answer the following question: `What position did Roseau High School (USHS-MN) play?` ### 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 position did Roseau High School (USHS-MN) play?`: ```sql
SELECT "pick_num" FROM "round_seven" WHERE "player"='Scott Zygulski';
## Task Generate a SQL query to answer the following question: `What are Scott Zygulski's pick numbers?` ### 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 Scott Zygulski's pick numbers?`: ```sql
SELECT "nationality" FROM "round_seven" WHERE "pick_num"=136;
## Task Generate a SQL query to answer the following question: `Which country is pick# 136 from?` ### 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 country is pick# 136 from?`: ```sql
SELECT COUNT("nationality") FROM "round_seven" WHERE "player"='Alex Nikolic';
## Task Generate a SQL query to answer the following question: `How many nationalities does Alex Nikolic come from?` ### 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 `How many nationalities does Alex Nikolic come from?`: ```sql
SELECT COUNT("nhl_team") FROM "round_seven" WHERE "pick_num"=128;
## Task Generate a SQL query to answer the following question: `How many NHL teams have a pick number of 128?` ### 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 `How many NHL teams have a pick number of 128?`: ```sql
SELECT COUNT("opponents") FROM "doubles_7_3_4" WHERE "partner"='Anabel Medina Garrigues';
## Task Generate a SQL query to answer the following question: `Name the opponents for anabel medina garrigues` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_7_3_4" ( "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 `Name the opponents for anabel medina garrigues`: ```sql
SELECT "partner" FROM "doubles_7_3_4" WHERE "score"='w/o';
## Task Generate a SQL query to answer the following question: `Name the parter for w/o` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_7_3_4" ( "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 `Name the parter for w/o`: ```sql
SELECT "network" FROM "regional_broadcast_television_networks" WHERE "origin"='Xalapa';
## Task Generate a SQL query to answer the following question: `Which of the networks originate in Xalapa?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); ### SQL Given the database schema, here is the SQL query that answers `Which of the networks originate in Xalapa?`: ```sql
SELECT "programming" FROM "regional_broadcast_television_networks" WHERE "network"='Soy Guerrero';
## Task Generate a SQL query to answer the following question: `What are all the programs on the Soy Guerrero network?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); ### SQL Given the database schema, here is the SQL query that answers `What are all the programs on the Soy Guerrero network?`: ```sql
SELECT "owner" FROM "regional_broadcast_television_networks" WHERE "origin"='Mexico City';
## Task Generate a SQL query to answer the following question: `Which owners originate in Mexico City?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); ### SQL Given the database schema, here is the SQL query that answers `Which owners originate in Mexico City?`: ```sql
SELECT "network" FROM "regional_broadcast_television_networks" WHERE "region"='Guerrero';
## Task Generate a SQL query to answer the following question: `Which network serves the Guerrero region` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); ### SQL Given the database schema, here is the SQL query that answers `Which network serves the Guerrero region`: ```sql
SELECT "region" FROM "regional_broadcast_television_networks" WHERE "owner"='Estado de Tabasco';
## Task Generate a SQL query to answer the following question: `Which regions are owned by estado de tabasco?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regional_broadcast_television_networks" ( "network" text, "flagship" text, "programming" text, "region" text, "origin" text, "owner" text ); ### SQL Given the database schema, here is the SQL query that answers `Which regions are owned by estado de tabasco?`: ```sql
SELECT "subdivision_name_ru_bgn_pcgn" FROM "current_codes" WHERE "code"='BY-HR';
## Task Generate a SQL query to answer the following question: `What subdivision names (RU) have a code of by-hr?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); ### SQL Given the database schema, here is the SQL query that answers `What subdivision names (RU) have a code of by-hr?`: ```sql
SELECT "code" FROM "current_codes" WHERE "subdivision_name_ru_bgn_pcgn"='Grodnenskaya oblast''';
## Task Generate a SQL query to answer the following question: `What cods have a subdivision name (RU) of Grodnenskaya Oblast'?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); ### SQL Given the database schema, here is the SQL query that answers `What cods have a subdivision name (RU) of Grodnenskaya Oblast'?`: ```sql
SELECT "subdivision_name_ru_gost" FROM "current_codes" WHERE "subdivision_name_be_bgn_pcgn"='Hrodzenskaya voblasts''';
## Task Generate a SQL query to answer the following question: `What are the subdivision names (RU) where the subdivision name (BE) is Hrodzenskaya Voblasts'?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the subdivision names (RU) where the subdivision name (BE) is Hrodzenskaya Voblasts'?`: ```sql
SELECT "subdivision_name_be_bgn_pcgn" FROM "current_codes" WHERE "subdivision_name_ru_bgn_pcgn"='Grodnenskaya oblast''';
## Task Generate a SQL query to answer the following question: `What is the subdivision name (BE) where subdivision name (RU) (BGN) is Grodnenskaya Oblast'?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the subdivision name (BE) where subdivision name (RU) (BGN) is Grodnenskaya Oblast'?`: ```sql
SELECT "code" FROM "current_codes" WHERE "subdivision_name_be_bgn_pcgn"='Homyel''skaya voblasts''';
## Task Generate a SQL query to answer the following question: `Which codes have subdivision names (BE) (BGN) of Homyel'skaya Voblasts'?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_codes" ( "code" text, "subdivision_name_be_bgn_pcgn" text, "subdivision_name_be_gost" text, "subdivision_name_ru_bgn_pcgn" text, "subdivision_name_ru_gost" text, "subdivision_category" text ); ### SQL Given the database schema, here is the SQL query that answers `Which codes have subdivision names (BE) (BGN) of Homyel'skaya Voblasts'?`: ```sql
SELECT "into_service" FROM "history" WHERE "number"='DH1';
## Task Generate a SQL query to answer the following question: `Name the into service for dh1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the into service for dh1`: ```sql
SELECT "withdrawn" FROM "history" WHERE "into_service"='Example' AND "serial_number"=579;
## Task Generate a SQL query to answer the following question: `Name the withdrawn for example and serial number 579` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the withdrawn for example and serial number 579`: ```sql
SELECT "into_service" FROM "history" WHERE "number"='DH2';
## Task Generate a SQL query to answer the following question: `Name the into service for dh2` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the into service for dh2`: ```sql
SELECT MAX("serial_number") FROM "history" WHERE "scrapped"='Feb 1994';
## Task Generate a SQL query to answer the following question: `Name the most serial number for feb 1994` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the most serial number for feb 1994`: ```sql
SELECT "number" FROM "history" WHERE "scrapped"='2004';
## Task Generate a SQL query to answer the following question: `Name the number for 2004 scapped` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number for 2004 scapped`: ```sql
SELECT "into_service" FROM "history" WHERE "number"='DH1';
## Task Generate a SQL query to answer the following question: `Name the into service for dh1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "history" ( "number" text, "serial_number" real, "into_service" text, "withdrawn" text, "scrapped" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the into service for dh1`: ```sql
SELECT COUNT("month_name") FROM "the_year" WHERE "numbered_month"='Tenth';
## Task Generate a SQL query to answer the following question: `How many month names are there for the tenth numbered month?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_year" ( "month_sequence" real, "numbered_month" text, "month_name" text, "regular_year" text, "defective_year" real, "excessive_year" real ); ### SQL Given the database schema, here is the SQL query that answers `How many month names are there for the tenth numbered month?`: ```sql
SELECT "defective_year" FROM "the_year" WHERE "numbered_month"='Eighth';
## Task Generate a SQL query to answer the following question: `What is the defective year for the eighth numbered month?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_year" ( "month_sequence" real, "numbered_month" text, "month_name" text, "regular_year" text, "defective_year" real, "excessive_year" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the defective year for the eighth numbered month?`: ```sql
SELECT MIN("month_sequence") FROM "the_year" WHERE "month_name"='Av';
## Task Generate a SQL query to answer the following question: `What is the month sequence for the month name of av?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_year" ( "month_sequence" real, "numbered_month" text, "month_name" text, "regular_year" text, "defective_year" real, "excessive_year" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the month sequence for the month name of av?`: ```sql
SELECT MAX("defective_year") FROM "the_year" WHERE "regular_year"='29 days' AND "month_sequence"=2;
## Task Generate a SQL query to answer the following question: `What is the defective year for the regular year of 29 days and month sequence of 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_year" ( "month_sequence" real, "numbered_month" text, "month_name" text, "regular_year" text, "defective_year" real, "excessive_year" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the defective year for the regular year of 29 days and month sequence of 2?`: ```sql
SELECT "first_air_date" FROM "u_s_nielsen_ratings" WHERE "rating_18_49"='4.5';
## Task Generate a SQL query to answer the following question: `When 4.5 is the rating (18-49) what is the air date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); ### SQL Given the database schema, here is the SQL query that answers `When 4.5 is the rating (18-49) what is the air date?`: ```sql
SELECT "rank_timeslot" FROM "u_s_nielsen_ratings" WHERE "share_18_49"=13;
## Task Generate a SQL query to answer the following question: `When 13 is the share (18-49) what is the rank (timeslot)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); ### SQL Given the database schema, here is the SQL query that answers `When 13 is the share (18-49) what is the rank (timeslot)?`: ```sql
SELECT "first_air_date" FROM "u_s_nielsen_ratings" WHERE "episode"=11;
## Task Generate a SQL query to answer the following question: `When 11 is the episode what is the air date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); ### SQL Given the database schema, here is the SQL query that answers `When 11 is the episode what is the air date?`: ```sql
SELECT "rating_18_49" FROM "u_s_nielsen_ratings" WHERE "viewers_millions"='10.02';
## Task Generate a SQL query to answer the following question: `When there are 10.02 million viewers what is the rating (18-49)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); ### SQL Given the database schema, here is the SQL query that answers `When there are 10.02 million viewers what is the rating (18-49)?`: ```sql
SELECT "share_18_49" FROM "u_s_nielsen_ratings" WHERE "viewers_millions"='9.28';
## Task Generate a SQL query to answer the following question: `When there are 9.28 million viewers what is the share (18-49)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); ### SQL Given the database schema, here is the SQL query that answers `When there are 9.28 million viewers what is the share (18-49)?`: ```sql
SELECT "first_air_date" FROM "u_s_nielsen_ratings" WHERE "episode"=4;
## Task Generate a SQL query to answer the following question: `When 4 is the episode what is the air date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "u_s_nielsen_ratings" ( "episode" real, "first_air_date" text, "rating_18_49" text, "share_18_49" real, "viewers_millions" text, "rank_timeslot" text ); ### SQL Given the database schema, here is the SQL query that answers `When 4 is the episode what is the air date?`: ```sql
SELECT COUNT("result") FROM "singles_21_10_titles_11_runners_up" WHERE "score"='6–7 (2–7) , 6–2, 7–6 (7–3)';
## Task Generate a SQL query to answer the following question: `How many different results were there for the scores 6–7 (2–7) , 6–2, 7–6 (7–3)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_21_10_titles_11_runners_up" ( "result" text, "no" real, "date" text, "category" text, "tournament" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `How many different results were there for the scores 6–7 (2–7) , 6–2, 7–6 (7–3)?`: ```sql
SELECT "writer" FROM "episode_information" WHERE "episode"=3;
## Task Generate a SQL query to answer the following question: `Who was the writer for episode 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "episode_information" ( "episode" real, "title" text, "writer" text, "director" text, "original_airdate" text, "ratings_kanto" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the writer for episode 3?`: ```sql
SELECT "original_airdate" FROM "episode_information" WHERE "writer"='Daisuke Habara' AND "director"='Akimitsu Sasaki';
## Task Generate a SQL query to answer the following question: `What was the original airdate for the episode written by daisuke habara and directed by akimitsu sasaki` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "episode_information" ( "episode" real, "title" text, "writer" text, "director" text, "original_airdate" text, "ratings_kanto" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the original airdate for the episode written by daisuke habara and directed by akimitsu sasaki`: ```sql
SELECT "title" FROM "episode_information" WHERE "director"='Tomoyuki Furumaya';
## Task Generate a SQL query to answer the following question: `What episode did tomoyuki furumaya` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "episode_information" ( "episode" real, "title" text, "writer" text, "director" text, "original_airdate" text, "ratings_kanto" text ); ### SQL Given the database schema, here is the SQL query that answers `What episode did tomoyuki furumaya`: ```sql
SELECT MIN("round") FROM "regular_home_and_away_season" WHERE "result_includes_margin"='Lost by 36 points';
## Task Generate a SQL query to answer the following question: `What is the earliest round where collingswood lost by 36 points?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the earliest round where collingswood lost by 36 points?`: ```sql
SELECT "score_collingwoods_score_is_in_bold" FROM "regular_home_and_away_season" WHERE "date"='Saturday, 26 June 7:10pm';
## Task Generate a SQL query to answer the following question: `What was the score on saturday, 26 june 7:10pm?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score on saturday, 26 june 7:10pm?`: ```sql
SELECT MIN("round") FROM "regular_home_and_away_season" WHERE "opponent"='Melbourne' AND "date"='Saturday, 4 April 2:10pm';
## Task Generate a SQL query to answer the following question: `What is the round number of the round against melbourne on saturday, 4 april 2:10pm?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the round number of the round against melbourne on saturday, 4 april 2:10pm?`: ```sql
SELECT "venue" FROM "regular_home_and_away_season" WHERE "opponent"='Essendon' AND "position_on_ladder"='3rd';
## Task Generate a SQL query to answer the following question: `Which venue did collingsworth play essendon in when they had the 3rd position on the ladder?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); ### SQL Given the database schema, here is the SQL query that answers `Which venue did collingsworth play essendon in when they had the 3rd position on the ladder?`: ```sql
SELECT "home_away" FROM "regular_home_and_away_season" WHERE "position_on_ladder"='6th';
## Task Generate a SQL query to answer the following question: `Was the round where they were in 6th at home or away?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_home_and_away_season" ( "round" real, "date" text, "opponent" text, "home_away" text, "score_collingwoods_score_is_in_bold" text, "result_includes_margin" text, "venue" text, "position_on_ladder" text ); ### SQL Given the database schema, here is the SQL query that answers `Was the round where they were in 6th at home or away?`: ```sql
SELECT "previous_school" FROM "roster" WHERE "height"='ft5in (m)' AND "position"='Forward';
## Task Generate a SQL query to answer the following question: `What was the previous school for the forward with a height of ft5in (m)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "name" text, "num" real, "position" text, "height" text, "weight_lb" real, "year" text, "hometown" text, "previous_school" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the previous school for the forward with a height of ft5in (m)?`: ```sql
SELECT MIN("num") FROM "roster";
## Task Generate a SQL query to answer the following question: `What is the lowest listed number for a player?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "name" text, "num" real, "position" text, "height" text, "weight_lb" real, "year" text, "hometown" text, "previous_school" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest listed number for a player?`: ```sql
SELECT "name" FROM "roster" WHERE "previous_school"='South Kent School / Brentwood HS';
## Task Generate a SQL query to answer the following question: `Who previously attended south kent school / brentwood hs?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "name" text, "num" real, "position" text, "height" text, "weight_lb" real, "year" text, "hometown" text, "previous_school" text ); ### SQL Given the database schema, here is the SQL query that answers `Who previously attended south kent school / brentwood hs?`: ```sql
SELECT MAX("num") FROM "roster" WHERE "position"='Guard' AND "previous_school"='Brophy College Prep';
## Task Generate a SQL query to answer the following question: `What is the highest number a guard from brophy college prep wore?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "roster" ( "name" text, "num" real, "position" text, "height" text, "weight_lb" real, "year" text, "hometown" text, "previous_school" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number a guard from brophy college prep wore?`: ```sql
SELECT COUNT("directed_by") FROM "table1_29063233_1" WHERE "uk_viewers_million"='6.16';
## Task Generate a SQL query to answer the following question: `How many directed by entries have UK viewership over 6.16 million?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29063233_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `How many directed by entries have UK viewership over 6.16 million?`: ```sql
SELECT "directed_by" FROM "table1_29063233_1" WHERE "uk_viewers_million"='5.77';
## Task Generate a SQL query to answer the following question: `Who directed the episode with a UK viewership of exactly 5.77 million?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29063233_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `Who directed the episode with a UK viewership of exactly 5.77 million?`: ```sql
SELECT "original_air_date" FROM "table1_29063233_1" WHERE "uk_viewers_million"='6.02';
## Task Generate a SQL query to answer the following question: `What was the airdate of the episode with a UK viewership of 6.02 million?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29063233_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the airdate of the episode with a UK viewership of 6.02 million?`: ```sql
SELECT "directed_by" FROM "table1_29063233_1" WHERE "uk_viewers_million"='6.09';
## Task Generate a SQL query to answer the following question: `Who directed the episode with UK viewership of 6.09 million?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29063233_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `Who directed the episode with UK viewership of 6.09 million?`: ```sql
SELECT "general_classification" FROM "leadership_classification" WHERE "winner"='Mauricio Soler';
## Task Generate a SQL query to answer the following question: `Name the general classification for mauricio soler` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leadership_classification" ( "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 `Name the general classification for mauricio soler`: ```sql
SELECT "general_classification" FROM "leadership_classification" WHERE "winner"='Steven Kruijswijk';
## Task Generate a SQL query to answer the following question: `Name the general classification for steven kruijswijk` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leadership_classification" ( "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 `Name the general classification for steven kruijswijk`: ```sql
SELECT "points_classification" FROM "leadership_classification" WHERE "general_classification"='Levi Leipheimer';
## Task Generate a SQL query to answer the following question: `Name the points classification for levi leipheimer` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leadership_classification" ( "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 `Name the points classification for levi leipheimer`: ```sql
SELECT "mountains_classification" FROM "leadership_classification" WHERE "team_classification"='Rabobank' AND "general_classification"='Damiano Cunego';
## Task Generate a SQL query to answer the following question: `Name the mountains classification for rabobank and damiano cunego` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leadership_classification" ( "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 `Name the mountains classification for rabobank and damiano cunego`: ```sql
SELECT "team_classification" FROM "leadership_classification" WHERE "winner"='Thomas De Gendt';
## Task Generate a SQL query to answer the following question: `Name the team classification for thomas de gendt` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leadership_classification" ( "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 `Name the team classification for thomas de gendt`: ```sql
SELECT "built_for" FROM "class_34_500_ge_type_u26_c" WHERE "original_no"='24D';
## Task Generate a SQL query to answer the following question: `What is listed in built for when the original number is 24d?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "class_34_500_ge_type_u26_c" ( "ge_dl_works_no" real, "year_built" text, "built_for" text, "original_no" text, "new_owner" text, "new_no" text ); ### SQL Given the database schema, here is the SQL query that answers `What is listed in built for when the original number is 24d?`: ```sql
SELECT "original_air_date" FROM "table1_29102612_1" WHERE "title"='\"Be Prepared\"';
## Task Generate a SQL query to answer the following question: `What is the original air date when the title is "be prepared"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29102612_1" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the original air date when the title is "be prepared"?`: ```sql
SELECT MAX("season_num") FROM "table1_29102612_1" WHERE "u_s_viewers_millions"='5.3';
## Task Generate a SQL query to answer the following question: `What is the season # when ther are 5.3 million U.S viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29102612_1" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the season # when ther are 5.3 million U.S viewers?`: ```sql
SELECT "original_air_date" FROM "table1_29106680_1" WHERE "title"='\"The Changeling\"';
## Task Generate a SQL query to answer the following question: `What dat did "The changeling" originally air?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29106680_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What dat did "The changeling" originally air?`: ```sql
SELECT "original_air_date" FROM "table1_29106680_1" WHERE "title"='\"The Eye of the Phoenix\"';
## Task Generate a SQL query to answer the following question: `What date did "the eye of the phoenix" originally air?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29106680_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What date did "the eye of the phoenix" originally air?`: ```sql
SELECT "no_for_series" FROM "table1_29106680_1" WHERE "title"='\"The Coming of Arthur (Part 1)\"';
## Task Generate a SQL query to answer the following question: `What episode number of the series is "the coming of arthur (part 1)"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29106680_1" ( "no_overall" real, "no_for_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "uk_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What episode number of the series is "the coming of arthur (part 1)"?`: ```sql
SELECT "title" FROM "table1_29087004_3" WHERE "written_by"='Eric Trueheart';
## Task Generate a SQL query to answer the following question: `What are the titles of episodes written by Eric Trueheart?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29087004_3" ( "series_num" real, "production_code" real, "title" text, "directed_by" text, "written_by" text, "united_states_original_airdate" text, "canada_original_airdate" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the titles of episodes written by Eric Trueheart?`: ```sql
SELECT MAX("series_num") FROM "table1_29087004_3" WHERE "title"='\"The Ruff Ruff Bunch\"';
## Task Generate a SQL query to answer the following question: `What is the highest numbered episode where the title is "The Ruff Ruff Bunch"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29087004_3" ( "series_num" real, "production_code" real, "title" text, "directed_by" text, "written_by" text, "united_states_original_airdate" text, "canada_original_airdate" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest numbered episode where the title is "The Ruff Ruff Bunch"?`: ```sql
SELECT "written_by" FROM "table1_29087004_3" WHERE "united_states_original_airdate"='June 9, 2012';
## Task Generate a SQL query to answer the following question: `Who were the writers of episode/s first aired in the US on June 9, 2012?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29087004_3" ( "series_num" real, "production_code" real, "title" text, "directed_by" text, "written_by" text, "united_states_original_airdate" text, "canada_original_airdate" text ); ### SQL Given the database schema, here is the SQL query that answers `Who were the writers of episode/s first aired in the US on June 9, 2012?`: ```sql
SELECT "united_states_original_airdate" FROM "table1_29087004_3" WHERE "title"='\"The Fraud Princess\"';
## Task Generate a SQL query to answer the following question: `When was the episode titled "The Fraud Princess" first aired in the United States?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_29087004_3" ( "series_num" real, "production_code" real, "title" text, "directed_by" text, "written_by" text, "united_states_original_airdate" text, "canada_original_airdate" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the episode titled "The Fraud Princess" first aired in the United States?`: ```sql