output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "week_num" FROM "performances_results" WHERE "original_artist"='Sara Bareilles';
## Task Generate a SQL query to answer the following question: `What week #(s featured sara bareilles as the original artist?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_results" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What week #(s featured sara bareilles as the original artist?`: ```sql
SELECT "week_num" FROM "performances_results" WHERE "theme"='First Solo';
## Task Generate a SQL query to answer the following question: `What week # featured first solo as the theme?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_results" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What week # featured first solo as the theme?`: ```sql
SELECT COUNT("theme") FROM "performances_results" WHERE "original_artist"='Duffy';
## Task Generate a SQL query to answer the following question: `How many weeks featured duffy as the original artist?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_results" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `How many weeks featured duffy as the original artist?`: ```sql
SELECT "original_artist" FROM "performances_results" WHERE "result"='Selected';
## Task Generate a SQL query to answer the following question: `Who was the originally artist when Jasmine Murray was selected?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_results" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the originally artist when Jasmine Murray was selected?`: ```sql
SELECT "song_choice" FROM "performances_results" WHERE "theme"='Year They Were Born';
## Task Generate a SQL query to answer the following question: `With theme the Year They Were Born, what is the song of choice?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_results" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `With theme the Year They Were Born, what is the song of choice?`: ```sql
SELECT "original_artist" FROM "performances_results" WHERE "order_num"='7' AND "theme"='Motown';
## Task Generate a SQL query to answer the following question: `With order number 7 and the theme is Motown, who were the original artists?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_results" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `With order number 7 and the theme is Motown, who were the original artists?`: ```sql
SELECT COUNT("order_num") FROM "performances_results" WHERE "original_artist"='Bette Midler';
## Task Generate a SQL query to answer the following question: `With an original artist names Bette Midler, what is the order number?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_results" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `With an original artist names Bette Midler, what is the order number?`: ```sql
SELECT "week_num" FROM "performances_results" WHERE "original_artist"='Tina Turner';
## Task Generate a SQL query to answer the following question: `With original artist of Tina Turner, what is the week number?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_results" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `With original artist of Tina Turner, what is the week number?`: ```sql
SELECT "original_artist" FROM "performances_results" WHERE "theme"='N/A';
## Task Generate a SQL query to answer the following question: `Who is the original artist with a theme of N/A?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "performances_results" ( "week_num" text, "theme" text, "song_choice" text, "original_artist" text, "order_num" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the original artist with a theme of N/A?`: ```sql
SELECT "team" FROM "table1_2150776_1" WHERE "date"='June 16' AND "driver"='Jeff Gordon';
## Task Generate a SQL query to answer the following question: `Name the team for june 16 jeff gordon` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2150776_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the team for june 16 jeff gordon`: ```sql
SELECT "driver" FROM "table1_2150776_1" WHERE "laps"='200' AND "year"='1997';
## Task Generate a SQL query to answer the following question: `Name the driver for 200 laps 1997` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2150776_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the driver for 200 laps 1997`: ```sql
SELECT "team" FROM "table1_2150776_1" WHERE "driver"='Ricky Rudd';
## Task Generate a SQL query to answer the following question: `Name the team for ricky rudd` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2150776_1" ( "year" text, "date" text, "driver" text, "team" text, "manufacturer" text, "laps" text, "miles_km" text, "race_time" text, "average_speed_mph" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the team for ricky rudd`: ```sql
SELECT "ranking" FROM "round_robin" WHERE "rr2_pts"=4;
## Task Generate a SQL query to answer the following question: `What is the rank when RR2 has 4 points?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_robin" ( "team_name" text, "races" real, "won" real, "rr1_pts" real, "rr2_pts" real, "rr3_pts" real, "total_pts" real, "ranking" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the rank when RR2 has 4 points?`: ```sql
SELECT COUNT("rr1_pts") FROM "round_robin" WHERE "team_name"='Swedish America''s Cup Challenge';
## Task Generate a SQL query to answer the following question: `How many points does Swedish America's Cup Challenge have for rr1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_robin" ( "team_name" text, "races" real, "won" real, "rr1_pts" real, "rr2_pts" real, "rr3_pts" real, "total_pts" real, "ranking" real ); ### SQL Given the database schema, here is the SQL query that answers `How many points does Swedish America's Cup Challenge have for rr1?`: ```sql
SELECT "senior_u_s_senator" FROM "political_party_strength" WHERE "governor"='D. Patrick';
## Task Generate a SQL query to answer the following question: `Who was the senior US senator in the state whose governor was D. Patrick?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "political_party_strength" ( "state" text, "governor" text, "senior_u_s_senator" text, "junior_u_s_senator" text, "u_s_house_delegation" text, "upper_house_majority" text, "lower_house_majority" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the senior US senator in the state whose governor was D. Patrick?`: ```sql
SELECT "lower_house_majority" FROM "political_party_strength" WHERE "senior_u_s_senator"='J. Shaheen';
## Task Generate a SQL query to answer the following question: `What's the lower house majority in the state whose Senior senator is J. Shaheen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "political_party_strength" ( "state" text, "governor" text, "senior_u_s_senator" text, "junior_u_s_senator" text, "u_s_house_delegation" text, "upper_house_majority" text, "lower_house_majority" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the lower house majority in the state whose Senior senator is J. Shaheen?`: ```sql
SELECT "name" FROM "special_stages" WHERE "time_cet"='09:58';
## Task Generate a SQL query to answer the following question: `Who is every name for time(cet) of 09:58?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "special_stages" ( "day" text, "stage" text, "time_cet" text, "name" text, "length" text, "winner" text, "time" text, "avg_spd" text, "rally_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is every name for time(cet) of 09:58?`: ```sql
SELECT "time_cet" FROM "special_stages" WHERE "name"='Lillehammer 2';
## Task Generate a SQL query to answer the following question: `What is every time(cet) for the name of Lillehammer 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "special_stages" ( "day" text, "stage" text, "time_cet" text, "name" text, "length" text, "winner" text, "time" text, "avg_spd" text, "rally_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `What is every time(cet) for the name of Lillehammer 2?`: ```sql
SELECT "name" FROM "special_stages" WHERE "time_cet"='09:03';
## Task Generate a SQL query to answer the following question: `Who is every name for time(cet) of 09:03?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "special_stages" ( "day" text, "stage" text, "time_cet" text, "name" text, "length" text, "winner" text, "time" text, "avg_spd" text, "rally_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is every name for time(cet) of 09:03?`: ```sql
SELECT "day" FROM "special_stages" WHERE "stage"='SS11';
## Task Generate a SQL query to answer the following question: `Which days have a stage of ss11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "special_stages" ( "day" text, "stage" text, "time_cet" text, "name" text, "length" text, "winner" text, "time" text, "avg_spd" text, "rally_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `Which days have a stage of ss11?`: ```sql
SELECT "time_cet" FROM "special_stages" WHERE "time"='5:04.8';
## Task Generate a SQL query to answer the following question: `What is every time(cet) for a time of 5:04.8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "special_stages" ( "day" text, "stage" text, "time_cet" text, "name" text, "length" text, "winner" text, "time" text, "avg_spd" text, "rally_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `What is every time(cet) for a time of 5:04.8?`: ```sql
SELECT COUNT("caliber") FROM "euronorm_standard_for_security_glazing" WHERE "type"='LB/RN';
## Task Generate a SQL query to answer the following question: `How many calibers require the type LB/RN?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "euronorm_standard_for_security_glazing" ( "class" text, "weapon" text, "caliber" text, "type" text, "weight_g" text, "range_m" text, "velocity_m_s" text, "impact_energy" text, "shots" real ); ### SQL Given the database schema, here is the SQL query that answers `How many calibers require the type LB/RN?`: ```sql
SELECT "class" FROM "euronorm_standard_for_security_glazing" WHERE "type"='FJ/RN/SC';
## Task Generate a SQL query to answer the following question: `Type FJ/RN/SC is associated with what class?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "euronorm_standard_for_security_glazing" ( "class" text, "weapon" text, "caliber" text, "type" text, "weight_g" text, "range_m" text, "velocity_m_s" text, "impact_energy" text, "shots" real ); ### SQL Given the database schema, here is the SQL query that answers `Type FJ/RN/SC is associated with what class?`: ```sql
SELECT "type" FROM "euronorm_standard_for_security_glazing" WHERE "caliber"='.44 Magnum';
## Task Generate a SQL query to answer the following question: `What type of glazing will stop a .44 magnum?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "euronorm_standard_for_security_glazing" ( "class" text, "weapon" text, "caliber" text, "type" text, "weight_g" text, "range_m" text, "velocity_m_s" text, "impact_energy" text, "shots" real ); ### SQL Given the database schema, here is the SQL query that answers `What type of glazing will stop a .44 magnum?`: ```sql
SELECT MIN("shots") FROM "euronorm_standard_for_security_glazing";
## Task Generate a SQL query to answer the following question: `What is the fewest shots a glazing can handle?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "euronorm_standard_for_security_glazing" ( "class" text, "weapon" text, "caliber" text, "type" text, "weight_g" text, "range_m" text, "velocity_m_s" text, "impact_energy" text, "shots" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the fewest shots a glazing can handle?`: ```sql
SELECT "range_m" FROM "euronorm_standard_for_security_glazing" WHERE "type"='FJ/PB/SCP';
## Task Generate a SQL query to answer the following question: `What range does type FJ/PB/SCP work at?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "euronorm_standard_for_security_glazing" ( "class" text, "weapon" text, "caliber" text, "type" text, "weight_g" text, "range_m" text, "velocity_m_s" text, "impact_energy" text, "shots" real ); ### SQL Given the database schema, here is the SQL query that answers `What range does type FJ/PB/SCP work at?`: ```sql
SELECT "drivetrain" FROM "table1_21530474_1" WHERE "engine_code"='2UR-FSE';
## Task Generate a SQL query to answer the following question: `Name the drivetrain for 2ur-fse` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21530474_1" ( "chassis_code" text, "model_no" text, "production_years" text, "drivetrain" text, "transmission" text, "engine_type" text, "engine_code" text, "region_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the drivetrain for 2ur-fse`: ```sql
SELECT "region_s" FROM "table1_21530474_1" WHERE "chassis_code"='USF45';
## Task Generate a SQL query to answer the following question: `Name the regions for usf45` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21530474_1" ( "chassis_code" text, "model_no" text, "production_years" text, "drivetrain" text, "transmission" text, "engine_type" text, "engine_code" text, "region_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the regions for usf45`: ```sql
SELECT "model_no" FROM "table1_21530474_1" WHERE "chassis_code"='USF46';
## Task Generate a SQL query to answer the following question: `Name the model number for usf46` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21530474_1" ( "chassis_code" text, "model_no" text, "production_years" text, "drivetrain" text, "transmission" text, "engine_type" text, "engine_code" text, "region_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the model number for usf46`: ```sql
SELECT "drivetrain" FROM "table1_21530474_1" WHERE "engine_code"='1UR-FSE' AND "chassis_code"='USF41';
## Task Generate a SQL query to answer the following question: `Name the drivetrain for 1ur-fse for usf41` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21530474_1" ( "chassis_code" text, "model_no" text, "production_years" text, "drivetrain" text, "transmission" text, "engine_type" text, "engine_code" text, "region_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the drivetrain for 1ur-fse for usf41`: ```sql
SELECT "october_2012" FROM "unemployment_rates_in_new_england" WHERE "october_2010"='9.1';
## Task Generate a SQL query to answer the following question: `For the area which was 9.1 in October 2010, what is the figure for October 2012?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "unemployment_rates_in_new_england" ( "employment_area" text, "october_2010" text, "october_2011" text, "october_2012" text, "net_change" text ); ### SQL Given the database schema, here is the SQL query that answers `For the area which was 9.1 in October 2010, what is the figure for October 2012?`: ```sql
SELECT "employment_area" FROM "unemployment_rates_in_new_england" WHERE "october_2010"='5.7';
## Task Generate a SQL query to answer the following question: `Where is the rate 5.7 in October 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "unemployment_rates_in_new_england" ( "employment_area" text, "october_2010" text, "october_2011" text, "october_2012" text, "net_change" text ); ### SQL Given the database schema, here is the SQL query that answers `Where is the rate 5.7 in October 2010?`: ```sql
SELECT "original_air_date" FROM "table1_21550870_1" WHERE "u_s_viewers_million"='9.16';
## Task Generate a SQL query to answer the following question: `Name the original air date for 9.16 viewers` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21550870_1" ( "no" real, "num" real, "title" text, "directed_by" text, "written_by" text, "u_s_viewers_million" 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 9.16 viewers`: ```sql
SELECT COUNT("production_code") FROM "table1_21550870_1" WHERE "written_by"='Steve Cohen & Andrew Dettman';
## Task Generate a SQL query to answer the following question: `Name the total number of production code for episode by steve cohen & andrew dettman` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21550870_1" ( "no" real, "num" real, "title" text, "directed_by" text, "written_by" text, "u_s_viewers_million" text, "original_air_date" text, "production_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of production code for episode by steve cohen & andrew dettman`: ```sql
SELECT "population_millions_2011" FROM "members" WHERE "hdi_2011"='0.453 (low)';
## Task Generate a SQL query to answer the following question: `What is the population in millions for 2011 where the HDI for 2011 is 0.453 (low)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "members" ( "country" text, "area_km" text, "population_millions_2011" text, "gdp_ppp_usd_per_capita" real, "gdp_nominal_billions_usd" text, "hdi_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the population in millions for 2011 where the HDI for 2011 is 0.453 (low)?`: ```sql
SELECT "population_millions_2011" FROM "members" WHERE "gdp_nominal_billions_usd"='4';
## Task Generate a SQL query to answer the following question: `What is the population in millions for 2011 where the GDP (nominal) (billions USD) is 4? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "members" ( "country" text, "area_km" text, "population_millions_2011" text, "gdp_ppp_usd_per_capita" real, "gdp_nominal_billions_usd" text, "hdi_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the population in millions for 2011 where the GDP (nominal) (billions USD) is 4? `: ```sql
SELECT "hdi_2011" FROM "members" WHERE "country"='Tunisia';
## Task Generate a SQL query to answer the following question: `What is the HDI for 2011 in Tunisia? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "members" ( "country" text, "area_km" text, "population_millions_2011" text, "gdp_ppp_usd_per_capita" real, "gdp_nominal_billions_usd" text, "hdi_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the HDI for 2011 in Tunisia? `: ```sql
SELECT "area_km" FROM "members" WHERE "population_millions_2011"='37.1';
## Task Generate a SQL query to answer the following question: `What is the area (km2) where the population in millions for 2011 is 37.1? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "members" ( "country" text, "area_km" text, "population_millions_2011" text, "gdp_ppp_usd_per_capita" real, "gdp_nominal_billions_usd" text, "hdi_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the area (km2) where the population in millions for 2011 is 37.1? `: ```sql
SELECT MIN("gdp_ppp_usd_per_capita") FROM "members" WHERE "country"='Algeria';
## Task Generate a SQL query to answer the following question: `What is the GDP (PPP) (USD, per capita) for Algeria? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "members" ( "country" text, "area_km" text, "population_millions_2011" text, "gdp_ppp_usd_per_capita" real, "gdp_nominal_billions_usd" text, "hdi_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the GDP (PPP) (USD, per capita) for Algeria? `: ```sql
SELECT "gdp_nominal_billions_usd" FROM "members" WHERE "population_millions_2011"='3.4';
## Task Generate a SQL query to answer the following question: `What is the GDP (nominal) (billions USD) where the population in millions for 2011 is 3.4? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "members" ( "country" text, "area_km" text, "population_millions_2011" text, "gdp_ppp_usd_per_capita" real, "gdp_nominal_billions_usd" text, "hdi_2011" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the GDP (nominal) (billions USD) where the population in millions for 2011 is 3.4? `: ```sql
SELECT COUNT("cab_size") FROM "table1_2155350_2" WHERE "category"='4 Medium tanker';
## Task Generate a SQL query to answer the following question: `Name the number of cab size for 4 medium tanker` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2155350_2" ( "category" text, "sub_category" text, "cab_size" text, "drive_wheels" text, "capacity_litres" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number of cab size for 4 medium tanker`: ```sql
SELECT "category" FROM "table1_2155350_2" WHERE "cab_size"='Crew' AND "sub_category"='Super tanker';
## Task Generate a SQL query to answer the following question: `Name the category for cab size crew and super tanker` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2155350_2" ( "category" text, "sub_category" text, "cab_size" text, "drive_wheels" text, "capacity_litres" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the category for cab size crew and super tanker`: ```sql
SELECT "capacity_litres" FROM "table1_2155350_2" WHERE "cab_size"='Single' AND "category"='2 Medium tanker';
## Task Generate a SQL query to answer the following question: `Name the capacity for single cab size 2 medium tanker` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2155350_2" ( "category" text, "sub_category" text, "cab_size" text, "drive_wheels" text, "capacity_litres" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the capacity for single cab size 2 medium tanker`: ```sql
SELECT "external_link" FROM "external_links" WHERE "location"='Brechin';
## Task Generate a SQL query to answer the following question: `What school is in Brechin?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "external_links" ( "school" text, "location" text, "catchment" text, "roll" real, "gender" text, "external_link" text ); ### SQL Given the database schema, here is the SQL query that answers `What school is in Brechin?`: ```sql
SELECT MAX("roll") FROM "external_links" WHERE "school"='Brechin High School';
## Task Generate a SQL query to answer the following question: `How many kids go to Brechin High School?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "external_links" ( "school" text, "location" text, "catchment" text, "roll" real, "gender" text, "external_link" text ); ### SQL Given the database schema, here is the SQL query that answers `How many kids go to Brechin High School?`: ```sql
SELECT MIN("began_in_st_louis") FROM "former_teams" WHERE "league"='Negro American League';
## Task Generate a SQL query to answer the following question: `What year did Negro American League join?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_teams" ( "team" text, "sport" text, "league" text, "established" real, "began_in_st_louis" real, "venue" text, "championships_in_st_louis" text, "left_st_louis" real ); ### SQL Given the database schema, here is the SQL query that answers `What year did Negro American League join?`: ```sql
SELECT MIN("left_st_louis") FROM "former_teams" WHERE "venue"='Scottrade Center';
## Task Generate a SQL query to answer the following question: `What year did the team who played at the Scottrade Center leave the city?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_teams" ( "team" text, "sport" text, "league" text, "established" real, "began_in_st_louis" real, "venue" text, "championships_in_st_louis" text, "left_st_louis" real ); ### SQL Given the database schema, here is the SQL query that answers `What year did the team who played at the Scottrade Center leave the city?`: ```sql
SELECT "championships_in_st_louis" FROM "former_teams" WHERE "began_in_st_louis"=1950;
## Task Generate a SQL query to answer the following question: `How may championships were won by the team that started in 1950?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_teams" ( "team" text, "sport" text, "league" text, "established" real, "began_in_st_louis" real, "venue" text, "championships_in_st_louis" text, "left_st_louis" real ); ### SQL Given the database schema, here is the SQL query that answers `How may championships were won by the team that started in 1950?`: ```sql
SELECT "championships_in_st_louis" FROM "former_teams" WHERE "sport"='Arena Football';
## Task Generate a SQL query to answer the following question: `How many championships were won for arena football?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "former_teams" ( "team" text, "sport" text, "league" text, "established" real, "began_in_st_louis" real, "venue" text, "championships_in_st_louis" text, "left_st_louis" real ); ### SQL Given the database schema, here is the SQL query that answers `How many championships were won for arena football?`: ```sql
SELECT COUNT("asian_team_classification") FROM "classification_leadership" WHERE "asian_rider_classification"='Samai Amari';
## Task Generate a SQL query to answer the following question: `When samai amari is the asian rider classification how many asian team classifications are there?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification_leadership" ( "stage" real, "winner" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "asian_rider_classification" text, "team_classification" text, "asian_team_classification" text ); ### SQL Given the database schema, here is the SQL query that answers `When samai amari is the asian rider classification how many asian team classifications are there?`: ```sql
SELECT "general_classification" FROM "classification_leadership" WHERE "stage"=4;
## Task Generate a SQL query to answer the following question: `When 4 is the stage who is the general classification?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification_leadership" ( "stage" real, "winner" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "asian_rider_classification" text, "team_classification" text, "asian_team_classification" text ); ### SQL Given the database schema, here is the SQL query that answers `When 4 is the stage who is the general classification?`: ```sql
SELECT "no_in_season" FROM "table1_2156758_4" WHERE "written_by"='Chris Mitchell and Erik Wiese';
## Task Generate a SQL query to answer the following question: `What is the number in season for the episode written by Chris Mitchell and Erik Wiese?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2156758_4" ( "no_in_series" text, "no_in_season" text, "title" text, "directed_by" text, "written_by" text, "original_air_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the number in season for the episode written by Chris Mitchell and Erik Wiese?`: ```sql
SELECT "title" FROM "table1_2156758_4" WHERE "no_in_series"='28';
## Task Generate a SQL query to answer the following question: `What is the title for episode number in series of 28?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2156758_4" ( "no_in_series" text, "no_in_season" text, "title" text, "directed_by" text, "written_by" text, "original_air_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the title for episode number in series of 28?`: ```sql
SELECT "directed_by" FROM "table1_2156758_4" WHERE "title"='\"Jack and the Zombies\"';
## Task Generate a SQL query to answer the following question: `Who directed the episode titled "Jack and the Zombies"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2156758_4" ( "no_in_series" text, "no_in_season" text, "title" text, "directed_by" text, "written_by" text, "original_air_date" text ); ### SQL Given the database schema, here is the SQL query that answers `Who directed the episode titled "Jack and the Zombies"?`: ```sql
SELECT COUNT("title") FROM "table1_2156758_4" WHERE "written_by"='Don Shank and Genndy Tartakovsky';
## Task Generate a SQL query to answer the following question: `How many titles were written by Don Shank and Genndy Tartakovsky?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2156758_4" ( "no_in_series" text, "no_in_season" text, "title" text, "directed_by" text, "written_by" text, "original_air_date" text ); ### SQL Given the database schema, here is the SQL query that answers `How many titles were written by Don Shank and Genndy Tartakovsky?`: ```sql
SELECT "mens_3rd_xi" FROM "league_finishes" WHERE "ladies_1st_xi"='3rd, Sedgemoor Division 1';
## Task Generate a SQL query to answer the following question: `When 3rd, sedgemoor division 1 is the ladies 1st xi what is the mens 3rd xi?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_finishes" ( "season" text, "mens_1st_xi" text, "mens_2nd_xi" text, "mens_3rd_xi" text, "ladies_1st_xi" text ); ### SQL Given the database schema, here is the SQL query that answers `When 3rd, sedgemoor division 1 is the ladies 1st xi what is the mens 3rd xi?`: ```sql
SELECT "ladies_1st_xi" FROM "league_finishes" WHERE "mens_2nd_xi"='10th, South West District 1';
## Task Generate a SQL query to answer the following question: `When 10th, south west district 1 is the mens 2nd xi what is the ladies 1st xi?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_finishes" ( "season" text, "mens_1st_xi" text, "mens_2nd_xi" text, "mens_3rd_xi" text, "ladies_1st_xi" text ); ### SQL Given the database schema, here is the SQL query that answers `When 10th, south west district 1 is the mens 2nd xi what is the ladies 1st xi?`: ```sql
SELECT "season" FROM "league_finishes" WHERE "mens_2nd_xi"='5th, South Western District 2';
## Task Generate a SQL query to answer the following question: `When 5th, south western district 2 is the mens 2nd xi what is the season?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_finishes" ( "season" text, "mens_1st_xi" text, "mens_2nd_xi" text, "mens_3rd_xi" text, "ladies_1st_xi" text ); ### SQL Given the database schema, here is the SQL query that answers `When 5th, south western district 2 is the mens 2nd xi what is the season?`: ```sql
SELECT "mens_2nd_xi" FROM "league_finishes" WHERE "mens_1st_xi"='6th, South Division 2';
## Task Generate a SQL query to answer the following question: `When 6th, south division 2 is the mens 1st xi what is the mens 2nd xi?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "league_finishes" ( "season" text, "mens_1st_xi" text, "mens_2nd_xi" text, "mens_3rd_xi" text, "ladies_1st_xi" text ); ### SQL Given the database schema, here is the SQL query that answers `When 6th, south division 2 is the mens 1st xi what is the mens 2nd xi?`: ```sql
SELECT "stage" FROM "special_stages" WHERE "name"='Kourdali';
## Task Generate a SQL query to answer the following question: `Which stage has kourdali as the name?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "special_stages" ( "day" text, "stage" text, "time_eet" text, "name" text, "length" text, "winner" text, "time" text, "avg_spd" text, "rally_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `Which stage has kourdali as the name?`: ```sql
SELECT "stage" FROM "special_stages" WHERE "time_eet"='15:17';
## Task Generate a SQL query to answer the following question: `Which stage has 15:17 as time?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "special_stages" ( "day" text, "stage" text, "time_eet" text, "name" text, "length" text, "winner" text, "time" text, "avg_spd" text, "rally_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `Which stage has 15:17 as time?`: ```sql
SELECT "time" FROM "special_stages" WHERE "time_eet"='10:46';
## Task Generate a SQL query to answer the following question: `What is the time when time is 10:46?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "special_stages" ( "day" text, "stage" text, "time_eet" text, "name" text, "length" text, "winner" text, "time" text, "avg_spd" text, "rally_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the time when time is 10:46?`: ```sql
SELECT "time" FROM "special_stages" WHERE "stage"='SS12';
## Task Generate a SQL query to answer the following question: `What is the time when ss12 is stage?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "special_stages" ( "day" text, "stage" text, "time_eet" text, "name" text, "length" text, "winner" text, "time" text, "avg_spd" text, "rally_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the time when ss12 is stage?`: ```sql
SELECT "state_class" FROM "table1_2159506_3" WHERE "reason_for_change"='Resigned November 3, 1964';
## Task Generate a SQL query to answer the following question: `Name the state class for resigned november 3, 1964` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159506_3" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the state class for resigned november 3, 1964`: ```sql
SELECT COUNT("champion") FROM "table1_21584646_10" WHERE "runner_up"='Stefan Edberg';
## Task Generate a SQL query to answer the following question: `How many champions are shown for the runner-up of stefan edberg?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21584646_10" ( "week_of" text, "tournament" text, "champion" text, "runner_up" text, "semifinalists" text, "quarterfinalists" text ); ### SQL Given the database schema, here is the SQL query that answers `How many champions are shown for the runner-up of stefan edberg?`: ```sql
SELECT "week_of" FROM "table1_21584646_10" WHERE "semifinalists"='Stefan Edberg Anders Järryd' AND "champion"='John McEnroe 7–6, 6–3';
## Task Generate a SQL query to answer the following question: `What week was stefan edberg anders järryd was semifinalist and champion is john mcenroe 7–6, 6–3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21584646_10" ( "week_of" text, "tournament" text, "champion" text, "runner_up" text, "semifinalists" text, "quarterfinalists" text ); ### SQL Given the database schema, here is the SQL query that answers `What week was stefan edberg anders järryd was semifinalist and champion is john mcenroe 7–6, 6–3?`: ```sql
SELECT "runner_up" FROM "table1_21584646_10" WHERE "champion"='John McEnroe 6–2, 6–3';
## Task Generate a SQL query to answer the following question: `Who is the runner up for the champion of john mcenroe 6–2, 6–3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21584646_10" ( "week_of" text, "tournament" text, "champion" text, "runner_up" text, "semifinalists" text, "quarterfinalists" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the runner up for the champion of john mcenroe 6–2, 6–3?`: ```sql
SELECT "quarterfinalists" FROM "table1_21584646_10" WHERE "runner_up"='Mike De Palmer Gary Donnelly';
## Task Generate a SQL query to answer the following question: `Who were the quarterfinalists for the runner-ups of mike de palmer gary donnelly?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21584646_10" ( "week_of" text, "tournament" text, "champion" text, "runner_up" text, "semifinalists" text, "quarterfinalists" text ); ### SQL Given the database schema, here is the SQL query that answers `Who were the quarterfinalists for the runner-ups of mike de palmer gary donnelly?`: ```sql
SELECT "quarterfinalists" FROM "table1_21584646_10" WHERE "runner_up"='Jimmy Connors';
## Task Generate a SQL query to answer the following question: `Who are the quarterfinalists for runner-up jimmy connors?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21584646_10" ( "week_of" text, "tournament" text, "champion" text, "runner_up" text, "semifinalists" text, "quarterfinalists" text ); ### SQL Given the database schema, here is the SQL query that answers `Who are the quarterfinalists for runner-up jimmy connors?`: ```sql
SELECT COUNT("week_of") FROM "table1_21584646_10" WHERE "champion"='John McEnroe 6–2, 6–3';
## Task Generate a SQL query to answer the following question: `How many weeks are shown for the champion of john mcenroe 6–2, 6–3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21584646_10" ( "week_of" text, "tournament" text, "champion" text, "runner_up" text, "semifinalists" text, "quarterfinalists" text ); ### SQL Given the database schema, here is the SQL query that answers `How many weeks are shown for the champion of john mcenroe 6–2, 6–3?`: ```sql
SELECT "reason_for_change" FROM "table1_2159571_1" WHERE "date_of_successors_formal_installation"='March 16, 1960';
## Task Generate a SQL query to answer the following question: `What is every reason for change for the date of successors installation is March 16, 1960?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159571_1" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); ### SQL Given the database schema, here is the SQL query that answers `What is every reason for change for the date of successors installation is March 16, 1960?`: ```sql
SELECT "vacator" FROM "table1_2159571_1" WHERE "date_of_successors_formal_installation"='August 8, 1960';
## Task Generate a SQL query to answer the following question: `Who is every vacator if date of successors formal installation is August 8, 1960?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159571_1" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is every vacator if date of successors formal installation is August 8, 1960?`: ```sql
SELECT "successor" FROM "table1_2159571_2" WHERE "district"='Washington 3rd';
## Task Generate a SQL query to answer the following question: `Who is every successor for the Washington 3rd District?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159571_2" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is every successor for the Washington 3rd District?`: ```sql
SELECT "reason_for_change" FROM "table1_2159571_2" WHERE "district"='Washington 3rd';
## Task Generate a SQL query to answer the following question: `What is every reason for change for the Washington 3rd District?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159571_2" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `What is every reason for change for the Washington 3rd District?`: ```sql
SELECT "vacator" FROM "table1_2159571_2" WHERE "reason_for_change"='Resigned December 31, 1959';
## Task Generate a SQL query to answer the following question: `Who is every vacator with reason for change as resigned December 31, 1959?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159571_2" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is every vacator with reason for change as resigned December 31, 1959?`: ```sql
SELECT "district" FROM "table1_2159537_3" WHERE "date_successor_seated"='August 31, 1943';
## Task Generate a SQL query to answer the following question: `In what district was the successor seated August 31, 1943?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159537_3" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `In what district was the successor seated August 31, 1943?`: ```sql
SELECT "successor" FROM "table1_2159537_3" WHERE "reason_for_change"='Died January 16, 1944';
## Task Generate a SQL query to answer the following question: `Who was the successor for the reason for change being "died January 16, 1944?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159537_3" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the successor for the reason for change being "died January 16, 1944?`: ```sql
SELECT "successor" FROM "table1_2159537_3" WHERE "district"='New York 11th';
## Task Generate a SQL query to answer the following question: `Who was the successor in New York 11th district?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159537_3" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the successor in New York 11th district?`: ```sql
SELECT "date_successor_seated" FROM "table1_2159547_3" WHERE "vacator"='James P. Buchanan (D)';
## Task Generate a SQL query to answer the following question: `On what date was James P. Buchanan (d)'s successor seated?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159547_3" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was James P. Buchanan (d)'s successor seated?`: ```sql
SELECT COUNT("vacator") FROM "table1_2159547_3" WHERE "successor"='Dave E. Satterfield, Jr. (D)';
## Task Generate a SQL query to answer the following question: `How many people vacated to successor Dave E. Satterfield, Jr. (d)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159547_3" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `How many people vacated to successor Dave E. Satterfield, Jr. (d)?`: ```sql
SELECT "reason_for_change" FROM "table1_2159547_3" WHERE "vacator"='Robert L. Bacon (R)';
## Task Generate a SQL query to answer the following question: `Why did Robert L. Bacon (r) vacate?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2159547_3" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `Why did Robert L. Bacon (r) vacate?`: ```sql
SELECT "character" FROM "full_cast" WHERE "original_japanese"='Makio Inoue';
## Task Generate a SQL query to answer the following question: `Makio Inoue dubbed on which character?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "full_cast" ( "character" text, "original_japanese" text, "english_streamline" text, "english_manga_uk" text, "english_pioneer_geneon" text ); ### SQL Given the database schema, here is the SQL query that answers `Makio Inoue dubbed on which character?`: ```sql
SELECT "english_manga_uk" FROM "full_cast" WHERE "original_japanese"='Kō Nishimura';
## Task Generate a SQL query to answer the following question: `Who was the cast on the English (Manga UK) version if Kō Nishimura acted on the original Japanese?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "full_cast" ( "character" text, "original_japanese" text, "english_streamline" text, "english_manga_uk" text, "english_pioneer_geneon" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the cast on the English (Manga UK) version if Kō Nishimura acted on the original Japanese?`: ```sql
SELECT "original_japanese" FROM "full_cast" WHERE "english_manga_uk"='Sean Barrett';
## Task Generate a SQL query to answer the following question: `Who was the original Japanese cast if Sean Barrett acted on the English (Manga UK) version?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "full_cast" ( "character" text, "original_japanese" text, "english_streamline" text, "english_manga_uk" text, "english_pioneer_geneon" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the original Japanese cast if Sean Barrett acted on the English (Manga UK) version?`: ```sql
SELECT "district" FROM "table1_2160008_4" WHERE "reason_for_change"='Died July 4, 1939';
## Task Generate a SQL query to answer the following question: `Name the district for reason for change being died july 4, 1939` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2160008_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the district for reason for change being died july 4, 1939`: ```sql
SELECT COUNT("reason_for_change") FROM "table1_2160008_4" WHERE "date_successor_seated"='May 11, 1939';
## Task Generate a SQL query to answer the following question: `Name the number of reason for change on may 11, 1939` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2160008_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number of reason for change on may 11, 1939`: ```sql
SELECT "wed_3_june" FROM "practice_times_leaderboard_superbike_sen" WHERE "rank"=12;
## Task Generate a SQL query to answer the following question: `What were the time and speed for the rider ranked in 12 on Wed, June 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "practice_times_leaderboard_superbike_sen" ( "rank" real, "rider" text, "mon_1_june" text, "tue_2_june" text, "wed_3_june" text, "thurs_4_june" text, "fri_5_june" text ); ### SQL Given the database schema, here is the SQL query that answers `What were the time and speed for the rider ranked in 12 on Wed, June 3?`: ```sql
SELECT "series_num" FROM "table1_2161859_1" WHERE "title"='The Golden Frog';
## Task Generate a SQL query to answer the following question: `What is the series number for the Golden Frog?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2161859_1" ( "series_num" real, "title" text, "story_num" real, "artist" text, "strip_numbers" text, "number_of_strips" text, "dates_of_original_publication_of_strip" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the series number for the Golden Frog?`: ```sql
SELECT "artist" FROM "table1_2161859_1" WHERE "strip_numbers"='3932-4031A';
## Task Generate a SQL query to answer the following question: `Who is the artist for strip numbers 3932-4031a?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_2161859_1" ( "series_num" real, "title" text, "story_num" real, "artist" text, "strip_numbers" text, "number_of_strips" text, "dates_of_original_publication_of_strip" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the artist for strip numbers 3932-4031a?`: ```sql
SELECT "champions" FROM "champions_list" WHERE "third_place"='Ehime Shimanami';
## Task Generate a SQL query to answer the following question: `who got the first position when Ehime Shimanami got the third position?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "champions_list" ( "regional" text, "champions" text, "runners_up" text, "third_place" text, "fourth_place" text ); ### SQL Given the database schema, here is the SQL query that answers `who got the first position when Ehime Shimanami got the third position?`: ```sql
SELECT "third_place" FROM "champions_list" WHERE "runners_up"='Laranja Kyoto';
## Task Generate a SQL query to answer the following question: `who got the third position when laranja kyoto got the second position?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "champions_list" ( "regional" text, "champions" text, "runners_up" text, "third_place" text, "fourth_place" text ); ### SQL Given the database schema, here is the SQL query that answers `who got the third position when laranja kyoto got the second position?`: ```sql
SELECT COUNT("third_place") FROM "champions_list" WHERE "fourth_place"='Sanyo Electric Tokushima';
## Task Generate a SQL query to answer the following question: `how many persons got the third position whan sanyo electric tokushima got the fourth position?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "champions_list" ( "regional" text, "champions" text, "runners_up" text, "third_place" text, "fourth_place" text ); ### SQL Given the database schema, here is the SQL query that answers `how many persons got the third position whan sanyo electric tokushima got the fourth position?`: ```sql
SELECT COUNT("fourth_place") FROM "champions_list" WHERE "regional"='Shikoku';
## Task Generate a SQL query to answer the following question: `how many persons got the fourth position when the regional was shikoku?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "champions_list" ( "regional" text, "champions" text, "runners_up" text, "third_place" text, "fourth_place" text ); ### SQL Given the database schema, here is the SQL query that answers `how many persons got the fourth position when the regional was shikoku?`: ```sql
SELECT "champions" FROM "champions_list" WHERE "regional"='Hokushinetsu';
## Task Generate a SQL query to answer the following question: `who got the first place when the Japanese Regional Leagues was in hokushinetsu?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "champions_list" ( "regional" text, "champions" text, "runners_up" text, "third_place" text, "fourth_place" text ); ### SQL Given the database schema, here is the SQL query that answers `who got the first place when the Japanese Regional Leagues was in hokushinetsu?`: ```sql
SELECT "champions" FROM "champions_list" WHERE "fourth_place"='Fujieda City Government';
## Task Generate a SQL query to answer the following question: `who got the first position when fujieda city government got the fourth position?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "champions_list" ( "regional" text, "champions" text, "runners_up" text, "third_place" text, "fourth_place" text ); ### SQL Given the database schema, here is the SQL query that answers `who got the first position when fujieda city government got the fourth position?`: ```sql
SELECT "civilians" FROM "table1_21636599_2" WHERE "security_forces"='36';
## Task Generate a SQL query to answer the following question: `What are the civilian total when the security force total is 36?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21636599_2" ( "period" real, "civilians" text, "security_forces" text, "insurgents" text, "total_per_period" real ); ### SQL Given the database schema, here is the SQL query that answers `What are the civilian total when the security force total is 36?`: ```sql
SELECT "security_forces" FROM "table1_21636599_2" WHERE "civilians"='202';
## Task Generate a SQL query to answer the following question: `What are the security forces when the civilians are 202?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21636599_2" ( "period" real, "civilians" text, "security_forces" text, "insurgents" text, "total_per_period" real ); ### SQL Given the database schema, here is the SQL query that answers `What are the security forces when the civilians are 202?`: ```sql
SELECT COUNT("security_forces") FROM "table1_21636599_2" WHERE "period"=1998;
## Task Generate a SQL query to answer the following question: `How many figures are named for security forces in 1998?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21636599_2" ( "period" real, "civilians" text, "security_forces" text, "insurgents" text, "total_per_period" real ); ### SQL Given the database schema, here is the SQL query that answers `How many figures are named for security forces in 1998?`: ```sql
SELECT "insurgents" FROM "table1_21636599_2" WHERE "total_per_period"=156;
## Task Generate a SQL query to answer the following question: `How many insurgents are there when the total per period is 156?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21636599_2" ( "period" real, "civilians" text, "security_forces" text, "insurgents" text, "total_per_period" real ); ### SQL Given the database schema, here is the SQL query that answers `How many insurgents are there when the total per period is 156?`: ```sql
SELECT "u_s_viewers_millions" FROM "table1_21634403_2" WHERE "directed_by"='Frank Waldeck';
## Task Generate a SQL query to answer the following question: `How many U.S. viewers watched the episode directed by Frank Waldeck?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_21634403_2" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many U.S. viewers watched the episode directed by Frank Waldeck?`: ```sql