output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT COUNT("rnd") FROM "table1_27965906_2" WHERE "ss_winning_car"='Kim Baker, Bobby Archer, Tommy Archer';
## Task Generate a SQL query to answer the following question: `Name the total number of rnd for kim baker, bobby archer, tommy archer` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27965906_2" ( "rnd" real, "circuit" text, "gt_winning_car" text, "ss_winning_car" text, "a_winning_car" text, "b_winning_car" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of rnd for kim baker, bobby archer, tommy archer`: ```sql
SELECT COUNT("b_winning_car") FROM "table1_27965906_2" WHERE "ss_winning_car"='Bobby Archer, Tommy Archer';
## Task Generate a SQL query to answer the following question: `Name the total number of b winning car and bobby archer, tommy archer` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27965906_2" ( "rnd" real, "circuit" text, "gt_winning_car" text, "ss_winning_car" text, "a_winning_car" text, "b_winning_car" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of b winning car and bobby archer, tommy archer`: ```sql
SELECT COUNT("institution") FROM "member_schools" WHERE "team_name"='Spartans';
## Task Generate a SQL query to answer the following question: `How many institutes have the team name Spartans?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "member_schools" ( "institution" text, "city" text, "state" text, "team_name" text, "affiliation" text, "enrollment" real, "home_conference" text ); ### SQL Given the database schema, here is the SQL query that answers `How many institutes have the team name Spartans?`: ```sql
SELECT COUNT("state") FROM "member_schools" WHERE "enrollment"=2789;
## Task Generate a SQL query to answer the following question: `How many states were there when there was an enrollment of 2789?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "member_schools" ( "institution" text, "city" text, "state" text, "team_name" text, "affiliation" text, "enrollment" real, "home_conference" text ); ### SQL Given the database schema, here is the SQL query that answers `How many states were there when there was an enrollment of 2789?`: ```sql
SELECT "affiliation" FROM "member_schools" WHERE "state"='Indiana';
## Task Generate a SQL query to answer the following question: `What kind of institute is in Indiana?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "member_schools" ( "institution" text, "city" text, "state" text, "team_name" text, "affiliation" text, "enrollment" real, "home_conference" text ); ### SQL Given the database schema, here is the SQL query that answers `What kind of institute is in Indiana?`: ```sql
SELECT MIN("enrollment") FROM "member_schools" WHERE "team_name"='Pioneers';
## Task Generate a SQL query to answer the following question: `How many people enrolled for the institute with the Pioneers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "member_schools" ( "institution" text, "city" text, "state" text, "team_name" text, "affiliation" text, "enrollment" real, "home_conference" text ); ### SQL Given the database schema, here is the SQL query that answers `How many people enrolled for the institute with the Pioneers?`: ```sql
SELECT "team_name" FROM "member_schools" WHERE "city"='Rock Island';
## Task Generate a SQL query to answer the following question: `What team is in the city of Rock Island?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "member_schools" ( "institution" text, "city" text, "state" text, "team_name" text, "affiliation" text, "enrollment" real, "home_conference" text ); ### SQL Given the database schema, here is the SQL query that answers `What team is in the city of Rock Island?`: ```sql
SELECT "title" FROM "table1_27969432_2" WHERE "written_by"='Alison Cross';
## Task Generate a SQL query to answer the following question: `What is the name of the episode written by alison cross?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_2" ( "no_in_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the episode written by alison cross?`: ```sql
SELECT "u_s_viewers_in_millions" FROM "table1_27969432_2" WHERE "title"='\"The Beast in Me\"';
## Task Generate a SQL query to answer the following question: `How many viewers watched the episode "the beast in me"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_2" ( "no_in_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many viewers watched the episode "the beast in me"?`: ```sql
SELECT COUNT("written_by") FROM "table1_27969432_2" WHERE "title"='\"The Beast in Me\"';
## Task Generate a SQL query to answer the following question: `How many people wrote the "the beast in me"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_2" ( "no_in_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many people wrote the "the beast in me"?`: ```sql
SELECT "directed_by" FROM "table1_27969432_2" WHERE "written_by"='Karina Csolty';
## Task Generate a SQL query to answer the following question: `Who directed the episode written by karina csolty` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_2" ( "no_in_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `Who directed the episode written by karina csolty`: ```sql
SELECT "title" FROM "table1_27969432_2" WHERE "written_by"='Karina Csolty';
## Task Generate a SQL query to answer the following question: `What is the name of the episode written by karina csolty?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_2" ( "no_in_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the episode written by karina csolty?`: ```sql
SELECT "directed_by" FROM "table1_27969432_4" WHERE "production"='2M5901';
## Task Generate a SQL query to answer the following question: `Who directed the episode whose production code is 2m5901?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_4" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `Who directed the episode whose production code is 2m5901?`: ```sql
SELECT "original_air_date" FROM "table1_27969432_4" WHERE "title"='\"Cuts Like a Knife\"';
## Task Generate a SQL query to answer the following question: `What is the first air date of the episode titled "Cuts like a knife"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_4" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the first air date of the episode titled "Cuts like a knife"?`: ```sql
SELECT COUNT("u_s_viewers_in_millions") FROM "table1_27969432_4" WHERE "no_in_season"=4;
## Task Generate a SQL query to answer the following question: `How many viewers in millions were there for episode 4 of this season?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_4" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many viewers in millions were there for episode 4 of this season?`: ```sql
SELECT "production" FROM "table1_27969432_4" WHERE "title"='\"Love the Way You Lie\"';
## Task Generate a SQL query to answer the following question: `What is the production code for the episode titled "Love the way you lie"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_4" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the production code for the episode titled "Love the way you lie"?`: ```sql
SELECT COUNT("national_rank") FROM "universities_and_colleges_ranked_by_endo" WHERE "percentage_change_yoy"='13.1%';
## Task Generate a SQL query to answer the following question: `Name the total number of rank for percentage change yoy 13.1%` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "universities_and_colleges_ranked_by_endo" ( "state_rank" real, "national_rank" real, "institution" text, "location" text, "public_or_private" text, "endowment_funds" text, "percentage_change_yoy" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of rank for percentage change yoy 13.1%`: ```sql
SELECT "percentage_change_yoy" FROM "universities_and_colleges_ranked_by_endo" WHERE "institution"='Presbyterian College';
## Task Generate a SQL query to answer the following question: `Name the percentage change yoy for presbyterian college` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "universities_and_colleges_ranked_by_endo" ( "state_rank" real, "national_rank" real, "institution" text, "location" text, "public_or_private" text, "endowment_funds" text, "percentage_change_yoy" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the percentage change yoy for presbyterian college`: ```sql
SELECT "national_rank" FROM "universities_and_colleges_ranked_by_endo" WHERE "institution"='Medical University of South Carolina';
## Task Generate a SQL query to answer the following question: `Name the national rank for medical university of south carolina` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "universities_and_colleges_ranked_by_endo" ( "state_rank" real, "national_rank" real, "institution" text, "location" text, "public_or_private" text, "endowment_funds" text, "percentage_change_yoy" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the national rank for medical university of south carolina`: ```sql
SELECT MIN("no_in_series") FROM "table1_27969432_3";
## Task Generate a SQL query to answer the following question: `What is the lowest numbered episode in the series?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_3" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest numbered episode in the series?`: ```sql
SELECT MIN("no_in_series") FROM "table1_27969432_3" WHERE "title"='\"Remember Me\"';
## Task Generate a SQL query to answer the following question: `What numbered episode in the series is "remember me"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_3" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What numbered episode in the series is "remember me"?`: ```sql
SELECT COUNT("original_air_date") FROM "table1_27969432_3" WHERE "written_by"='David J. North & Janet Tamaro';
## Task Generate a SQL query to answer the following question: `How many episodes were written by david j. north & janet tamaro?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_3" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many episodes were written by david j. north & janet tamaro?`: ```sql
SELECT "original_air_date" FROM "table1_27969432_3" WHERE "directed_by"='Fred Toye';
## Task Generate a SQL query to answer the following question: `What are the original air dates for episodes directed by fred toye?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27969432_3" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the original air dates for episodes directed by fred toye?`: ```sql
SELECT "aggregate_score" FROM "aggregate_results" WHERE "proceed_to_quarter_final"='Montauban';
## Task Generate a SQL query to answer the following question: `What was the aggregate score for Montauban?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "proceed_to_quarter_final" text, "match_points" text, "aggregate_score" text, "points_margin" real, "eliminated_from_competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the aggregate score for Montauban?`: ```sql
SELECT "proceed_to_quarter_final" FROM "aggregate_results" WHERE "points_margin"=21;
## Task Generate a SQL query to answer the following question: `Who proceeded to the quarter finals with a points margin of 21?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "proceed_to_quarter_final" text, "match_points" text, "aggregate_score" text, "points_margin" real, "eliminated_from_competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Who proceeded to the quarter finals with a points margin of 21?`: ```sql
SELECT "match_points" FROM "aggregate_results" WHERE "eliminated_from_competition"='Bordeaux-Bègles';
## Task Generate a SQL query to answer the following question: `What were the match points when Bordeaux-Bègles was eliminated from competition? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "proceed_to_quarter_final" text, "match_points" text, "aggregate_score" text, "points_margin" real, "eliminated_from_competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What were the match points when Bordeaux-Bègles was eliminated from competition? `: ```sql
SELECT "u_s_viewers_in_million" FROM "table1_27987623_1" WHERE "written_by"='Kevin Biegel & Bill Lawrence';
## Task Generate a SQL query to answer the following question: `How many viewers saw the episode written by kevin biegel & bill lawrence?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27987623_1" ( "series_episode" real, "season_episode" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "u_s_viewers_in_million" text ); ### SQL Given the database schema, here is the SQL query that answers `How many viewers saw the episode written by kevin biegel & bill lawrence?`: ```sql
SELECT MAX("series_episode") FROM "table1_27987623_1" WHERE "u_s_viewers_in_million"='7.43';
## Task Generate a SQL query to answer the following question: `What was the episode number veiwed by 7.43 million viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27987623_1" ( "series_episode" real, "season_episode" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "u_s_viewers_in_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the episode number veiwed by 7.43 million viewers?`: ```sql
SELECT "title" FROM "table1_27987623_1" WHERE "u_s_viewers_in_million"='5.03';
## Task Generate a SQL query to answer the following question: `What was the title of the episode viewed by 5.03 million viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27987623_1" ( "series_episode" real, "season_episode" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "u_s_viewers_in_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the title of the episode viewed by 5.03 million viewers?`: ```sql
SELECT "season_episode" FROM "table1_27987623_1" WHERE "u_s_viewers_in_million"='5.68';
## Task Generate a SQL query to answer the following question: `What was the episode number for the episode viewed by 5.68 million viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27987623_1" ( "series_episode" real, "season_episode" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "u_s_viewers_in_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the episode number for the episode viewed by 5.68 million viewers?`: ```sql
SELECT MIN("series_episode") FROM "table1_27987623_1" WHERE "title"='\"Baby''s a Rock ''N'' Roller\"';
## Task Generate a SQL query to answer the following question: `What is the episode number with a title "baby's a rock 'n' roller"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27987623_1" ( "series_episode" real, "season_episode" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "u_s_viewers_in_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the episode number with a title "baby's a rock 'n' roller"?`: ```sql
SELECT COUNT("number_of_fixtures") FROM "calendar" WHERE "new_entries_this_round"='none';
## Task Generate a SQL query to answer the following question: `How many times is the new entries this round is none?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calendar" ( "round" text, "main_date" text, "number_of_fixtures" real, "clubs" text, "new_entries_this_round" text, "prize_money" text, "player_of_the_round" text ); ### SQL Given the database schema, here is the SQL query that answers `How many times is the new entries this round is none?`: ```sql
SELECT "prize_money" FROM "calendar" WHERE "clubs"='392 → 276';
## Task Generate a SQL query to answer the following question: `What is the prize money when the clubs is 392 → 276?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calendar" ( "round" text, "main_date" text, "number_of_fixtures" real, "clubs" text, "new_entries_this_round" text, "prize_money" text, "player_of_the_round" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the prize money when the clubs is 392 → 276?`: ```sql
SELECT MIN("number_of_fixtures") FROM "calendar";
## Task Generate a SQL query to answer the following question: `What is the lowest number of fixtures?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calendar" ( "round" text, "main_date" text, "number_of_fixtures" real, "clubs" text, "new_entries_this_round" text, "prize_money" text, "player_of_the_round" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest number of fixtures?`: ```sql
SELECT "main_date" FROM "calendar" WHERE "round"='Third Round Qualifying';
## Task Generate a SQL query to answer the following question: `What is the main date when the round is third round qualifying?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calendar" ( "round" text, "main_date" text, "number_of_fixtures" real, "clubs" text, "new_entries_this_round" text, "prize_money" text, "player_of_the_round" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the main date when the round is third round qualifying?`: ```sql
SELECT "round" FROM "calendar" WHERE "prize_money"='£7,500';
## Task Generate a SQL query to answer the following question: `What is the round when the prize money is £7,500?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calendar" ( "round" text, "main_date" text, "number_of_fixtures" real, "clubs" text, "new_entries_this_round" text, "prize_money" text, "player_of_the_round" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the round when the prize money is £7,500?`: ```sql
SELECT MAX("no_in_series") FROM "table1_27987768_1" WHERE "written_by"='Eric Gilliland';
## Task Generate a SQL query to answer the following question: `What number in series was the episode written by Eric Gilliland?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27987768_1" ( "no_in_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What number in series was the episode written by Eric Gilliland?`: ```sql
SELECT COUNT("points_margin") FROM "aggregate_results" WHERE "winners"='Brive';
## Task Generate a SQL query to answer the following question: `how many total number of points margin when brive is the winners` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "winners" text, "match_points" text, "aggregate_score" text, "points_margin" real, "losers" text ); ### SQL Given the database schema, here is the SQL query that answers `how many total number of points margin when brive is the winners`: ```sql
SELECT "match_points" FROM "aggregate_results" WHERE "losers"='Gran Parma';
## Task Generate a SQL query to answer the following question: `how many match points did gran parma lost` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "winners" text, "match_points" text, "aggregate_score" text, "points_margin" real, "losers" text ); ### SQL Given the database schema, here is the SQL query that answers `how many match points did gran parma lost`: ```sql
SELECT "match_points" FROM "aggregate_results" WHERE "losers"='Rotherham';
## Task Generate a SQL query to answer the following question: `how many match points rotherham lose` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "winners" text, "match_points" text, "aggregate_score" text, "points_margin" real, "losers" text ); ### SQL Given the database schema, here is the SQL query that answers `how many match points rotherham lose`: ```sql
SELECT COUNT("eliminated_from_competition") FROM "aggregate_results" WHERE "proceed_to_quarter_final"='Brive';
## Task Generate a SQL query to answer the following question: `When brive is the proceed to quarter final how many were eliminated from competition? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "proceed_to_quarter_final" text, "match_points" text, "aggregate_score" text, "points_margin" real, "eliminated_from_competition" text ); ### SQL Given the database schema, here is the SQL query that answers `When brive is the proceed to quarter final how many were eliminated from competition? `: ```sql
SELECT "proceed_to_quarter_final" FROM "aggregate_results" WHERE "eliminated_from_competition"='London Irish';
## Task Generate a SQL query to answer the following question: `When london irish was eliminated from competition who proceeded to quarter final?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "proceed_to_quarter_final" text, "match_points" text, "aggregate_score" text, "points_margin" real, "eliminated_from_competition" text ); ### SQL Given the database schema, here is the SQL query that answers `When london irish was eliminated from competition who proceeded to quarter final?`: ```sql
SELECT "match_points" FROM "aggregate_results" WHERE "proceed_to_quarter_final"='Brive';
## Task Generate a SQL query to answer the following question: `When brive proceeded to quarter final what were the match points?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "proceed_to_quarter_final" text, "match_points" text, "aggregate_score" text, "points_margin" real, "eliminated_from_competition" text ); ### SQL Given the database schema, here is the SQL query that answers `When brive proceeded to quarter final what were the match points?`: ```sql
SELECT "proceed_to_quarter_final" FROM "aggregate_results" WHERE "eliminated_from_competition"='London Irish';
## Task Generate a SQL query to answer the following question: `When london irish was eliminated from competition who proceeded to quarter final?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aggregate_results" ( "proceed_to_quarter_final" text, "match_points" text, "aggregate_score" text, "points_margin" real, "eliminated_from_competition" text ); ### SQL Given the database schema, here is the SQL query that answers `When london irish was eliminated from competition who proceeded to quarter final?`: ```sql
SELECT MAX("production_code") FROM "table1_27988281_1" WHERE "written_by"='Jeff Filgo';
## Task Generate a SQL query to answer the following question: `What is the production code of the episode written by Jeff Filgo?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988281_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the production code of the episode written by Jeff Filgo?`: ```sql
SELECT "written_by" FROM "table1_27988281_1" WHERE "title"='\"Red''s Birthday\"';
## Task Generate a SQL query to answer the following question: `Who wrote the episode titled "Red's Birthday"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988281_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Who wrote the episode titled "Red's Birthday"?`: ```sql
SELECT MIN("production_code") FROM "table1_27988281_1" WHERE "title"='\"Halloween\"';
## Task Generate a SQL query to answer the following question: `What is the production code of the episode titled "Halloween"? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988281_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the production code of the episode titled "Halloween"? `: ```sql
SELECT "original_air_date" FROM "table1_27988408_1" WHERE "written_by"='Bryan Moore & Chris Peterson';
## Task Generate a SQL query to answer the following question: `Name the original air date for bryan moore & chris peterson` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988408_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the original air date for bryan moore & chris peterson`: ```sql
SELECT MIN("production_code") FROM "table1_27988408_1" WHERE "written_by"='Bryan Moore & Chris Peterson';
## Task Generate a SQL query to answer the following question: `Name the least production code for bryan moore & chris peterson` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988408_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the least production code for bryan moore & chris peterson`: ```sql
SELECT "directed_by" FROM "table1_27988408_1" WHERE "title"='\"Babe I''m Gonna Leave You\"';
## Task Generate a SQL query to answer the following question: `Name who directed the episode "babe i'm gonna leave you"` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988408_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name who directed the episode "babe i'm gonna leave you"`: ```sql
SELECT COUNT("no_in_season") FROM "table1_27988408_1" WHERE "title"='\"The Battle of Evermore\"';
## Task Generate a SQL query to answer the following question: `Name the total number in season for "the battle of evermore"` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988408_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number in season for "the battle of evermore"`: ```sql
SELECT COUNT("original_air_date") FROM "table1_27988559_1" WHERE "production_code"=804;
## Task Generate a SQL query to answer the following question: `How many dates did the episode with a production code of 804 originally air on?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988559_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `How many dates did the episode with a production code of 804 originally air on?`: ```sql
SELECT "original_air_date" FROM "table1_27988559_1" WHERE "title"='\"Killer Queen\"';
## Task Generate a SQL query to answer the following question: `What is the original air date for "killer queen"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988559_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the original air date for "killer queen"?`: ```sql
SELECT "directed_by" FROM "table1_27988559_1" WHERE "no_in_season"=2;
## Task Generate a SQL query to answer the following question: `Who directed episode 2 of the season?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988559_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Who directed episode 2 of the season?`: ```sql
SELECT "written_by" FROM "table1_27988559_1" WHERE "title"='\"Bohemian Rhapsody\"';
## Task Generate a SQL query to answer the following question: `Who wrote "bohemian rhapsody"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988559_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Who wrote "bohemian rhapsody"?`: ```sql
SELECT "original_air_date" FROM "table1_27988559_1" WHERE "no_in_series"=195;
## Task Generate a SQL query to answer the following question: `What dat did episode 195 in the series originally air?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988559_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What dat did episode 195 in the series originally air?`: ```sql
SELECT "title" FROM "table1_27988540_1" WHERE "no_in_season"=5;
## Task Generate a SQL query to answer the following question: `What is the name of episode 5 in the season?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988540_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of episode 5 in the season?`: ```sql
SELECT "written_by" FROM "table1_27988540_1" WHERE "title"='\"It''s Only Rock and Roll\"';
## Task Generate a SQL query to answer the following question: `Who wrote "it's only rock and roll"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988540_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Who wrote "it's only rock and roll"?`: ```sql
SELECT "title" FROM "table1_27988540_1" WHERE "no_in_series"=155;
## Task Generate a SQL query to answer the following question: `What is the title of episode 155 in the series?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27988540_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the title of episode 155 in the series?`: ```sql
SELECT MAX("sponsorship_ended") FROM "table1_28005160_2";
## Task Generate a SQL query to answer the following question: `What is the last year a sponsorship ended?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28005160_2" ( "sponsored_name" text, "non_sponsored_name" text, "sponsor" text, "stadium" text, "city" text, "country" text, "sport" text, "sponsorship_ended" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the last year a sponsorship ended?`: ```sql
SELECT COUNT("country") FROM "table1_28005160_2" WHERE "city"='Ljungskile';
## Task Generate a SQL query to answer the following question: `How many countries played in the city of ljungskile?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28005160_2" ( "sponsored_name" text, "non_sponsored_name" text, "sponsor" text, "stadium" text, "city" text, "country" text, "sport" text, "sponsorship_ended" real ); ### SQL Given the database schema, here is the SQL query that answers `How many countries played in the city of ljungskile?`: ```sql
SELECT "city" FROM "table1_28005160_2" WHERE "country"='Sweden';
## Task Generate a SQL query to answer the following question: `What cities are in sweden on this list?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28005160_2" ( "sponsored_name" text, "non_sponsored_name" text, "sponsor" text, "stadium" text, "city" text, "country" text, "sport" text, "sponsorship_ended" real ); ### SQL Given the database schema, here is the SQL query that answers `What cities are in sweden on this list?`: ```sql
SELECT "country" FROM "table1_28005160_2" WHERE "city"='New Orleans';
## Task Generate a SQL query to answer the following question: `What country is new orleans in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28005160_2" ( "sponsored_name" text, "non_sponsored_name" text, "sponsor" text, "stadium" text, "city" text, "country" text, "sport" text, "sponsorship_ended" real ); ### SQL Given the database schema, here is the SQL query that answers `What country is new orleans in?`: ```sql
SELECT "country" FROM "table1_28005160_2" WHERE "sponsored_name"='New Orleans Shell Shockers';
## Task Generate a SQL query to answer the following question: `What country are the new orleans shell shockers from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28005160_2" ( "sponsored_name" text, "non_sponsored_name" text, "sponsor" text, "stadium" text, "city" text, "country" text, "sport" text, "sponsorship_ended" real ); ### SQL Given the database schema, here is the SQL query that answers `What country are the new orleans shell shockers from?`: ```sql
SELECT "arrangement" FROM "track_listing" WHERE "title"='Bets3ab 3alia Nafsy';
## Task Generate a SQL query to answer the following question: `What is the arrangement for bets3ab 3alia nafsy?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "track_listing" ( "no" real, "title" text, "lyricist" text, "composer" text, "arrangement" text, "sound_engineer" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the arrangement for bets3ab 3alia nafsy?`: ```sql
SELECT "composer" FROM "track_listing" WHERE "title"='Ain Shams';
## Task Generate a SQL query to answer the following question: `Who was the composer of ain shams?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "track_listing" ( "no" real, "title" text, "lyricist" text, "composer" text, "arrangement" text, "sound_engineer" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the composer of ain shams?`: ```sql
SELECT COUNT("no") FROM "track_listing" WHERE "title"='Kam Wa7ed Fina';
## Task Generate a SQL query to answer the following question: `How many numbers are there for kam wa7ed fina?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "track_listing" ( "no" real, "title" text, "lyricist" text, "composer" text, "arrangement" text, "sound_engineer" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `How many numbers are there for kam wa7ed fina?`: ```sql
SELECT "composer" FROM "track_listing" WHERE "title"='Te3rafy';
## Task Generate a SQL query to answer the following question: `Who was the composer of te3rafy?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "track_listing" ( "no" real, "title" text, "lyricist" text, "composer" text, "arrangement" text, "sound_engineer" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the composer of te3rafy?`: ```sql
SELECT COUNT("sound_engineer") FROM "track_listing" WHERE "title"='Law Hakon ''3er Leek';
## Task Generate a SQL query to answer the following question: `How many sound engineers were there for law hakon '3er leek?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "track_listing" ( "no" real, "title" text, "lyricist" text, "composer" text, "arrangement" text, "sound_engineer" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `How many sound engineers were there for law hakon '3er leek?`: ```sql
SELECT "no" FROM "track_listing" WHERE "lyricist"='Ahmed Metwally';
## Task Generate a SQL query to answer the following question: `Which number was the lyricist ahmed metwally?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "track_listing" ( "no" real, "title" text, "lyricist" text, "composer" text, "arrangement" text, "sound_engineer" text, "length" text ); ### SQL Given the database schema, here is the SQL query that answers `Which number was the lyricist ahmed metwally?`: ```sql
SELECT "site_stadium" FROM "schedule" WHERE "score"='11-4';
## Task Generate a SQL query to answer the following question: `What was the site of the game that had an 11-4 score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "num" real, "date" text, "opponent" text, "site_stadium" text, "score" text, "win" text, "loss" text, "save" text, "attendance" real, "overall_record" text, "ncaat_record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the site of the game that had an 11-4 score?`: ```sql
SELECT "ncaat_record" FROM "schedule" WHERE "date"='June 26';
## Task Generate a SQL query to answer the following question: `What was the NCAA Tournament record after the June 26 game?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "num" real, "date" text, "opponent" text, "site_stadium" text, "score" text, "win" text, "loss" text, "save" text, "attendance" real, "overall_record" text, "ncaat_record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the NCAA Tournament record after the June 26 game?`: ```sql
SELECT "save" FROM "schedule" WHERE "loss"='Duke (3-2)';
## Task Generate a SQL query to answer the following question: `Who had the save in the game in which Duke (3-2) took the loss?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "num" real, "date" text, "opponent" text, "site_stadium" text, "score" text, "win" text, "loss" text, "save" text, "attendance" real, "overall_record" text, "ncaat_record" text ); ### SQL Given the database schema, here is the SQL query that answers `Who had the save in the game in which Duke (3-2) took the loss?`: ```sql
SELECT COUNT("event_date") FROM "schedule" WHERE "event_details"='Women''s Sabre';
## Task Generate a SQL query to answer the following question: `How many event dates occurred when event details were women's sabre?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "event_date" text, "event_day" text, "approx_duration" text, "starting_time" text, "event_details" text ); ### SQL Given the database schema, here is the SQL query that answers `How many event dates occurred when event details were women's sabre?`: ```sql
SELECT "approx_duration" FROM "schedule" WHERE "event_details"='Women''s Foil';
## Task Generate a SQL query to answer the following question: `What is every value for approximate duration when event details is women's foil?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "event_date" text, "event_day" text, "approx_duration" text, "starting_time" text, "event_details" text ); ### SQL Given the database schema, here is the SQL query that answers `What is every value for approximate duration when event details is women's foil?`: ```sql
SELECT "event_date" FROM "schedule" WHERE "event_day"='Sunday' AND "starting_time"='9:30 am';
## Task Generate a SQL query to answer the following question: `What is every event date on Sunday with a starting time of 9:30 am?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "event_date" text, "event_day" text, "approx_duration" text, "starting_time" text, "event_details" text ); ### SQL Given the database schema, here is the SQL query that answers `What is every event date on Sunday with a starting time of 9:30 am?`: ```sql
SELECT COUNT("viewers") FROM "table1_27994983_8" WHERE "draw"=2;
## Task Generate a SQL query to answer the following question: `How many items appear in the viewers column when the draw is 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27994983_8" ( "draw" real, "artist" text, "song_english_translation" text, "lyrics_l_music_m" text, "juries" real, "viewers" real, "total" real, "place" real ); ### SQL Given the database schema, here is the SQL query that answers `How many items appear in the viewers column when the draw is 2?`: ```sql
SELECT MAX("viewers") FROM "table1_27994983_8" WHERE "draw"=3;
## Task Generate a SQL query to answer the following question: `How many viewers are the when the draw is 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27994983_8" ( "draw" real, "artist" text, "song_english_translation" text, "lyrics_l_music_m" text, "juries" real, "viewers" real, "total" real, "place" real ); ### SQL Given the database schema, here is the SQL query that answers `How many viewers are the when the draw is 3?`: ```sql
SELECT MAX("juries") FROM "table1_27994983_8" WHERE "draw"=3;
## Task Generate a SQL query to answer the following question: `How many juries are there when the draw is 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27994983_8" ( "draw" real, "artist" text, "song_english_translation" text, "lyrics_l_music_m" text, "juries" real, "viewers" real, "total" real, "place" real ); ### SQL Given the database schema, here is the SQL query that answers `How many juries are there when the draw is 3?`: ```sql
SELECT MAX("juries") FROM "table1_27994983_8" WHERE "artist"='Brolle';
## Task Generate a SQL query to answer the following question: `How many juries are there for Brolle?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_27994983_8" ( "draw" real, "artist" text, "song_english_translation" text, "lyrics_l_music_m" text, "juries" real, "viewers" real, "total" real, "place" real ); ### SQL Given the database schema, here is the SQL query that answers `How many juries are there for Brolle?`: ```sql
SELECT "former_county" FROM "former_districts" WHERE "district"='Great Grimsby';
## Task Generate a SQL query to answer the following question: `What are the former counties of the Great Grimsby district?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_districts" ( "district" text, "status" text, "date_abolished" text, "former_county" text, "successor" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the former counties of the Great Grimsby district?`: ```sql
SELECT COUNT("status") FROM "former_districts" WHERE "district"='Durham';
## Task Generate a SQL query to answer the following question: `How many statuses are there for the Durham district?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_districts" ( "district" text, "status" text, "date_abolished" text, "former_county" text, "successor" text ); ### SQL Given the database schema, here is the SQL query that answers `How many statuses are there for the Durham district?`: ```sql
SELECT "status" FROM "former_districts" WHERE "successor"='Wiltshire';
## Task Generate a SQL query to answer the following question: `What are the statuses of the districts whose successor is Wiltshire?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_districts" ( "district" text, "status" text, "date_abolished" text, "former_county" text, "successor" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the statuses of the districts whose successor is Wiltshire?`: ```sql
SELECT MAX("sdlp") FROM "by_council" WHERE "council"='Belfast';
## Task Generate a SQL query to answer the following question: `What is the SDLP of Belfast?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_council" ( "council" text, "tuv" real, "democratic_unionist" real, "ulster_unionist" real, "alliance" real, "sdlp" real, "sinn_f_in" real, "green_ni" real, "independent" real, "others" text, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the SDLP of Belfast?`: ```sql
SELECT MIN("alliance") FROM "by_council" WHERE "total"=25;
## Task Generate a SQL query to answer the following question: `What is the smallest Alliance where the total is 25?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_council" ( "council" text, "tuv" real, "democratic_unionist" real, "ulster_unionist" real, "alliance" real, "sdlp" real, "sinn_f_in" real, "green_ni" real, "independent" real, "others" text, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest Alliance where the total is 25?`: ```sql
SELECT "written_by" FROM "table1_28019988_2" WHERE "u_s_viewers_million"='2.93';
## Task Generate a SQL query to answer the following question: `Who wrote the episode that 2.93 million viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28019988_2" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `Who wrote the episode that 2.93 million viewers?`: ```sql
SELECT MAX("series_num") FROM "table1_28019988_2" WHERE "production_code"='BDF101';
## Task Generate a SQL query to answer the following question: `What series number is the episode with production code bdf101?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28019988_2" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What series number is the episode with production code bdf101?`: ```sql
SELECT MAX("series_num") FROM "table1_28019988_2" WHERE "title"='\"Booty\"';
## Task Generate a SQL query to answer the following question: `What series number is the episode entitled "Booty"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28019988_2" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What series number is the episode entitled "Booty"?`: ```sql
SELECT "series_num" FROM "table1_28019988_2" WHERE "production_code"='BDF109';
## Task Generate a SQL query to answer the following question: `What is the series number for the episode with production code bdf109?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28019988_2" ( "series_num" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the series number for the episode with production code bdf109?`: ```sql
SELECT "directed_by" FROM "table1_28027307_1" WHERE "production_code"='6AKY11';
## Task Generate a SQL query to answer the following question: `Who directed the episode with the production code of 6AKY11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28027307_1" ( "no_in_series" real, "no_in_season" 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 directed the episode with the production code of 6AKY11?`: ```sql
SELECT "written_by" FROM "table1_28027307_1" WHERE "title"='\"The Feet on the Beach\"';
## Task Generate a SQL query to answer the following question: `Who wrote the episode titled "The Feet on the Beach"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28027307_1" ( "no_in_series" real, "no_in_season" 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 wrote the episode titled "The Feet on the Beach"?`: ```sql
SELECT "no_in_season" FROM "table1_28027307_1" WHERE "title"='\"The Blackout in the Blizzard\"';
## Task Generate a SQL query to answer the following question: `What number episode in the season was titled "The Blackout in the Blizzard"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28027307_1" ( "no_in_series" real, "no_in_season" 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 number episode in the season was titled "The Blackout in the Blizzard"?`: ```sql
SELECT "u_s_viewers_millions" FROM "table1_28027307_1" WHERE "production_code"='6AKY07';
## Task Generate a SQL query to answer the following question: `How many millions of U.S. viewers watched the episode with the production code of 6AKY07?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28027307_1" ( "no_in_series" real, "no_in_season" 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 millions of U.S. viewers watched the episode with the production code of 6AKY07?`: ```sql
SELECT MIN("no_in_series") FROM "table1_28027307_1" WHERE "u_s_viewers_millions"='10.96';
## Task Generate a SQL query to answer the following question: `What number episode in the series was watched by 10.96 million U.S. viewers? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_28027307_1" ( "no_in_series" real, "no_in_season" 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 number episode in the series was watched by 10.96 million U.S. viewers? `: ```sql
SELECT "dance_song" FROM "table1_2803106_1" WHERE "total"='31';
## Task Generate a SQL query to answer the following question: `What dance had a score total of 31?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2803106_1" ( "week_num" real, "dance_song" text, "horwood" text, "goodman" text, "dixon" text, "tonioli" text, "total" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What dance had a score total of 31?`: ```sql
SELECT "result" FROM "table1_2803106_1" WHERE "tonioli"='8' AND "horwood"='6';
## Task Generate a SQL query to answer the following question: `What was the result for the dance that tonioli's scored an 8 and horwood scored a 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2803106_1" ( "week_num" real, "dance_song" text, "horwood" text, "goodman" text, "dixon" text, "tonioli" text, "total" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the result for the dance that tonioli's scored an 8 and horwood scored a 6?`: ```sql
SELECT COUNT("total") FROM "table1_2803106_1" WHERE "tonioli"='9' AND "horwood"='6';
## Task Generate a SQL query to answer the following question: `How many times did tonioli score a 9 when horwood scored a 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2803106_1" ( "week_num" real, "dance_song" text, "horwood" text, "goodman" text, "dixon" text, "tonioli" text, "total" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `How many times did tonioli score a 9 when horwood scored a 6?`: ```sql
SELECT "tonioli" FROM "table1_2803106_1" WHERE "week_num"=11 AND "dixon"='8';
## Task Generate a SQL query to answer the following question: `On week 11 when Dixon scored an 8, what was tonioli's score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2803106_1" ( "week_num" real, "dance_song" text, "horwood" text, "goodman" text, "dixon" text, "tonioli" text, "total" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `On week 11 when Dixon scored an 8, what was tonioli's score?`: ```sql
SELECT "winners_from_previous_round" FROM "teams" WHERE "round"='Semi finals';
## Task Generate a SQL query to answer the following question: `How many winners from previous round were there in the semi finals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams" ( "round" text, "clubs_remaining" real, "clubs_involved" real, "winners_from_previous_round" text, "new_entries_this_round" text, "leagues_entering_at_this_round" text ); ### SQL Given the database schema, here is the SQL query that answers `How many winners from previous round were there in the semi finals?`: ```sql
SELECT "round" FROM "teams" WHERE "winners_from_previous_round"='32';
## Task Generate a SQL query to answer the following question: `What was the round that had 32 winners from previous round?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams" ( "round" text, "clubs_remaining" real, "clubs_involved" real, "winners_from_previous_round" text, "new_entries_this_round" text, "leagues_entering_at_this_round" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the round that had 32 winners from previous round?`: ```sql