output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "pct" FROM "cultural_and_ethnic_composition" WHERE "total"=57613;
## Task Generate a SQL query to answer the following question: `Name the % for total being 57613` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "cultural_and_ethnic_composition" ( "self_identification" text, "moldovan_census" real, "pct_core_moldova" text, "transnistrian_census" real, "pct_transnistria_bender" text, "total" real, "pct" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the % for total being 57613`: ```sql
SELECT "total" FROM "cultural_and_ethnic_composition" WHERE "pct_core_moldova"='4.36%';
## Task Generate a SQL query to answer the following question: `Name the total for % core moldova for 4.36%` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "cultural_and_ethnic_composition" ( "self_identification" text, "moldovan_census" real, "pct_core_moldova" text, "transnistrian_census" real, "pct_transnistria_bender" text, "total" real, "pct" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total for % core moldova for 4.36%`: ```sql
SELECT "waveform" FROM "teletext_binary_nrz_encodings" WHERE "bit_rate_mbit_s"='6.203';
## Task Generate a SQL query to answer the following question: `What was the waveform of the encoding with a bit rate of 6.203?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teletext_binary_nrz_encodings" ( "standard" text, "color_system" text, "informational_cvbs_lines" text, "bit_rate_mbit_s" text, "waveform" text, "bits_per_line_including_run_in" real, "max_characters_per_page_row" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the waveform of the encoding with a bit rate of 6.203?`: ```sql
SELECT "informational_cvbs_lines" FROM "teletext_binary_nrz_encodings" WHERE "max_characters_per_page_row"=32 AND "standard"='B (global)';
## Task Generate a SQL query to answer the following question: `What was the informational CVBS Lines of the encoding with max character of 32 and has B (global) standard?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teletext_binary_nrz_encodings" ( "standard" text, "color_system" text, "informational_cvbs_lines" text, "bit_rate_mbit_s" text, "waveform" text, "bits_per_line_including_run_in" real, "max_characters_per_page_row" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the informational CVBS Lines of the encoding with max character of 32 and has B (global) standard?`: ```sql
SELECT COUNT("color_system") FROM "teletext_binary_nrz_encodings" WHERE "bit_rate_mbit_s"='5.734';
## Task Generate a SQL query to answer the following question: `How many color systems has a bit rate of 5.734?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teletext_binary_nrz_encodings" ( "standard" text, "color_system" text, "informational_cvbs_lines" text, "bit_rate_mbit_s" text, "waveform" text, "bits_per_line_including_run_in" real, "max_characters_per_page_row" real ); ### SQL Given the database schema, here is the SQL query that answers `How many color systems has a bit rate of 5.734?`: ```sql
SELECT MAX("max_characters_per_page_row") FROM "teletext_binary_nrz_encodings" WHERE "bit_rate_mbit_s"='6.203';
## Task Generate a SQL query to answer the following question: `What was the max character (per page row) of the encoding with a bit rate of 6.203?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teletext_binary_nrz_encodings" ( "standard" text, "color_system" text, "informational_cvbs_lines" text, "bit_rate_mbit_s" text, "waveform" text, "bits_per_line_including_run_in" real, "max_characters_per_page_row" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the max character (per page row) of the encoding with a bit rate of 6.203?`: ```sql
SELECT "after_tax_income" FROM "calculations_are_made_for_the_top_of_eac" WHERE "percentage_of_income_kept"='40.6%';
## Task Generate a SQL query to answer the following question: `Name the after tax income for percentage of income kept being 40.6%` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calculations_are_made_for_the_top_of_eac" ( "currency_bracket" text, "dollars_taxed_in_bracket" text, "rate" text, "taxes_from_bracket" text, "after_tax_income" text, "percentage_of_income_kept" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the after tax income for percentage of income kept being 40.6%`: ```sql
SELECT "taxes_from_bracket" FROM "calculations_are_made_for_the_top_of_eac" WHERE "percentage_of_income_kept"='73%';
## Task Generate a SQL query to answer the following question: `Name the taxes from brqacket for percentage of income kept being 73%` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calculations_are_made_for_the_top_of_eac" ( "currency_bracket" text, "dollars_taxed_in_bracket" text, "rate" text, "taxes_from_bracket" text, "after_tax_income" text, "percentage_of_income_kept" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the taxes from brqacket for percentage of income kept being 73%`: ```sql
SELECT COUNT("wins") FROM "nascar_sprint_cup_series" WHERE "winnings"='$2,089,556';
## Task Generate a SQL query to answer the following question: `How many teams won $2,089,556?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nascar_sprint_cup_series" ( "year" real, "starts" real, "wins" real, "top_5" real, "top_10" real, "poles" real, "avg_start" text, "avg_finish" text, "winnings" text, "position" text, "team_s" text ); ### SQL Given the database schema, here is the SQL query that answers `How many teams won $2,089,556?`: ```sql
SELECT COUNT("top_5") FROM "nascar_sprint_cup_series" WHERE "avg_start"='17.7';
## Task Generate a SQL query to answer the following question: `HOw many top 5 starts did the team with an average start of 17.7 have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nascar_sprint_cup_series" ( "year" real, "starts" real, "wins" real, "top_5" real, "top_10" real, "poles" real, "avg_start" text, "avg_finish" text, "winnings" text, "position" text, "team_s" text ); ### SQL Given the database schema, here is the SQL query that answers `HOw many top 5 starts did the team with an average start of 17.7 have?`: ```sql
SELECT "team_1" FROM "second_round" WHERE "team_2"='Koper';
## Task Generate a SQL query to answer the following question: `Who is team 1 when team 2 is koper?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "tie_no" real, "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is team 1 when team 2 is koper?`: ```sql
SELECT MIN("tie_no") FROM "second_round" WHERE "team_2"='Koper';
## Task Generate a SQL query to answer the following question: `What is the tie when team 2 is koper?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "tie_no" real, "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the tie when team 2 is koper?`: ```sql
SELECT COUNT("1st_leg") FROM "second_round" WHERE "team_1"='OFK Belgrade';
## Task Generate a SQL query to answer the following question: `How many 1st leg have team 1 ofk belgrade?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "tie_no" real, "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `How many 1st leg have team 1 ofk belgrade?`: ```sql
SELECT "tie_no" FROM "second_round" WHERE "team_1"='Borac Banja Luka';
## Task Generate a SQL query to answer the following question: `How many tie no have team 1 as borac banja luka?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "tie_no" real, "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `How many tie no have team 1 as borac banja luka?`: ```sql
SELECT "language" FROM "schools" WHERE "grades"='4-12';
## Task Generate a SQL query to answer the following question: `What's the language in the school teaching grades 4-12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schools" ( "school" text, "year_founded" text, "denomination" text, "language" text, "grades" text, "gender" text, "private_public" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the language in the school teaching grades 4-12?`: ```sql
SELECT "language" FROM "schools" WHERE "year_founded"='1949';
## Task Generate a SQL query to answer the following question: `What's the language of the school founded in 1949?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schools" ( "school" text, "year_founded" text, "denomination" text, "language" text, "grades" text, "gender" text, "private_public" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the language of the school founded in 1949?`: ```sql
SELECT "language" FROM "schools" WHERE "grades"='4-12';
## Task Generate a SQL query to answer the following question: `What's the language of the school that teaches grades 4-12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schools" ( "school" text, "year_founded" text, "denomination" text, "language" text, "grades" text, "gender" text, "private_public" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the language of the school that teaches grades 4-12?`: ```sql
SELECT "gender" FROM "schools" WHERE "year_founded"='1894';
## Task Generate a SQL query to answer the following question: `What's the gender of the students taught in the school founded in 1894?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schools" ( "school" text, "year_founded" text, "denomination" text, "language" text, "grades" text, "gender" text, "private_public" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the gender of the students taught in the school founded in 1894?`: ```sql
SELECT "language" FROM "schools" WHERE "year_founded"='1874';
## Task Generate a SQL query to answer the following question: `What's the language of classes in the school founded in 1874?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schools" ( "school" text, "year_founded" text, "denomination" text, "language" text, "grades" text, "gender" text, "private_public" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the language of classes in the school founded in 1874?`: ```sql
SELECT MIN("current") FROM "by_nationality";
## Task Generate a SQL query to answer the following question: `what is the least current` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_nationality" ( "country" text, "total" real, "champions" real, "current" real, "first_driver_s" text, "last_current_driver_s" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the least current`: ```sql
SELECT COUNT("total") FROM "by_nationality" WHERE "last_current_driver_s"='Narain Karthikeyan ( 2010 )';
## Task Generate a SQL query to answer the following question: `how many total where last/current driver(s) is narain karthikeyan ( 2010 )` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_nationality" ( "country" text, "total" real, "champions" real, "current" real, "first_driver_s" text, "last_current_driver_s" text ); ### SQL Given the database schema, here is the SQL query that answers `how many total where last/current driver(s) is narain karthikeyan ( 2010 )`: ```sql
SELECT COUNT("qatari_female") FROM "registered_live_births_by_nationality_an" WHERE "qatari_male"=97;
## Task Generate a SQL query to answer the following question: `How many numbers were recorded for Qatari female when Qatari male was 97?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "registered_live_births_by_nationality_an" ( "year" real, "qatari_male" real, "qatari_female" real, "total_qatari" real, "non_qatari_male" real, "non_qatari_female" real, "total_non_qatar" real, "total_male" real, "total_female" real, "grand_total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many numbers were recorded for Qatari female when Qatari male was 97?`: ```sql
SELECT COUNT("year") FROM "registered_live_births_by_nationality_an" WHERE "qatari_male"=97;
## Task Generate a SQL query to answer the following question: `How many years were there 97 qatari male births?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "registered_live_births_by_nationality_an" ( "year" real, "qatari_male" real, "qatari_female" real, "total_qatari" real, "non_qatari_male" real, "non_qatari_female" real, "total_non_qatar" real, "total_male" real, "total_female" real, "grand_total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many years were there 97 qatari male births?`: ```sql
SELECT "national_cup" FROM "career_statistics" WHERE "championship"='21 app / 6 goals';
## Task Generate a SQL query to answer the following question: `What is the national cup statistics when the Championship is 21 app / 6 goals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "career_statistics" ( "season" text, "club" text, "country" text, "championship" text, "national_cup" text, "international_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the national cup statistics when the Championship is 21 app / 6 goals?`: ```sql
SELECT COUNT("runner_up") FROM "calendar" WHERE "3rd_placed"='Jason Crump';
## Task Generate a SQL query to answer the following question: `How many runner-ups when Jason Crump placed 3rd?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calendar" ( "round" real, "date" text, "city_and_venue" text, "winner" text, "runner_up" text, "3rd_placed" text, "4th_placed" text, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `How many runner-ups when Jason Crump placed 3rd?`: ```sql
SELECT "city_and_venue" FROM "calendar" WHERE "4th_placed"='Grzegorz Walasek';
## Task Generate a SQL query to answer the following question: `Where did Grzegorz Walasek place 4th?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calendar" ( "round" real, "date" text, "city_and_venue" text, "winner" text, "runner_up" text, "3rd_placed" text, "4th_placed" text, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `Where did Grzegorz Walasek place 4th?`: ```sql
SELECT "3rd_placed" FROM "calendar" WHERE "city_and_venue"='Krško , Slovenia Matije Gubca Stadium';
## Task Generate a SQL query to answer the following question: `Who came in 3rd place in Krško , Slovenia Matije Gubca Stadium` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calendar" ( "round" real, "date" text, "city_and_venue" text, "winner" text, "runner_up" text, "3rd_placed" text, "4th_placed" text, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `Who came in 3rd place in Krško , Slovenia Matije Gubca Stadium`: ```sql
SELECT COUNT("4th_placed") FROM "calendar" WHERE "date"='April 25';
## Task Generate a SQL query to answer the following question: `How many placed 4th on April 25?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "calendar" ( "round" real, "date" text, "city_and_venue" text, "winner" text, "runner_up" text, "3rd_placed" text, "4th_placed" text, "results" text ); ### SQL Given the database schema, here is the SQL query that answers `How many placed 4th on April 25?`: ```sql
SELECT "cause_of_destruction" FROM "the_seven_ancient_wonders" WHERE "name"='Mausoleum at Halicarnassus';
## Task Generate a SQL query to answer the following question: `What caused the collapse of the Mausoleum at Halicarnassus?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_seven_ancient_wonders" ( "name" text, "date_of_construction" text, "builder" text, "date_of_destruction" text, "cause_of_destruction" text, "modern_location" text ); ### SQL Given the database schema, here is the SQL query that answers `What caused the collapse of the Mausoleum at Halicarnassus?`: ```sql
SELECT "cause_of_destruction" FROM "the_seven_ancient_wonders" WHERE "name"='Temple of Artemis at Ephesus';
## Task Generate a SQL query to answer the following question: `How was the Temple of Artemis at Ephesus destroyed?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_seven_ancient_wonders" ( "name" text, "date_of_construction" text, "builder" text, "date_of_destruction" text, "cause_of_destruction" text, "modern_location" text ); ### SQL Given the database schema, here is the SQL query that answers `How was the Temple of Artemis at Ephesus destroyed?`: ```sql
SELECT "replaced_by" FROM "managerial_changes" WHERE "team"='Sheffield United';
## Task Generate a SQL query to answer the following question: `Who came as a replacement in Sheffield United?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "replaced_by" text, "date_of_appointment" text, "position_in_table" text ); ### SQL Given the database schema, here is the SQL query that answers `Who came as a replacement in Sheffield United?`: ```sql
SELECT "date_of_appointment" FROM "managerial_changes" WHERE "position_in_table"='21st';
## Task Generate a SQL query to answer the following question: `When was the new manager of the team on 21st position appointed?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "replaced_by" text, "date_of_appointment" text, "position_in_table" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the new manager of the team on 21st position appointed?`: ```sql
SELECT "manner_of_departure" FROM "managerial_changes" WHERE "outgoing_manager"='Gary Megson';
## Task Generate a SQL query to answer the following question: `What was Gary Megson's manner of departure?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "replaced_by" text, "date_of_appointment" text, "position_in_table" text ); ### SQL Given the database schema, here is the SQL query that answers `What was Gary Megson's manner of departure?`: ```sql
SELECT "date_of_vacancy" FROM "managerial_changes" WHERE "team"='Plymouth Argyle';
## Task Generate a SQL query to answer the following question: `When did the old manager vacate his position in Plymouth Argyle?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "replaced_by" text, "date_of_appointment" text, "position_in_table" text ); ### SQL Given the database schema, here is the SQL query that answers `When did the old manager vacate his position in Plymouth Argyle?`: ```sql
SELECT COUNT("best_uk_team") FROM "winners" WHERE "class_1_200"='University of Birmingham';
## Task Generate a SQL query to answer the following question: `Name the best uk team for university of birmingham` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners" ( "year" text, "location" text, "class_1" text, "best_uk_team" text, "class_1_200" text, "class_3" text, "class_1a" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the best uk team for university of birmingham`: ```sql
SELECT "class_1_200" FROM "winners" WHERE "best_uk_team"='University of Hertfordshire' AND "class_1a"='University of Warwick';
## Task Generate a SQL query to answer the following question: `Name the class 1-200 for university of hertfordshire for university of warwick` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners" ( "year" text, "location" text, "class_1" text, "best_uk_team" text, "class_1_200" text, "class_3" text, "class_1a" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the class 1-200 for university of hertfordshire for university of warwick`: ```sql
SELECT COUNT("location") FROM "winners" WHERE "class_1_200"='Dynamic Events Winner';
## Task Generate a SQL query to answer the following question: `Name the total location for dynamic events winner` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners" ( "year" text, "location" text, "class_1" text, "best_uk_team" text, "class_1_200" text, "class_3" text, "class_1a" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total location for dynamic events winner`: ```sql
SELECT "class_3" FROM "winners" WHERE "location"='Silverstone' AND "class_1"='RMIT University';
## Task Generate a SQL query to answer the following question: `Name the class 3 for silverstone rmit university` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winners" ( "year" text, "location" text, "class_1" text, "best_uk_team" text, "class_1_200" text, "class_3" text, "class_1a" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the class 3 for silverstone rmit university`: ```sql
SELECT "league" FROM "year_by_year" WHERE "regular_season"='4th, Great Lakes';
## Task Generate a SQL query to answer the following question: `When 4th, great lakes is the regular season what is the league?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `When 4th, great lakes is the regular season what is the league?`: ```sql
SELECT MAX("division") FROM "year_by_year" WHERE "regular_season"='5th';
## Task Generate a SQL query to answer the following question: `When 5th is the regular season what is the highest season?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `When 5th is the regular season what is the highest season?`: ```sql
SELECT "playoffs" FROM "year_by_year" WHERE "open_cup"='2nd Round';
## Task Generate a SQL query to answer the following question: `When it's the 2nd round of the open cup what is the playoffs?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "open_cup" text ); ### SQL Given the database schema, here is the SQL query that answers `When it's the 2nd round of the open cup what is the playoffs?`: ```sql
SELECT "league" FROM "year_by_year" WHERE "avg_attendance"=1452;
## Task Generate a SQL query to answer the following question: `What league has an average attendance of 1452?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "u_s_open_cup" text, "avg_attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What league has an average attendance of 1452?`: ```sql
SELECT "year" FROM "year_by_year" WHERE "league"='USL Second Division' AND "playoffs"='Semifinals' AND "u_s_open_cup"='Quarterfinals';
## Task Generate a SQL query to answer the following question: `What year at the US Open Cup quarterfinals, were the playoffs in the semifinals for the USL second division?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "year_by_year" ( "year" real, "division" real, "league" text, "regular_season" text, "playoffs" text, "u_s_open_cup" text, "avg_attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What year at the US Open Cup quarterfinals, were the playoffs in the semifinals for the USL second division?`: ```sql
SELECT COUNT("original_air_date") FROM "table1_19396259_1" WHERE "production_code"='3T7501';
## Task Generate a SQL query to answer the following question: `Name the original air date for production code of 3t7501` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19396259_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_million" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the original air date for production code of 3t7501`: ```sql
SELECT "title" FROM "table1_19396259_1" WHERE "directed_by"='Charles Beeson' AND "written_by"='Jeremy Carver';
## Task Generate a SQL query to answer the following question: `Name the title directed by charles beeson by jeremy carver` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19396259_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_million" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the title directed by charles beeson by jeremy carver`: ```sql
SELECT "directed_by" FROM "table1_19396259_1" WHERE "production_code"='3T7509';
## Task Generate a SQL query to answer the following question: `Name the directed by for production code for 3t7509` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19396259_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_million" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the directed by for production code for 3t7509`: ```sql
SELECT "no_in_season" FROM "table1_19401346_1" WHERE "original_air_date"='October 14, 2008';
## Task Generate a SQL query to answer the following question: `What's the season number of the episode originally aired on October 14, 2008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19401346_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the season number of the episode originally aired on October 14, 2008?`: ```sql
SELECT "title" FROM "table1_19401346_1" WHERE "original_air_date"='September 23, 2008';
## Task Generate a SQL query to answer the following question: `What's the title of the episode originally aired on September 23, 2008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19401346_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the title of the episode originally aired on September 23, 2008?`: ```sql
SELECT MIN("no_in_series") FROM "table1_19401346_1" WHERE "u_s_viewers_millions"='9.35';
## Task Generate a SQL query to answer the following question: `What's the series number of the episode seen by 9.35 million people in the US?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19401346_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the series number of the episode seen by 9.35 million people in the US?`: ```sql
SELECT "title" FROM "table1_19401346_1" WHERE "production_code"=10018;
## Task Generate a SQL query to answer the following question: `What's the title of the episode with production code 10018?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19401346_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the title of the episode with production code 10018?`: ```sql
SELECT "u_s_viewers_millions" FROM "table1_19401346_1" WHERE "no_in_season"=1;
## Task Generate a SQL query to answer the following question: `How many millions of people in the US saw the episode with season number 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19401346_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" real, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `How many millions of people in the US saw the episode with season number 1?`: ```sql
SELECT "change_since_2006" FROM "see_also" WHERE "urban_area"='Clane';
## Task Generate a SQL query to answer the following question: `How many places has the rank changed since 2006, for Clane? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank_2011" real, "change_since_2006" text, "urban_area" text, "county" text, "population_2011" real, "increase_since_2006" text ); ### SQL Given the database schema, here is the SQL query that answers `How many places has the rank changed since 2006, for Clane? `: ```sql
SELECT "county" FROM "see_also" WHERE "population_2011"=17908;
## Task Generate a SQL query to answer the following question: `In what counties is the 2011 population 17908?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank_2011" real, "change_since_2006" text, "urban_area" text, "county" text, "population_2011" real, "increase_since_2006" text ); ### SQL Given the database schema, here is the SQL query that answers `In what counties is the 2011 population 17908?`: ```sql
SELECT "urban_area" FROM "see_also" WHERE "population_2011"=21561;
## Task Generate a SQL query to answer the following question: `In what urban area is the 2011 population 21561? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank_2011" real, "change_since_2006" text, "urban_area" text, "county" text, "population_2011" real, "increase_since_2006" text ); ### SQL Given the database schema, here is the SQL query that answers `In what urban area is the 2011 population 21561? `: ```sql
SELECT COUNT("change_since_2006") FROM "see_also" WHERE "county"='County Leitrim';
## Task Generate a SQL query to answer the following question: `How many places did the rank change since 22006 for County Leitrim? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank_2011" real, "change_since_2006" text, "urban_area" text, "county" text, "population_2011" real, "increase_since_2006" text ); ### SQL Given the database schema, here is the SQL query that answers `How many places did the rank change since 22006 for County Leitrim? `: ```sql
SELECT "urban_area" FROM "see_also" WHERE "population_2011"=5010;
## Task Generate a SQL query to answer the following question: `Which urban area has a 2011 population of 5010? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank_2011" real, "change_since_2006" text, "urban_area" text, "county" text, "population_2011" real, "increase_since_2006" text ); ### SQL Given the database schema, here is the SQL query that answers `Which urban area has a 2011 population of 5010? `: ```sql
SELECT "semifinals" FROM "table1_19398910_4" WHERE "1_8_finals"='Saengsawang ( THA ) L 9-15';
## Task Generate a SQL query to answer the following question: `what were the result in semifinals when saengsawang ( tha ) l 9-15 was in 1/8 finals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19398910_4" ( "athlete" text, "class" text, "event" text, "bout_1" text, "bout_2" text, "bout_3" text, "bout_4" text, "bout_5" text, "bout_6" text, "rank" text, "1_8_finals" text, "quarterfinals" text, "semifinals" text ); ### SQL Given the database schema, here is the SQL query that answers `what were the result in semifinals when saengsawang ( tha ) l 9-15 was in 1/8 finals?`: ```sql
SELECT "event" FROM "table1_19398910_4" WHERE "bout_2"='Zhang ( CHN ) L 0-5';
## Task Generate a SQL query to answer the following question: `wich were the events when bout 2 was zhang ( chn ) l 0-5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19398910_4" ( "athlete" text, "class" text, "event" text, "bout_1" text, "bout_2" text, "bout_3" text, "bout_4" text, "bout_5" text, "bout_6" text, "rank" text, "1_8_finals" text, "quarterfinals" text, "semifinals" text ); ### SQL Given the database schema, here is the SQL query that answers `wich were the events when bout 2 was zhang ( chn ) l 0-5?`: ```sql
SELECT "bout_1" FROM "table1_19398910_4" WHERE "bout_5"='Andreev ( RUS ) W 5-2';
## Task Generate a SQL query to answer the following question: `Which were the bout 1 when the bout 5 was andreev ( rus ) w 5-2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19398910_4" ( "athlete" text, "class" text, "event" text, "bout_1" text, "bout_2" text, "bout_3" text, "bout_4" text, "bout_5" text, "bout_6" text, "rank" text, "1_8_finals" text, "quarterfinals" text, "semifinals" text ); ### SQL Given the database schema, here is the SQL query that answers `Which were the bout 1 when the bout 5 was andreev ( rus ) w 5-2?`: ```sql
SELECT "class" FROM "table1_19398910_4" WHERE "bout_6"='Sanchez ( ESP ) W 5-0';
## Task Generate a SQL query to answer the following question: `when Sanchez ( esp ) w 5-0 were the bout 6, which were the class?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19398910_4" ( "athlete" text, "class" text, "event" text, "bout_1" text, "bout_2" text, "bout_3" text, "bout_4" text, "bout_5" text, "bout_6" text, "rank" text, "1_8_finals" text, "quarterfinals" text, "semifinals" text ); ### SQL Given the database schema, here is the SQL query that answers `when Sanchez ( esp ) w 5-0 were the bout 6, which were the class?`: ```sql
SELECT MIN("attempts") FROM "team_career_passing_records" WHERE "name"='Bobby Layne';
## Task Generate a SQL query to answer the following question: `How many attempts for Bobby Layne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "team_career_passing_records" ( "name" text, "completions" real, "attempts" real, "completion_pct" text, "yards" real, "touchdowns" real, "interceptions" real, "qb_rating" text ); ### SQL Given the database schema, here is the SQL query that answers `How many attempts for Bobby Layne?`: ```sql
SELECT MAX("interceptions") FROM "team_career_passing_records";
## Task Generate a SQL query to answer the following question: `What is the highest number of interceptions?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "team_career_passing_records" ( "name" text, "completions" real, "attempts" real, "completion_pct" text, "yards" real, "touchdowns" real, "interceptions" real, "qb_rating" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number of interceptions?`: ```sql
SELECT MAX("yards") FROM "team_career_passing_records" WHERE "name"='Bobby Layne';
## Task Generate a SQL query to answer the following question: `How many total yards for Bobby Layne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "team_career_passing_records" ( "name" text, "completions" real, "attempts" real, "completion_pct" text, "yards" real, "touchdowns" real, "interceptions" real, "qb_rating" text ); ### SQL Given the database schema, here is the SQL query that answers `How many total yards for Bobby Layne?`: ```sql
SELECT "name" FROM "team_career_passing_records" WHERE "qb_rating"='72.3';
## Task Generate a SQL query to answer the following question: `Which QB had a rating of 72.3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "team_career_passing_records" ( "name" text, "completions" real, "attempts" real, "completion_pct" text, "yards" real, "touchdowns" real, "interceptions" real, "qb_rating" text ); ### SQL Given the database schema, here is the SQL query that answers `Which QB had a rating of 72.3?`: ```sql
SELECT COUNT("qb_rating") FROM "team_career_passing_records" WHERE "completions"=1069;
## Task Generate a SQL query to answer the following question: `How many QB ratings for the player with 1069 completions?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "team_career_passing_records" ( "name" text, "completions" real, "attempts" real, "completion_pct" text, "yards" real, "touchdowns" real, "interceptions" real, "qb_rating" text ); ### SQL Given the database schema, here is the SQL query that answers `How many QB ratings for the player with 1069 completions?`: ```sql
SELECT COUNT("yards") FROM "team_career_passing_records" WHERE "qb_rating"='72.3';
## Task Generate a SQL query to answer the following question: `How many yardage figures for the player with 72.3 QB rating?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "team_career_passing_records" ( "name" text, "completions" real, "attempts" real, "completion_pct" text, "yards" real, "touchdowns" real, "interceptions" real, "qb_rating" text ); ### SQL Given the database schema, here is the SQL query that answers `How many yardage figures for the player with 72.3 QB rating?`: ```sql
SELECT COUNT("game_site") FROM "table1_1941183_2" WHERE "opponent"='Barcelona Dragons';
## Task Generate a SQL query to answer the following question: `In how many locations was the game against Barcelona Dragons played?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1941183_2" ( "week" real, "date" text, "opponent" text, "final_score" text, "team_record" text, "game_site" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `In how many locations was the game against Barcelona Dragons played?`: ```sql
SELECT COUNT("pos") FROM "table1_19412902_1" WHERE "member_association"='Saudi Arabia';
## Task Generate a SQL query to answer the following question: `how many posiitions did saudi arabia land on` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19412902_1" ( "pos" real, "member_association" text, "points_total_500" real, "clubs" real, "group_stage" real, "play_off" real, "afc_cup" real ); ### SQL Given the database schema, here is the SQL query that answers `how many posiitions did saudi arabia land on`: ```sql
SELECT "play_off" FROM "table1_19412902_1" WHERE "group_stage"=4 AND "clubs"=12;
## Task Generate a SQL query to answer the following question: `what is the play-off in group stage 4 and clubs is 12` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19412902_1" ( "pos" real, "member_association" text, "points_total_500" real, "clubs" real, "group_stage" real, "play_off" real, "afc_cup" real ); ### SQL Given the database schema, here is the SQL query that answers `what is the play-off in group stage 4 and clubs is 12`: ```sql
SELECT COUNT("group_stage") FROM "table1_19412902_1" WHERE "play_off"=0 AND "clubs"=12;
## Task Generate a SQL query to answer the following question: `which group stage was there 0 play-offs and 12 clubs played in it` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19412902_1" ( "pos" real, "member_association" text, "points_total_500" real, "clubs" real, "group_stage" real, "play_off" real, "afc_cup" real ); ### SQL Given the database schema, here is the SQL query that answers `which group stage was there 0 play-offs and 12 clubs played in it`: ```sql
SELECT "clubs" FROM "table1_19412902_1" WHERE "group_stage"=4 AND "member_association"='Iran';
## Task Generate a SQL query to answer the following question: `which club in group stage 4 had member association iran` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19412902_1" ( "pos" real, "member_association" text, "points_total_500" real, "clubs" real, "group_stage" real, "play_off" real, "afc_cup" real ); ### SQL Given the database schema, here is the SQL query that answers `which club in group stage 4 had member association iran`: ```sql
SELECT "written_by" FROM "table1_19417244_2" WHERE "u_s_viewers_millions"='14.39';
## Task Generate a SQL query to answer the following question: `who write the episode that have 14.39 million viewers` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19417244_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 `who write the episode that have 14.39 million viewers`: ```sql
SELECT COUNT("directed_by") FROM "table1_19417244_2" WHERE "title"='\"Dead Inside\"';
## Task Generate a SQL query to answer the following question: `how many people directed the episode that is called "dead inside"` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19417244_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 people directed the episode that is called "dead inside"`: ```sql
SELECT "directed_by" FROM "table1_19417244_2" WHERE "u_s_viewers_millions"='14.59';
## Task Generate a SQL query to answer the following question: `who directed the episode that have 14.59 million viewers` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19417244_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 `who directed the episode that have 14.59 million viewers`: ```sql
SELECT "written_by" FROM "table1_19417244_2" WHERE "no_in_season"=5;
## Task Generate a SQL query to answer the following question: `who write the episode 5 in no. in season` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19417244_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 `who write the episode 5 in no. in season`: ```sql
SELECT "clubs" FROM "table1_19412902_2" WHERE "member_association"='Korea Republic';
## Task Generate a SQL query to answer the following question: `How many clubs are there in the Korea Republic?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19412902_2" ( "pos" real, "member_association" text, "points_total_500" real, "clubs" text, "group_stage" real, "play_off" real, "afc_cup" real ); ### SQL Given the database schema, here is the SQL query that answers `How many clubs are there in the Korea Republic?`: ```sql
SELECT MIN("pos") FROM "table1_19412902_2" WHERE "points_total_500"=279;
## Task Generate a SQL query to answer the following question: `At what position is the association with 279 points?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19412902_2" ( "pos" real, "member_association" text, "points_total_500" real, "clubs" text, "group_stage" real, "play_off" real, "afc_cup" real ); ### SQL Given the database schema, here is the SQL query that answers `At what position is the association with 279 points?`: ```sql
SELECT MAX("pos") FROM "table1_19412902_2";
## Task Generate a SQL query to answer the following question: `What is the lowest position?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19412902_2" ( "pos" real, "member_association" text, "points_total_500" real, "clubs" text, "group_stage" real, "play_off" real, "afc_cup" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest position?`: ```sql
SELECT MIN("year_opened") FROM "whanau_house_system";
## Task Generate a SQL query to answer the following question: `What is the earliest year a house opened?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "whanau_house_system" ( "house_name" text, "house_mascot" text, "house_colour" text, "year_opened" real, "house_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the earliest year a house opened?`: ```sql
SELECT COUNT("house_colour") FROM "whanau_house_system" WHERE "house_name"='Hillary';
## Task Generate a SQL query to answer the following question: `How many house colours are associated with house names of Hillary?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "whanau_house_system" ( "house_name" text, "house_mascot" text, "house_colour" text, "year_opened" real, "house_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `How many house colours are associated with house names of Hillary?`: ```sql
SELECT "house_colour" FROM "whanau_house_system" WHERE "house_name"='Kupe';
## Task Generate a SQL query to answer the following question: `What is the house colour associated with the house name of Kupe?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "whanau_house_system" ( "house_name" text, "house_mascot" text, "house_colour" text, "year_opened" real, "house_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the house colour associated with the house name of Kupe?`: ```sql
SELECT COUNT("house_mascot") FROM "whanau_house_system" WHERE "house_colour"='Yellow';
## Task Generate a SQL query to answer the following question: `How many house mascots are associated with yellow house colours?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "whanau_house_system" ( "house_name" text, "house_mascot" text, "house_colour" text, "year_opened" real, "house_leader" text ); ### SQL Given the database schema, here is the SQL query that answers `How many house mascots are associated with yellow house colours?`: ```sql
SELECT "title_french_english" FROM "table1_19485888_1" WHERE "b_b_corresponds_to_tf1s_broadcast_schedule"='20/16';
## Task Generate a SQL query to answer the following question: `what is the title of the episode where b b is 20/16` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_19485888_1" ( "o_o_corresponds_to_the_official_order_as_listed_by_institut_national_de_l_audiovisuel_ina_and_animez_vous_com" text, "b_b_corresponds_to_tf1s_broadcast_schedule" text, "title_french_english" text, "original_beechwood_bunny_tale_source_material" text, "air_date_france" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the title of the episode where b b is 20/16`: ```sql
SELECT MIN("losses") FROM "notes" WHERE "team"='Kansas City Chiefs';
## Task Generate a SQL query to answer the following question: `What is the minimum losses for the Kansas City Chiefs?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "notes" ( "team" text, "games" real, "wins" real, "losses" real, "ties" real, "win_pct" text, "playoff_berths" real, "division_titles" real, "postseason_record" text, "super_bowl_record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the minimum losses for the Kansas City Chiefs?`: ```sql
SELECT "division_titles" FROM "notes" WHERE "win_pct"='.558';
## Task Generate a SQL query to answer the following question: `How many division titles are there when the win pc is .558?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "notes" ( "team" text, "games" real, "wins" real, "losses" real, "ties" real, "win_pct" text, "playoff_berths" real, "division_titles" real, "postseason_record" text, "super_bowl_record" text ); ### SQL Given the database schema, here is the SQL query that answers `How many division titles are there when the win pc is .558?`: ```sql
SELECT "villages" FROM "administrative_divisions_regions_and_sta" WHERE "state_region"='Magway Region';
## Task Generate a SQL query to answer the following question: `How many villages are there in the Magway region?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "administrative_divisions_regions_and_sta" ( "no" real, "state_region" text, "districts" real, "town_ships" real, "cities_towns" real, "wards" real, "village_groups" real, "villages" real ); ### SQL Given the database schema, here is the SQL query that answers `How many villages are there in the Magway region?`: ```sql
SELECT MAX("town_ships") FROM "administrative_divisions_regions_and_sta" WHERE "no"=2;
## Task Generate a SQL query to answer the following question: `How many townships are there in region number 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "administrative_divisions_regions_and_sta" ( "no" real, "state_region" text, "districts" real, "town_ships" real, "cities_towns" real, "wards" real, "village_groups" real, "villages" real ); ### SQL Given the database schema, here is the SQL query that answers `How many townships are there in region number 2?`: ```sql
SELECT MAX("town_ships") FROM "administrative_divisions_regions_and_sta" WHERE "village_groups"=376;
## Task Generate a SQL query to answer the following question: `How many townships are there in the region with 376 village groups?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "administrative_divisions_regions_and_sta" ( "no" real, "state_region" text, "districts" real, "town_ships" real, "cities_towns" real, "wards" real, "village_groups" real, "villages" real ); ### SQL Given the database schema, here is the SQL query that answers `How many townships are there in the region with 376 village groups?`: ```sql
SELECT MAX("poles") FROM "by_name" WHERE "country"='Netherlands';
## Task Generate a SQL query to answer the following question: `How many poles for the Netherlands?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_name" ( "name" text, "country" text, "seasons" text, "championship_titles" text, "race_entries_starts" text, "poles" real, "wins" real, "podiums" real, "fastest_laps" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `How many poles for the Netherlands?`: ```sql
SELECT "seasons" FROM "by_name" WHERE "country"='Monaco';
## Task Generate a SQL query to answer the following question: `How many seasons for Monaco?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_name" ( "name" text, "country" text, "seasons" text, "championship_titles" text, "race_entries_starts" text, "poles" real, "wins" real, "podiums" real, "fastest_laps" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `How many seasons for Monaco?`: ```sql
SELECT "name" FROM "by_name" WHERE "country"='France' AND "race_entries_starts"='10';
## Task Generate a SQL query to answer the following question: `Who is the competitor from France with 10 starts?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_name" ( "name" text, "country" text, "seasons" text, "championship_titles" text, "race_entries_starts" text, "poles" real, "wins" real, "podiums" real, "fastest_laps" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Who is the competitor from France with 10 starts?`: ```sql
SELECT COUNT("call_sign") FROM "table1_1949746_1" WHERE "frequency"='1180 AM';
## Task Generate a SQL query to answer the following question: `When 1180 am is the frequency how many call signs are there?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1949746_1" ( "call_sign" text, "frequency" text, "city_of_license" text, "licensee" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `When 1180 am is the frequency how many call signs are there?`: ```sql
SELECT "licensee" FROM "table1_1949746_1" WHERE "city_of_license"='Portsmouth';
## Task Generate a SQL query to answer the following question: `When portsmouth is the city of license who is the licensee?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1949746_1" ( "call_sign" text, "frequency" text, "city_of_license" text, "licensee" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `When portsmouth is the city of license who is the licensee?`: ```sql
SELECT "format" FROM "table1_1949746_1" WHERE "frequency"='790 AM';
## Task Generate a SQL query to answer the following question: `When 790 am is the frequency what is the format?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1949746_1" ( "call_sign" text, "frequency" text, "city_of_license" text, "licensee" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `When 790 am is the frequency what is the format?`: ```sql
SELECT "licensee" FROM "table1_1949746_1" WHERE "frequency"='90.7 FM';
## Task Generate a SQL query to answer the following question: `When 90.7 fm is the frequency who is the licensee?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_1949746_1" ( "call_sign" text, "frequency" text, "city_of_license" text, "licensee" text, "format" text ); ### SQL Given the database schema, here is the SQL query that answers `When 90.7 fm is the frequency who is the licensee?`: ```sql
SELECT COUNT("total_drivers") FROM "by_nationality" WHERE "country"='India';
## Task Generate a SQL query to answer the following question: `How many drivers does India have/` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_nationality" ( "country" text, "total_drivers" real, "champions" real, "championships" real, "current_march_20_2010" real, "first_driver_s" text, "last_current_driver_s_march_20_2010" text ); ### SQL Given the database schema, here is the SQL query that answers `How many drivers does India have/`: ```sql
SELECT COUNT("championships") FROM "by_nationality" WHERE "country"='Pakistan';
## Task Generate a SQL query to answer the following question: `How many championships does Pakistan have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_nationality" ( "country" text, "total_drivers" real, "champions" real, "championships" real, "current_march_20_2010" real, "first_driver_s" text, "last_current_driver_s_march_20_2010" text ); ### SQL Given the database schema, here is the SQL query that answers `How many championships does Pakistan have?`: ```sql
SELECT COUNT("total_drivers") FROM "by_nationality" WHERE "current_march_20_2010"=2;
## Task Generate a SQL query to answer the following question: `How many countries have 2 current drivers as of March 20, 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_nationality" ( "country" text, "total_drivers" real, "champions" real, "championships" real, "current_march_20_2010" real, "first_driver_s" text, "last_current_driver_s_march_20_2010" text ); ### SQL Given the database schema, here is the SQL query that answers `How many countries have 2 current drivers as of March 20, 2010?`: ```sql
SELECT "current_march_20_2010" FROM "by_nationality" WHERE "country"='Denmark';
## Task Generate a SQL query to answer the following question: `How many current drivers, as of March 20, 2010 does Denmark have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_nationality" ( "country" text, "total_drivers" real, "champions" real, "championships" real, "current_march_20_2010" real, "first_driver_s" text, "last_current_driver_s_march_20_2010" text ); ### SQL Given the database schema, here is the SQL query that answers `How many current drivers, as of March 20, 2010 does Denmark have?`: ```sql
SELECT MIN("championships") FROM "by_nationality";
## Task Generate a SQL query to answer the following question: `What in the minimum number of championships won by a nation?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "by_nationality" ( "country" text, "total_drivers" real, "champions" real, "championships" real, "current_march_20_2010" real, "first_driver_s" text, "last_current_driver_s_march_20_2010" text ); ### SQL Given the database schema, here is the SQL query that answers `What in the minimum number of championships won by a nation?`: ```sql