output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "result"='Re-elected' AND "first_elected"='1797' AND "district"='Virginia 5';
## Task Generate a SQL query to answer the following question: `What party did the incumbent from the Virginia 5 district who was re-elected and was first elected in 1797 belong to?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `What party did the incumbent from the Virginia 5 district who was re-elected and was first elected in 1797 belong to?`: ```sql
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "result"='Democratic-Republican gain';
## Task Generate a SQL query to answer the following question: `When was the incumbent first elected in the district where the result was a democratic-republican gain? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the incumbent first elected in the district where the result was a democratic-republican gain? `: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Edwin Gray';
## Task Generate a SQL query to answer the following question: `In what district was the incumbent Edwin Gray? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `In what district was the incumbent Edwin Gray? `: ```sql
SELECT "first_elected" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 10';
## Task Generate a SQL query to answer the following question: `When was the incumbent from the Virginia 10 district first elected? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the incumbent from the Virginia 10 district first elected? `: ```sql
SELECT "result" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Walter Jones (DR) 99.0% Henry Lee (F) 1.0%';
## Task Generate a SQL query to answer the following question: `Name the result for walter jones (dr) 99.0% henry lee (f) 1.0%` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the result for walter jones (dr) 99.0% henry lee (f) 1.0%`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Matthew Clay';
## Task Generate a SQL query to answer the following question: `Name the district for matthew clay` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the district for matthew clay`: ```sql
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Smith';
## Task Generate a SQL query to answer the following question: `Name the number of first elected for john smith` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number of first elected for john smith`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 18';
## Task Generate a SQL query to answer the following question: `Name the incumbent for virginia 18` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the incumbent for virginia 18`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='John Randolph (DR)';
## Task Generate a SQL query to answer the following question: `Name the district for john randolph (dr)` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the district for john randolph (dr)`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 4';
## Task Generate a SQL query to answer the following question: `Name the incumbent for virginia 4` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" text, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the incumbent for virginia 4`: ```sql
SELECT MIN("first_elected") FROM "united_states_house_of_representatives_e";
## Task Generate a SQL query to answer the following question: `When was the earliest person elected?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the earliest person elected?`: ```sql
SELECT "party" FROM "united_states_house_of_representatives_e" WHERE "result"='Re-elected' AND "district"='Virginia 12';
## Task Generate a SQL query to answer the following question: `What party was re-elected to Virginia 12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `What party was re-elected to Virginia 12?`: ```sql
SELECT MAX("first_elected") FROM "united_states_house_of_representatives_e";
## Task Generate a SQL query to answer the following question: `What is the latest first elected?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the latest first elected?`: ```sql
SELECT COUNT("first_elected") FROM "united_states_house_of_representatives_e" WHERE "candidates"='Leven Powell (F) 63.8% Roger West (DR) 36.4%';
## Task Generate a SQL query to answer the following question: `How many times were the candidates leven powell (f) 63.8% roger west (dr) 36.4%?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `How many times were the candidates leven powell (f) 63.8% roger west (dr) 36.4%?`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "candidates"='Leven Powell (F) 63.8% Roger West (DR) 36.4%';
## Task Generate a SQL query to answer the following question: `What is the district with the candidates leven powell (f) 63.8% roger west (dr) 36.4%?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the district with the candidates leven powell (f) 63.8% roger west (dr) 36.4%?`: ```sql
SELECT "district" FROM "united_states_house_of_representatives_e" WHERE "incumbent"='John Nicholas';
## Task Generate a SQL query to answer the following question: `What is the district with the incumbent john nicholas?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the district with the incumbent john nicholas?`: ```sql
SELECT COUNT("candidates") FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 6';
## Task Generate a SQL query to answer the following question: `How many were in district virginia 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `How many were in district virginia 6?`: ```sql
SELECT "incumbent" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 8';
## Task Generate a SQL query to answer the following question: `If the district is Virginia 8, who is the Incumbent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `If the district is Virginia 8, who is the Incumbent?`: ```sql
SELECT "candidates" FROM "united_states_house_of_representatives_e" WHERE "district"='Virginia 17';
## Task Generate a SQL query to answer the following question: `If the district is Virginia 17, who are the candidates?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `If the district is Virginia 17, who are the candidates?`: ```sql
SELECT COUNT("party") FROM "united_states_house_of_representatives_e" WHERE "incumbent"='Abraham B. Venable';
## Task Generate a SQL query to answer the following question: `In how many different parts was the incumbent Abraham B. Venable?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "united_states_house_of_representatives_e" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "result" text, "candidates" text ); ### SQL Given the database schema, here is the SQL query that answers `In how many different parts was the incumbent Abraham B. Venable?`: ```sql
SELECT "date" FROM "table1_26686908_2" WHERE "circuit"='Mount Panorama Circuit';
## Task Generate a SQL query to answer the following question: `What is the date for the mount panorama circuit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26686908_2" ( "rd" text, "circuit" text, "city_state" text, "date" text, "championship" text, "challenge" text, "production" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date for the mount panorama circuit?`: ```sql
SELECT "city_state" FROM "table1_26686908_2" WHERE "date"='7–10 October';
## Task Generate a SQL query to answer the following question: `What was the location for the date 7–10 october?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26686908_2" ( "rd" text, "circuit" text, "city_state" text, "date" text, "championship" text, "challenge" text, "production" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the location for the date 7–10 october?`: ```sql
SELECT "production" FROM "table1_26686908_2" WHERE "championship"='David Wall' AND "challenge"='Jordan Ormsby';
## Task Generate a SQL query to answer the following question: `Who handled production for the race when the championship went to david wall and challenge was jordan ormsby?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26686908_2" ( "rd" text, "circuit" text, "city_state" text, "date" text, "championship" text, "challenge" text, "production" text ); ### SQL Given the database schema, here is the SQL query that answers `Who handled production for the race when the championship went to david wall and challenge was jordan ormsby?`: ```sql
SELECT "city_state" FROM "table1_26686908_2" WHERE "circuit"='Adelaide Street Circuit';
## Task Generate a SQL query to answer the following question: `Which city and state hosted the adelaide street circuit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26686908_2" ( "rd" text, "circuit" text, "city_state" text, "date" text, "championship" text, "challenge" text, "production" text ); ### SQL Given the database schema, here is the SQL query that answers `Which city and state hosted the adelaide street circuit?`: ```sql
SELECT "circuit" FROM "table1_26686908_2" WHERE "date"='25–28 March';
## Task Generate a SQL query to answer the following question: `Which circuit was held on 25–28 march?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26686908_2" ( "rd" text, "circuit" text, "city_state" text, "date" text, "championship" text, "challenge" text, "production" text ); ### SQL Given the database schema, here is the SQL query that answers `Which circuit was held on 25–28 march?`: ```sql
SELECT COUNT("production") FROM "table1_26686908_2" WHERE "rd"='Rd 2';
## Task Generate a SQL query to answer the following question: `How many productions are shown for rd 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26686908_2" ( "rd" text, "circuit" text, "city_state" text, "date" text, "championship" text, "challenge" text, "production" text ); ### SQL Given the database schema, here is the SQL query that answers `How many productions are shown for rd 2?`: ```sql
SELECT "writer_s" FROM "table1_26702078_1" WHERE "no_in_series"=46;
## Task Generate a SQL query to answer the following question: `Name the writers for 46 in series` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26702078_1" ( "no_in_series" real, "no_in_season" real, "title" text, "director" text, "writer_s" 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 writers for 46 in series`: ```sql
SELECT "production_code" FROM "table1_26702078_1" WHERE "no_in_series"=60;
## Task Generate a SQL query to answer the following question: `Name the production code for 60 number in series` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26702078_1" ( "no_in_series" real, "no_in_season" real, "title" text, "director" text, "writer_s" 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 production code for 60 number in series`: ```sql
SELECT "title" FROM "table1_26701861_1" WHERE "director"='Pamela Fryman' AND "production_code"='2ALH07';
## Task Generate a SQL query to answer the following question: `what is the title of the episode with the director pamela fryman and the production code 2alh07?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26701861_1" ( "no_in_series" real, "no_in_season" real, "title" text, "director" text, "writer_s" text, "original_air_date" text, "production_code" text, "u_s_viewers_million" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the title of the episode with the director pamela fryman and the production code 2alh07?`: ```sql
SELECT "occurrence" FROM "promoter" WHERE "matrix_sim"='0.925';
## Task Generate a SQL query to answer the following question: `Which occurence has the matrix sim marked as 0.925?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "promoter" ( "detailed_family_information" text, "from" real, "to" real, "anchor" real, "orientation" text, "conserved_in_mus_musculus" text, "matrix_sim" text, "sequence" text, "occurrence" real ); ### SQL Given the database schema, here is the SQL query that answers `Which occurence has the matrix sim marked as 0.925?`: ```sql
SELECT COUNT("detailed_family_information") FROM "promoter" WHERE "sequence"='aAGTAct';
## Task Generate a SQL query to answer the following question: `What is the detailed family information where the sequence is aagtact?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "promoter" ( "detailed_family_information" text, "from" real, "to" real, "anchor" real, "orientation" text, "conserved_in_mus_musculus" text, "matrix_sim" text, "sequence" text, "occurrence" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the detailed family information where the sequence is aagtact?`: ```sql
SELECT MAX("occurrence") FROM "promoter" WHERE "matrix_sim"='0.925';
## Task Generate a SQL query to answer the following question: `What occurence has 0.925 listed as the matrix sim?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "promoter" ( "detailed_family_information" text, "from" real, "to" real, "anchor" real, "orientation" text, "conserved_in_mus_musculus" text, "matrix_sim" text, "sequence" text, "occurrence" real ); ### SQL Given the database schema, here is the SQL query that answers `What occurence has 0.925 listed as the matrix sim?`: ```sql
SELECT MIN("from") FROM "promoter" WHERE "detailed_family_information"='Krueppel like transcription factors';
## Task Generate a SQL query to answer the following question: `What is the number listed in from for the Krueppel Like Transcription Factors?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "promoter" ( "detailed_family_information" text, "from" real, "to" real, "anchor" real, "orientation" text, "conserved_in_mus_musculus" text, "matrix_sim" text, "sequence" text, "occurrence" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the number listed in from for the Krueppel Like Transcription Factors?`: ```sql
SELECT MIN("from") FROM "promoter";
## Task Generate a SQL query to answer the following question: `What is the smallest number listed in the from category? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "promoter" ( "detailed_family_information" text, "from" real, "to" real, "anchor" real, "orientation" text, "conserved_in_mus_musculus" text, "matrix_sim" text, "sequence" text, "occurrence" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest number listed in the from category? `: ```sql
SELECT "conserved_in_mus_musculus" FROM "promoter" WHERE "sequence"='aAGTAct';
## Task Generate a SQL query to answer the following question: `What is the conserved in mus musculus listing for sequence aagtact?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "promoter" ( "detailed_family_information" text, "from" real, "to" real, "anchor" real, "orientation" text, "conserved_in_mus_musculus" text, "matrix_sim" text, "sequence" text, "occurrence" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the conserved in mus musculus listing for sequence aagtact?`: ```sql
SELECT "nt_identity" FROM "orthologs" WHERE "species"='Drosophilia melanogaster';
## Task Generate a SQL query to answer the following question: `What is the nt identity when the species is drosophilia melanogaster?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "orthologs" ( "species" text, "common_name" text, "protein_name" text, "accession_number" text, "nt_length" text, "nt_identity" text, "aa_length" text, "aa_identity" text, "e_value" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nt identity when the species is drosophilia melanogaster?`: ```sql
SELECT "protein_name" FROM "orthologs" WHERE "aa_length"='202 aa';
## Task Generate a SQL query to answer the following question: `What is the protein name when aa length is 202 aa?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "orthologs" ( "species" text, "common_name" text, "protein_name" text, "accession_number" text, "nt_length" text, "nt_identity" text, "aa_length" text, "aa_identity" text, "e_value" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the protein name when aa length is 202 aa?`: ```sql
SELECT "protein_name" FROM "orthologs" WHERE "e_value"='2.50E-41';
## Task Generate a SQL query to answer the following question: `What is the protein name when the e-value is 2.50e-41?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "orthologs" ( "species" text, "common_name" text, "protein_name" text, "accession_number" text, "nt_length" text, "nt_identity" text, "aa_length" text, "aa_identity" text, "e_value" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the protein name when the e-value is 2.50e-41?`: ```sql
SELECT "aa_length" FROM "orthologs" WHERE "protein_name"='C11orf73';
## Task Generate a SQL query to answer the following question: `What is the aa length when the protein name is c11orf73?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "orthologs" ( "species" text, "common_name" text, "protein_name" text, "accession_number" text, "nt_length" text, "nt_identity" text, "aa_length" text, "aa_identity" text, "e_value" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the aa length when the protein name is c11orf73?`: ```sql
SELECT COUNT("common_name") FROM "orthologs" WHERE "accession_number"='XP_001843282';
## Task Generate a SQL query to answer the following question: `How many times is the accession number xp_001843282?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "orthologs" ( "species" text, "common_name" text, "protein_name" text, "accession_number" text, "nt_length" text, "nt_identity" text, "aa_length" text, "aa_identity" text, "e_value" text ); ### SQL Given the database schema, here is the SQL query that answers `How many times is the accession number xp_001843282?`: ```sql
SELECT COUNT("title") FROM "table1_26736040_1" WHERE "u_s_viewers_millions"='1.66';
## Task Generate a SQL query to answer the following question: `How many titles have U.S. viewers 1.66 million.` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26736040_1" ( "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 titles have U.S. viewers 1.66 million.`: ```sql
SELECT "title" FROM "table1_26736040_1" WHERE "u_s_viewers_millions"='1.04';
## Task Generate a SQL query to answer the following question: `What is every title when U.S. viewers is 1.04 million.` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26736040_1" ( "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 `What is every title when U.S. viewers is 1.04 million.`: ```sql
SELECT MAX("no_in_series") FROM "table1_26736040_1" WHERE "directed_by"='Phil Abraham';
## Task Generate a SQL query to answer the following question: `What is the highest number in series with director as Phil Abraham?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26736040_1" ( "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 `What is the highest number in series with director as Phil Abraham?`: ```sql
SELECT COUNT("no_in_series") FROM "table1_26736040_1" WHERE "directed_by"='Bryan Cranston';
## Task Generate a SQL query to answer the following question: `How many entries for number in series when director is Bryan Cranston?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26736040_1" ( "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 entries for number in series when director is Bryan Cranston?`: ```sql
SELECT MIN("no_in_series") FROM "table1_26736342_1" WHERE "u_s_viewers_millions"='1.32';
## Task Generate a SQL query to answer the following question: `What is the earliest episode that was watched by 1.32 million viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26736342_1" ( "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 `What is the earliest episode that was watched by 1.32 million viewers?`: ```sql
SELECT MAX("no_in_series") FROM "table1_26736342_1" WHERE "written_by"='John Shiban & Thomas Schnauz';
## Task Generate a SQL query to answer the following question: `What is the latest episode written by John Shiban & Thomas Schnauz?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26736342_1" ( "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 `What is the latest episode written by John Shiban & Thomas Schnauz?`: ```sql
SELECT COUNT("no_in_series") FROM "table1_26736342_1" WHERE "title"='\"Fly\"';
## Task Generate a SQL query to answer the following question: `What is the series number of the episode "Fly"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26736342_1" ( "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 `What is the series number of the episode "Fly"?`: ```sql
SELECT "directed_by" FROM "table1_26736342_1" WHERE "u_s_viewers_millions"='1.95';
## Task Generate a SQL query to answer the following question: `Who directed the eposide that was watched by 1.95 million US viewers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26736342_1" ( "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 eposide that was watched by 1.95 million US viewers?`: ```sql
SELECT MAX("episode_number") FROM "table1_26733129_1" WHERE "three_darts_challenge"='Sharon Osbourne';
## Task Generate a SQL query to answer the following question: `How many episodes are there for the three darts challenge with Sharon Osbourne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26733129_1" ( "episode_number" real, "air_date" text, "guests" text, "three_darts_challenge" text, "musical_performance" text ); ### SQL Given the database schema, here is the SQL query that answers `How many episodes are there for the three darts challenge with Sharon Osbourne?`: ```sql
SELECT "musical_performance" FROM "table1_26733129_1" WHERE "air_date"='5 April 2010';
## Task Generate a SQL query to answer the following question: `What musical performances aired on 5 April 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26733129_1" ( "episode_number" real, "air_date" text, "guests" text, "three_darts_challenge" text, "musical_performance" text ); ### SQL Given the database schema, here is the SQL query that answers `What musical performances aired on 5 April 2010?`: ```sql
SELECT "guests" FROM "table1_26733129_1" WHERE "air_date"='7 June 2010';
## Task Generate a SQL query to answer the following question: `What were the guests that aired on 7 June 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26733129_1" ( "episode_number" real, "air_date" text, "guests" text, "three_darts_challenge" text, "musical_performance" text ); ### SQL Given the database schema, here is the SQL query that answers `What were the guests that aired on 7 June 2010?`: ```sql
SELECT "three_darts_challenge" FROM "table1_26733129_1" WHERE "air_date"='10 May 2010';
## Task Generate a SQL query to answer the following question: `Who was in the three darts challenge that aired on 10 may 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26733129_1" ( "episode_number" real, "air_date" text, "guests" text, "three_darts_challenge" text, "musical_performance" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was in the three darts challenge that aired on 10 may 2010?`: ```sql
SELECT "ends_lost" FROM "round_robin_standings" WHERE "country"='Canada';
## Task Generate a SQL query to answer the following question: `Name the ends lost for canada` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_robin_standings" ( "country" text, "skip" text, "w" real, "l" real, "pf" real, "pa" real, "ends_won" real, "ends_lost" real, "blank_ends" real, "stolen_ends" real, "shot_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the ends lost for canada`: ```sql
SELECT MIN("ends_won") FROM "round_robin_standings" WHERE "skip"='Anna Kubešková';
## Task Generate a SQL query to answer the following question: `Name the least ends won for anna kubešková` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_robin_standings" ( "country" text, "skip" text, "w" real, "l" real, "pf" real, "pa" real, "ends_won" real, "ends_lost" real, "blank_ends" real, "stolen_ends" real, "shot_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the least ends won for anna kubešková`: ```sql
SELECT COUNT("ends_lost") FROM "round_robin_standings" WHERE "stolen_ends"=6;
## Task Generate a SQL query to answer the following question: `Name the number of ends lost for 6 stolen ends` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_robin_standings" ( "country" text, "skip" text, "w" real, "l" real, "pf" real, "pa" real, "ends_won" real, "ends_lost" real, "blank_ends" real, "stolen_ends" real, "shot_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the number of ends lost for 6 stolen ends`: ```sql
SELECT "proto_slavic" FROM "selected_cognates" WHERE "polish"='gniazdo';
## Task Generate a SQL query to answer the following question: `When gniazdo is polish what is proto-slavic?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "selected_cognates" ( "proto_slavic" text, "russian" text, "ukrainian" text, "belarusian" text, "polish" text, "czech" text, "slovak" text, "slovene" text, "serbo_croatian" text, "bulgarian" text, "macedonian" text ); ### SQL Given the database schema, here is the SQL query that answers `When gniazdo is polish what is proto-slavic?`: ```sql
SELECT "macedonian" FROM "selected_cognates" WHERE "serbo_croatian"='рука / ruka';
## Task Generate a SQL query to answer the following question: `When рука / ruka is the serbo-croatian what is the macedonian?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "selected_cognates" ( "proto_slavic" text, "russian" text, "ukrainian" text, "belarusian" text, "polish" text, "czech" text, "slovak" text, "slovene" text, "serbo_croatian" text, "bulgarian" text, "macedonian" text ); ### SQL Given the database schema, here is the SQL query that answers `When рука / ruka is the serbo-croatian what is the macedonian?`: ```sql
SELECT "proto_slavic" FROM "selected_cognates" WHERE "macedonian"='риба (ríba)';
## Task Generate a SQL query to answer the following question: `When риба (ríba) is the macedonian what is the proto-slavic?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "selected_cognates" ( "proto_slavic" text, "russian" text, "ukrainian" text, "belarusian" text, "polish" text, "czech" text, "slovak" text, "slovene" text, "serbo_croatian" text, "bulgarian" text, "macedonian" text ); ### SQL Given the database schema, here is the SQL query that answers `When риба (ríba) is the macedonian what is the proto-slavic?`: ```sql
SELECT COUNT("proto_slavic") FROM "selected_cognates" WHERE "serbo_croatian"='гн(иј)ездо / gn(ij)ezdo';
## Task Generate a SQL query to answer the following question: `When гн(иј)ездо / gn(ij)ezdo is the serbo-croatian how many proto-slavics are there?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "selected_cognates" ( "proto_slavic" text, "russian" text, "ukrainian" text, "belarusian" text, "polish" text, "czech" text, "slovak" text, "slovene" text, "serbo_croatian" text, "bulgarian" text, "macedonian" text ); ### SQL Given the database schema, here is the SQL query that answers `When гн(иј)ездо / gn(ij)ezdo is the serbo-croatian how many proto-slavics are there?`: ```sql
SELECT COUNT("slovene") FROM "selected_cognates" WHERE "belarusian"='рыба (rýba)';
## Task Generate a SQL query to answer the following question: `When рыба (rýba) is the belarusian how many slovenes are there?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "selected_cognates" ( "proto_slavic" text, "russian" text, "ukrainian" text, "belarusian" text, "polish" text, "czech" text, "slovak" text, "slovene" text, "serbo_croatian" text, "bulgarian" text, "macedonian" text ); ### SQL Given the database schema, here is the SQL query that answers `When рыба (rýba) is the belarusian how many slovenes are there?`: ```sql
SELECT COUNT("slovak") FROM "selected_cognates" WHERE "belarusian"='вуха (vúkha)';
## Task Generate a SQL query to answer the following question: `When вуха (vúkha) is the belarusian how many slovaks are there?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "selected_cognates" ( "proto_slavic" text, "russian" text, "ukrainian" text, "belarusian" text, "polish" text, "czech" text, "slovak" text, "slovene" text, "serbo_croatian" text, "bulgarian" text, "macedonian" text ); ### SQL Given the database schema, here is the SQL query that answers `When вуха (vúkha) is the belarusian how many slovaks are there?`: ```sql
SELECT "82_30_hrs_3_5_days" FROM "india" WHERE "4286km"='2579km';
## Task Generate a SQL query to answer the following question: `How long does the 2579km route take?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "india" ( "dibrugarh" text, "kanyakumari" text, "vivek_express_15905_15906" text, "indian_railways" text, "4286km" text, "55" real, "weekly" text, "82_30_hrs_3_5_days" text ); ### SQL Given the database schema, here is the SQL query that answers `How long does the 2579km route take?`: ```sql
SELECT "vivek_express_15905_15906" FROM "india" WHERE "kanyakumari"='Bhavnagar';
## Task Generate a SQL query to answer the following question: `What is the name of the only route that runs to bhavnagar?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "india" ( "dibrugarh" text, "kanyakumari" text, "vivek_express_15905_15906" text, "indian_railways" text, "4286km" text, "55" real, "weekly" text, "82_30_hrs_3_5_days" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the only route that runs to bhavnagar?`: ```sql
SELECT "original_air_date" FROM "table1_26748314_1" WHERE "no_in_season"=7;
## Task Generate a SQL query to answer the following question: `What is every original air date for the number in season of 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26748314_1" ( "no_in_series" real, "no_in_season" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "u_s_viewers_in_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is every original air date for the number in season of 7?`: ```sql
SELECT COUNT("participating_parties") FROM "congress" WHERE "registered_voters"=643629;
## Task Generate a SQL query to answer the following question: `What is the number of participating parties when registered voters totaled 643629?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "congress" ( "electoral_district" text, "registered_voters" real, "seats_in_congress" real, "candidates_per_party" real, "participating_parties" real, "total_candidates" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of participating parties when registered voters totaled 643629?`: ```sql
SELECT "electoral_district" FROM "congress" WHERE "total_candidates"=35;
## Task Generate a SQL query to answer the following question: `What is the electoral district when total candidates were 35?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "congress" ( "electoral_district" text, "registered_voters" real, "seats_in_congress" real, "candidates_per_party" real, "participating_parties" real, "total_candidates" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the electoral district when total candidates were 35?`: ```sql
SELECT COUNT("seats_in_congress") FROM "congress" WHERE "electoral_district"='Ucayali';
## Task Generate a SQL query to answer the following question: `What is the number of seats in congress when the electoral district is Ucayali?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "congress" ( "electoral_district" text, "registered_voters" real, "seats_in_congress" real, "candidates_per_party" real, "participating_parties" real, "total_candidates" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of seats in congress when the electoral district is Ucayali?`: ```sql
SELECT COUNT("seats_in_congress") FROM "congress" WHERE "candidates_per_party"=6;
## Task Generate a SQL query to answer the following question: `What is the number of seats in congress when the candidates per party is 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "congress" ( "electoral_district" text, "registered_voters" real, "seats_in_congress" real, "candidates_per_party" real, "participating_parties" real, "total_candidates" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of seats in congress when the candidates per party is 6?`: ```sql
SELECT "total_candidates" FROM "congress" WHERE "registered_voters"=47742;
## Task Generate a SQL query to answer the following question: `What is the number of total candidates when registered voters is 47742?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "congress" ( "electoral_district" text, "registered_voters" real, "seats_in_congress" real, "candidates_per_party" real, "participating_parties" real, "total_candidates" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of total candidates when registered voters is 47742?`: ```sql
SELECT "judges_residence" FROM "table1_26758262_1" WHERE "municipalities_served"='Beacon Falls , Naugatuck , Middlebury , Prospect';
## Task Generate a SQL query to answer the following question: `Where does the judge who serves Beacon Falls , Naugatuck , Middlebury , Prospect reside?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26758262_1" ( "district" real, "municipalities_served" text, "judge_of_probate" text, "judges_residence" text, "location_of_court" text ); ### SQL Given the database schema, here is the SQL query that answers `Where does the judge who serves Beacon Falls , Naugatuck , Middlebury , Prospect reside?`: ```sql
SELECT MAX("district") FROM "table1_26758262_1" WHERE "location_of_court"='Tolland';
## Task Generate a SQL query to answer the following question: `What district is the court located in Tolland?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26758262_1" ( "district" real, "municipalities_served" text, "judge_of_probate" text, "judges_residence" text, "location_of_court" text ); ### SQL Given the database schema, here is the SQL query that answers `What district is the court located in Tolland?`: ```sql
SELECT "judges_residence" FROM "table1_26758262_1" WHERE "location_of_court"='Groton';
## Task Generate a SQL query to answer the following question: `Where does the judge whose court is in Groton reside?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26758262_1" ( "district" real, "municipalities_served" text, "judge_of_probate" text, "judges_residence" text, "location_of_court" text ); ### SQL Given the database schema, here is the SQL query that answers `Where does the judge whose court is in Groton reside?`: ```sql
SELECT "nhl_team" FROM "round_one" WHERE "player"='John MacLean';
## Task Generate a SQL query to answer the following question: `what is the nhl team for the player john maclean?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_one" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the nhl team for the player john maclean?`: ```sql
SELECT "player" FROM "round_one" WHERE "position"='Defence' AND "college_junior_club_team"='Ottawa 67''s (OHL)';
## Task Generate a SQL query to answer the following question: `who is the player for the position defence and the college/junior/club team is ottawa 67's (ohl)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_one" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `who is the player for the position defence and the college/junior/club team is ottawa 67's (ohl)?`: ```sql
SELECT "college_junior_club_team" FROM "round_one" WHERE "player"='Alfie Turcotte';
## Task Generate a SQL query to answer the following question: `what is the college/junior/club team for the player alfie turcotte?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_one" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the college/junior/club team for the player alfie turcotte?`: ```sql
SELECT "college_junior_club_team" FROM "round_ten" WHERE "nhl_team"='Buffalo Sabres';
## Task Generate a SQL query to answer the following question: `What is the name of the college/junior/club team of the Buffalo Sabres?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_ten" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the college/junior/club team of the Buffalo Sabres?`: ```sql
SELECT "nationality" FROM "round_ten" WHERE "player"='Reine Karlsson';
## Task Generate a SQL query to answer the following question: `What is Reine Karlsson's nationality?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_ten" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Reine Karlsson's nationality?`: ```sql
SELECT COUNT("nationality") FROM "round_eleven" WHERE "nhl_team"='Philadelphia Flyers';
## Task Generate a SQL query to answer the following question: `How many players were drafted by the Philadelphia Flyers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_eleven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `How many players were drafted by the Philadelphia Flyers?`: ```sql
SELECT COUNT("pick_num") FROM "round_eleven" WHERE "nhl_team"='Chicago Black Hawks';
## Task Generate a SQL query to answer the following question: `How many picks did the Chicago Black Hawks get?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_eleven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `How many picks did the Chicago Black Hawks get?`: ```sql
SELECT "nhl_team" FROM "round_eleven" WHERE "pick_num"=203;
## Task Generate a SQL query to answer the following question: `What team had pick 203?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_eleven" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What team had pick 203?`: ```sql
SELECT "college_junior_club_team" FROM "round_twelve" WHERE "player"='Harold Duvall';
## Task Generate a SQL query to answer the following question: `Which school did harold duvall attend?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_twelve" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which school did harold duvall attend?`: ```sql
SELECT "position" FROM "round_twelve" WHERE "nhl_team"='Boston Bruins';
## Task Generate a SQL query to answer the following question: `List the position for the boston bruins.` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_twelve" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `List the position for the boston bruins.`: ```sql
SELECT "player" FROM "round_twelve" WHERE "college_junior_club_team"='Litvinov (Czechoslovakia)';
## Task Generate a SQL query to answer the following question: `Who was drafted to litvinov (czechoslovakia)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_twelve" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was drafted to litvinov (czechoslovakia)?`: ```sql
SELECT "position" FROM "round_twelve" WHERE "player"='Peter McGeough';
## Task Generate a SQL query to answer the following question: `What position does peter mcgeough cover?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_twelve" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does peter mcgeough cover?`: ```sql
SELECT "player" FROM "round_four" WHERE "nhl_team"='Minnesota North Stars';
## Task Generate a SQL query to answer the following question: `Which player was drafted by the Minnesota North Stars? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which player was drafted by the Minnesota North Stars? `: ```sql
SELECT "nationality" FROM "round_four" WHERE "player"='Bob Essensa';
## Task Generate a SQL query to answer the following question: `What is the nationality of Bob Essensa?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality of Bob Essensa?`: ```sql
SELECT "position" FROM "round_four" WHERE "college_junior_club_team"='Regina Pats (WHL)';
## Task Generate a SQL query to answer the following question: `What position is the player from the Regina Pats (WHL)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position is the player from the Regina Pats (WHL)?`: ```sql
SELECT "pick_num" FROM "round_four" WHERE "college_junior_club_team"='HIFK Helsinki (Finland)';
## Task Generate a SQL query to answer the following question: `What number pick was the player from HIFK Helsinki (Finland)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What number pick was the player from HIFK Helsinki (Finland)?`: ```sql
SELECT "nhl_team" FROM "round_four" WHERE "player"='Esa Tikkanen';
## Task Generate a SQL query to answer the following question: `Which team drafted Esa Tikkanen? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_four" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which team drafted Esa Tikkanen? `: ```sql
SELECT "nationality" FROM "round_nine" WHERE "pick_num"=168;
## Task Generate a SQL query to answer the following question: `What was the nationality of player picked no. 168?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_nine" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the nationality of player picked no. 168?`: ```sql
SELECT "nationality" FROM "round_nine" WHERE "pick_num"=179;
## Task Generate a SQL query to answer the following question: `What was the nationality of player picked no. 179?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_nine" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the nationality of player picked no. 179?`: ```sql
SELECT "player" FROM "round_nine" WHERE "nhl_team"='Hartford Whalers';
## Task Generate a SQL query to answer the following question: `Who was the player who played for Hartford Whalers NHL Team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_nine" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the player who played for Hartford Whalers NHL Team?`: ```sql
SELECT "position" FROM "round_nine" WHERE "nhl_team"='New York Islanders';
## Task Generate a SQL query to answer the following question: `What was the position of the player who played for New York Islanders NHL Team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_nine" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the position of the player who played for New York Islanders NHL Team?`: ```sql
SELECT "nationality" FROM "round_nine" WHERE "player"='Cliff Abrecht';
## Task Generate a SQL query to answer the following question: `What was the nationality of player Cliff Abrecht?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_nine" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the nationality of player Cliff Abrecht?`: ```sql
SELECT MAX("poles") FROM "career_summary";
## Task Generate a SQL query to answer the following question: `What is the highest number of poles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "career_summary" ( "season" real, "series" text, "team_name" text, "races" real, "poles" real, "wins" real, "podiums" real, "f_laps" real, "points" text, "final_placing" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number of poles?`: ```sql
SELECT COUNT("f_laps") FROM "career_summary" WHERE "points"='170';
## Task Generate a SQL query to answer the following question: `How many f/laps were there when he scored 170 points?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "career_summary" ( "season" real, "series" text, "team_name" text, "races" real, "poles" real, "wins" real, "podiums" real, "f_laps" real, "points" text, "final_placing" text ); ### SQL Given the database schema, here is the SQL query that answers `How many f/laps were there when he scored 170 points?`: ```sql
SELECT "points" FROM "career_summary" WHERE "final_placing"='13th' AND "races"=30;
## Task Generate a SQL query to answer the following question: `When there were 30 races and the final placing was 13th, how many points were scored?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "career_summary" ( "season" real, "series" text, "team_name" text, "races" real, "poles" real, "wins" real, "podiums" real, "f_laps" real, "points" text, "final_placing" text ); ### SQL Given the database schema, here is the SQL query that answers `When there were 30 races and the final placing was 13th, how many points were scored?`: ```sql
SELECT "nhl_team" FROM "round_eight" WHERE "pick_num"=155;
## Task Generate a SQL query to answer the following question: ` What club is associated with draft number 155? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_eight" ( "pick_num" real, "player" text, "position" text, "nationality" text, "nhl_team" text, "college_junior_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers ` What club is associated with draft number 155? `: ```sql
SELECT "production_code" FROM "table1_26801821_1" WHERE "no_in_series"=5;
## Task Generate a SQL query to answer the following question: `What is the production code for the number 5 series ? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26801821_1" ( "no_in_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the production code for the number 5 series ? `: ```sql
SELECT COUNT("no_in_series") FROM "table1_26801821_1" WHERE "written_by"='Teresa Lin';
## Task Generate a SQL query to answer the following question: `What is the number of the series written by Teresa Lin? ` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table1_26801821_1" ( "no_in_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "production_code" text, "u_s_viewers_millions" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of the series written by Teresa Lin? `: ```sql