output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "location" FROM "external_links" WHERE "champion"='brigham young-hawaii' AND "defeated"='western oregon' AND "score"='3-0 (15-5, 15-9, 15-6)';
## Task Generate a SQL query to answer the following question: `what is the location when the champion is brigham young-hawaii, defeated is western oregon and the score is 3-0 (15-5, 15-9, 15-6)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "external_links" ( "year" real, "champion" text, "score" text, "defeated" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the location when the champion is brigham young-hawaii, defeated is western oregon and the score is 3-0 (15-5, 15-9, 15-6)?`: ```sql
SELECT COUNT("year") FROM "external_links" WHERE "location"='san diego, california' AND "defeated"='houston baptist (texas)';
## Task Generate a SQL query to answer the following question: `what is the year when the location is san diego, california and defeated is houston baptist (texas)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "external_links" ( "year" real, "champion" text, "score" text, "defeated" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the year when the location is san diego, california and defeated is houston baptist (texas)?`: ```sql
SELECT "gross_mw" FROM "units" WHERE "operation_start"='2015';
## Task Generate a SQL query to answer the following question: `Operation start of 2015 has what gross mw?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); ### SQL Given the database schema, here is the SQL query that answers `Operation start of 2015 has what gross mw?`: ```sql
SELECT "operation_start" FROM "units" WHERE "gross_mw"='220' AND "unit"='kakrapar 1';
## Task Generate a SQL query to answer the following question: `Gross MW of 220, and a Unit of kakrapar 1 involves what operation start?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); ### SQL Given the database schema, here is the SQL query that answers `Gross MW of 220, and a Unit of kakrapar 1 involves what operation start?`: ```sql
SELECT "gross_mw" FROM "units" WHERE "type"='phase ii';
## Task Generate a SQL query to answer the following question: `Type of phase ii has what gross mw?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); ### SQL Given the database schema, here is the SQL query that answers `Type of phase ii has what gross mw?`: ```sql
SELECT "type" FROM "units" WHERE "construction_start"='phase i';
## Task Generate a SQL query to answer the following question: `Construction start of phase i includes what type?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); ### SQL Given the database schema, here is the SQL query that answers `Construction start of phase i includes what type?`: ```sql
SELECT "unit" FROM "units" WHERE "construction_start"='1 december 1984';
## Task Generate a SQL query to answer the following question: `Construction start of 1 december 1984 is what unit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); ### SQL Given the database schema, here is the SQL query that answers `Construction start of 1 december 1984 is what unit?`: ```sql
SELECT "operation_start" FROM "units" WHERE "construction_start"='phase ii';
## Task Generate a SQL query to answer the following question: `Construction start of phase ii has what operation start?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "units" ( "unit" text, "type" text, "gross_mw" text, "construction_start" text, "operation_start" text ); ### SQL Given the database schema, here is the SQL query that answers `Construction start of phase ii has what operation start?`: ```sql
SELECT "ungegn" FROM "sanskrit_and_pali_influence" WHERE "word_form"='ត្រីទស';
## Task Generate a SQL query to answer the following question: `what's the ungen for ត្រីទស?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "sanskrit_and_pali_influence" ( "value" text, "khmer" text, "word_form" text, "ungegn" text, "ala_lc" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `what's the ungen for ត្រីទស?`: ```sql
SELECT "notes" FROM "sanskrit_and_pali_influence" WHERE "khmer"='២៨';
## Task Generate a SQL query to answer the following question: `what notes have the khmer ២៨?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "sanskrit_and_pali_influence" ( "value" text, "khmer" text, "word_form" text, "ungegn" text, "ala_lc" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `what notes have the khmer ២៨?`: ```sql
SELECT "ungegn" FROM "sanskrit_and_pali_influence" WHERE "khmer"='១០០';
## Task Generate a SQL query to answer the following question: `what's the ungegn for the ១០០ khmer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "sanskrit_and_pali_influence" ( "value" text, "khmer" text, "word_form" text, "ungegn" text, "ala_lc" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `what's the ungegn for the ១០០ khmer?`: ```sql
SELECT MAX("population_2010") FROM "inhabited_territories_of_the_united_stat" WHERE "territory"='puerto rico';
## Task Generate a SQL query to answer the following question: `What was the population of Puerto Rico in 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "inhabited_territories_of_the_united_stat" ( "territory" text, "abbr" text, "capital" text, "acquired" real, "territorial_status" text, "population_2010" real, "house_seat" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the population of Puerto Rico in 2010?`: ```sql
SELECT "territory" FROM "inhabited_territories_of_the_united_stat" WHERE "acquired">1899 AND "capital"='saipan';
## Task Generate a SQL query to answer the following question: `What is the territory that was acquired past 1899 and has a capital of saipan?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "inhabited_territories_of_the_united_stat" ( "territory" text, "abbr" text, "capital" text, "acquired" real, "territorial_status" text, "population_2010" real, "house_seat" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the territory that was acquired past 1899 and has a capital of saipan?`: ```sql
SELECT "termination_of_mission" FROM "see_also" WHERE "appointed_by"='franklin pierce';
## Task Generate a SQL query to answer the following question: `Name the termination of mission for appointed by of franklin pierce` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "representative" text, "title" text, "presentation_of_credentials" text, "termination_of_mission" text, "appointed_by" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the termination of mission for appointed by of franklin pierce`: ```sql
SELECT "representative" FROM "see_also" WHERE "presentation_of_credentials"='august 16, 1928';
## Task Generate a SQL query to answer the following question: `Name the representative with presentation of credentials of august 16, 1928` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "representative" text, "title" text, "presentation_of_credentials" text, "termination_of_mission" text, "appointed_by" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the representative with presentation of credentials of august 16, 1928`: ```sql
SELECT "representative" FROM "see_also" WHERE "appointed_by"='george w. bush' AND "presentation_of_credentials"='9 november 2007';
## Task Generate a SQL query to answer the following question: `Name the representative appointed by george w. bush with presentation of credentials 9 november 2007` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "representative" text, "title" text, "presentation_of_credentials" text, "termination_of_mission" text, "appointed_by" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the representative appointed by george w. bush with presentation of credentials 9 november 2007`: ```sql
SELECT "title" FROM "see_also" WHERE "representative"='edward h. strobel';
## Task Generate a SQL query to answer the following question: `Name the title with representative edward h. strobel` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "representative" text, "title" text, "presentation_of_credentials" text, "termination_of_mission" text, "appointed_by" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the title with representative edward h. strobel`: ```sql
SELECT "country" FROM "final_round" WHERE "money"=600;
## Task Generate a SQL query to answer the following question: `Which Country that has 600?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Country that has 600?`: ```sql
SELECT "to_par" FROM "second_round" WHERE "player"='macdonald smith';
## Task Generate a SQL query to answer the following question: `What is the to par that has macdonald smith as the player?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the to par that has macdonald smith as the player?`: ```sql
SELECT "country" FROM "second_round" WHERE "place"='t6' AND "score"='75-70=145';
## Task Generate a SQL query to answer the following question: `Which country has t6 as a place and 75-70=145 as the score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which country has t6 as a place and 75-70=145 as the score?`: ```sql
SELECT "to_par" FROM "second_round" WHERE "player"='jimmy hines';
## Task Generate a SQL query to answer the following question: `What is the to par that has jimmy hines as the player?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the to par that has jimmy hines as the player?`: ```sql
SELECT "score" FROM "second_round" WHERE "place"='t3';
## Task Generate a SQL query to answer the following question: `Which score has t3 as the place?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which score has t3 as the place?`: ```sql
SELECT "place" FROM "second_round" WHERE "player"='horton smith';
## Task Generate a SQL query to answer the following question: `Which place has horton smith as the player?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which place has horton smith as the player?`: ```sql
SELECT "place" FROM "second_round" WHERE "country"='united states' AND "player"='craig wood';
## Task Generate a SQL query to answer the following question: `Which place has United States as the country and Craig Wood as the player?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which place has United States as the country and Craig Wood as the player?`: ```sql
SELECT "2013" FROM "singles_performance_timeline" WHERE "2007"='a';
## Task Generate a SQL query to answer the following question: `What was the 2013 finish for the tournament that had a 2007 finish of A?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the 2013 finish for the tournament that had a 2007 finish of A?`: ```sql
SELECT "2012" FROM "singles_performance_timeline" WHERE "tournament"='us open';
## Task Generate a SQL query to answer the following question: `What was the 2012 finish in the US Open?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the 2012 finish in the US Open?`: ```sql
SELECT "tournament" FROM "singles_performance_timeline" WHERE "2010"='4r';
## Task Generate a SQL query to answer the following question: `Which tournament had a 2010 finish of 4R?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_performance_timeline" ( "tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text ); ### SQL Given the database schema, here is the SQL query that answers `Which tournament had a 2010 finish of 4R?`: ```sql
SELECT "18_september_2007_19_45" FROM "the_championship" WHERE "preston_north_end"='watford';
## Task Generate a SQL query to answer the following question: `Name the 18th september 2007-19:45 with preston north end of watford` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_championship" ( "18_september_2007_19_45" text, "preston_north_end" text, "home" text, "won_2_1" text, "5_754" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the 18th september 2007-19:45 with preston north end of watford`: ```sql
SELECT "won_2_1" FROM "the_championship" WHERE "preston_north_end"='preston';
## Task Generate a SQL query to answer the following question: `Name the won 2-1 for preston north end of preston` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "the_championship" ( "18_september_2007_19_45" text, "preston_north_end" text, "home" text, "won_2_1" text, "5_754" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the won 2-1 for preston north end of preston`: ```sql
SELECT "qual" FROM "indy_500_results" WHERE "rank"='29' AND "year"='1957';
## Task Generate a SQL query to answer the following question: `What is the qualification for rank of 29 in 1957?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indy_500_results" ( "year" text, "start" text, "qual" text, "rank" text, "finish" text, "laps" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the qualification for rank of 29 in 1957?`: ```sql
SELECT "place" FROM "second_round" WHERE "to_par"='+3' AND "score"='74-73=147';
## Task Generate a SQL query to answer the following question: `What is the Place when the To par was +3 and Score was 74-73=147?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Place when the To par was +3 and Score was 74-73=147?`: ```sql
SELECT "score" FROM "second_round" WHERE "to_par"='e';
## Task Generate a SQL query to answer the following question: `When the To par is E, what is the Score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `When the To par is E, what is the Score?`: ```sql
SELECT "score" FROM "second_round" WHERE "player"='lloyd mangrum';
## Task Generate a SQL query to answer the following question: `What was Lloyd Mangrum's Score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What was Lloyd Mangrum's Score?`: ```sql
SELECT "place" FROM "second_round" WHERE "player"='dave douglas';
## Task Generate a SQL query to answer the following question: `What Dave Douglas' Place?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What Dave Douglas' Place?`: ```sql
SELECT "to_par" FROM "second_round" WHERE "player"='chick harbert';
## Task Generate a SQL query to answer the following question: `What's Chick Harbert's To par?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What's Chick Harbert's To par?`: ```sql
SELECT "player" FROM "second_round" WHERE "country"='united states' AND "to_par"='+4' AND "score"='71-77=148';
## Task Generate a SQL query to answer the following question: `What United States Player has a To par of +4 and a Score of 71-77=148?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What United States Player has a To par of +4 and a Score of 71-77=148?`: ```sql
SELECT "to_par" FROM "final_round" WHERE "country"='south korea';
## Task Generate a SQL query to answer the following question: `What is South Korea's to par value?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `What is South Korea's to par value?`: ```sql
SELECT AVG("money") FROM "final_round" WHERE "player"='tiger woods';
## Task Generate a SQL query to answer the following question: `What are Tiger Woods' average earnings?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `What are Tiger Woods' average earnings?`: ```sql
SELECT "method" FROM "mixed_martial_arts_record" WHERE "round"<3 AND "record"='4-2';
## Task Generate a SQL query to answer the following question: `What's the method for a record of 4-2 and round smaller than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the method for a record of 4-2 and round smaller than 3?`: ```sql
SELECT "location" FROM "mixed_martial_arts_record" WHERE "round"=3 AND "opponent"='james zikic';
## Task Generate a SQL query to answer the following question: `Where's the location for the opponent James Zikic and 3 rounds?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Where's the location for the opponent James Zikic and 3 rounds?`: ```sql
SELECT "spouse" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "name"='louise of hesse-kassel';
## Task Generate a SQL query to answer the following question: `Name the spouse for louise of hesse-kassel` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the spouse for louise of hesse-kassel`: ```sql
SELECT "became_consort" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "spouse"='christian ix';
## Task Generate a SQL query to answer the following question: `Name the became consort for christian ix spouse` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the became consort for christian ix spouse`: ```sql
SELECT "marriage" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "ceased_to_be_consort"='29 september 1898';
## Task Generate a SQL query to answer the following question: `Name the marriagefor ceased to be consort of 29 september 1898` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the marriagefor ceased to be consort of 29 september 1898`: ```sql
SELECT "name" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "spouse"='frederick ix';
## Task Generate a SQL query to answer the following question: `Tell me the name of the person married to frederick ix` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the name of the person married to frederick ix`: ```sql
SELECT "birth" FROM "house_of_schleswig_holstein_sonderburg_g" WHERE "marriage"='24 may 1935';
## Task Generate a SQL query to answer the following question: `Name the birth of the person married 24 may 1935` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "house_of_schleswig_holstein_sonderburg_g" ( "name" text, "birth" text, "marriage" text, "became_consort" text, "ceased_to_be_consort" text, "spouse" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the birth of the person married 24 may 1935`: ```sql
SELECT AVG("rank") FROM "semifinal_2" WHERE "lane"=6;
## Task Generate a SQL query to answer the following question: `What was the rank of the player in lane 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semifinal_2" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the rank of the player in lane 6?`: ```sql
SELECT AVG("year") FROM "complete_24_hours_of_le_mans_results" WHERE "laps"=6;
## Task Generate a SQL query to answer the following question: `Name the average year with Laps of 6` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "complete_24_hours_of_le_mans_results" ( "year" real, "class" text, "tyres" text, "team" text, "co_drivers" text, "laps" real, "pos" text, "class_pos" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the average year with Laps of 6`: ```sql
SELECT "language" FROM "language" WHERE "number"='553 633';
## Task Generate a SQL query to answer the following question: `Which Language has a Number of 553 633?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "language" ( "language" text, "number" text, "percentage_pct" text, "males" text, "females" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Language has a Number of 553 633?`: ```sql
SELECT "males" FROM "language" WHERE "percentage_pct"='0.42';
## Task Generate a SQL query to answer the following question: `Which Males have a percentage of 0.42?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "language" ( "language" text, "number" text, "percentage_pct" text, "males" text, "females" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Males have a percentage of 0.42?`: ```sql
SELECT "language" FROM "language" WHERE "percentage_pct"='6.49';
## Task Generate a SQL query to answer the following question: `What's the Language with a percentage of 6.49?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "language" ( "language" text, "number" text, "percentage_pct" text, "males" text, "females" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the Language with a percentage of 6.49?`: ```sql
SELECT "number" FROM "language" WHERE "language"='other';
## Task Generate a SQL query to answer the following question: `What Number has a Language listed as other?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "language" ( "language" text, "number" text, "percentage_pct" text, "males" text, "females" text ); ### SQL Given the database schema, here is the SQL query that answers `What Number has a Language listed as other?`: ```sql
SELECT MAX("gold") FROM "medals_table" WHERE "total">3 AND "bronze"<3 AND "nation"='belarus' AND "silver">2;
## Task Generate a SQL query to answer the following question: `what is the highest gold count when total is more than 3, bronze less than 3, and nation of belarus with silver count more than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medals_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `what is the highest gold count when total is more than 3, bronze less than 3, and nation of belarus with silver count more than 2?`: ```sql
SELECT MIN("bronze") FROM "medals_table" WHERE "silver"<0;
## Task Generate a SQL query to answer the following question: `with silver count at 0, what is the lowest bronze count?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medals_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `with silver count at 0, what is the lowest bronze count?`: ```sql
SELECT MIN("gold") FROM "medals_table" WHERE "total"<3 AND "silver">1;
## Task Generate a SQL query to answer the following question: `what is the gold count with total less than 3 and more than 1 silver?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medals_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `what is the gold count with total less than 3 and more than 1 silver?`: ```sql
SELECT "builder" FROM "jdf_coast_guard" WHERE "length"='42.8 m' AND "delivery"=2007;
## Task Generate a SQL query to answer the following question: `Who built the ship that is 42.8 m long and was delivered in 2007?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "jdf_coast_guard" ( "name_of_ship" text, "length" text, "max_speed" text, "crew_capacity" text, "class" text, "builder" text, "delivery" real ); ### SQL Given the database schema, here is the SQL query that answers `Who built the ship that is 42.8 m long and was delivered in 2007?`: ```sql
SELECT "human_resources_operations" FROM "executive_commissioners" WHERE "year"='2003-2004';
## Task Generate a SQL query to answer the following question: `Who was the Human Resources & Operations person between 2003-2004?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the Human Resources & Operations person between 2003-2004?`: ```sql
SELECT "local_affairs" FROM "executive_commissioners" WHERE "human_resources_operations"='n. charles hamilton';
## Task Generate a SQL query to answer the following question: `Who was in local affairs when the Human Resources & Operations was N. Charles Hamilton?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was in local affairs when the Human Resources & Operations was N. Charles Hamilton?`: ```sql
SELECT "human_resources_operations" FROM "executive_commissioners" WHERE "academic_university_affairs"='david hornsby';
## Task Generate a SQL query to answer the following question: `Who was in Human Resources & Operations when David Hornsby was in Academic & University Affairs?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was in Human Resources & Operations when David Hornsby was in Academic & University Affairs?`: ```sql
SELECT "external_affairs" FROM "executive_commissioners" WHERE "human_resources_operations"='jakki doyle';
## Task Generate a SQL query to answer the following question: `Who was in external affairs when Jakki Doyle was in Human Resources & Operations?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was in external affairs when Jakki Doyle was in Human Resources & Operations?`: ```sql
SELECT "local_affairs" FROM "executive_commissioners" WHERE "year"='2012-2013';
## Task Generate a SQL query to answer the following question: `Who was in local affairs in 2012-2013?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was in local affairs in 2012-2013?`: ```sql
SELECT "academic_university_affairs" FROM "executive_commissioners" WHERE "local_affairs"='andrew langille';
## Task Generate a SQL query to answer the following question: `Who was in Academic & University Affairs when Andrew Langille was in local affairs?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "executive_commissioners" ( "year" text, "human_resources_operations" text, "local_affairs" text, "academic_university_affairs" text, "external_affairs" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was in Academic & University Affairs when Andrew Langille was in local affairs?`: ```sql
SELECT "perth" FROM "1994" WHERE "gold_coast"='yes' AND "adelaide"='yes' AND "auckland"='no';
## Task Generate a SQL query to answer the following question: `Which Perth's gold coast and Adelaide were yes when Auckland was no?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Perth's gold coast and Adelaide were yes when Auckland was no?`: ```sql
SELECT "melbourne" FROM "1994" WHERE "gold_coast"='yes' AND "adelaide"='no' AND "sydney"='yes';
## Task Generate a SQL query to answer the following question: `Which Melbourne had a gold coast and sydney which were yes, but an adelaide that was no?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Melbourne had a gold coast and sydney which were yes, but an adelaide that was no?`: ```sql
SELECT "adelaide" FROM "1994" WHERE "melbourne"='yes' AND "auckland"='no' AND "perth"='yes';
## Task Generate a SQL query to answer the following question: `Which Adelaide's Melbourne and Perth were yes when Auckland was no?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Adelaide's Melbourne and Perth were yes when Auckland was no?`: ```sql
SELECT "sydney" FROM "1994" WHERE "melbourne"='no' AND "auckland"='yes';
## Task Generate a SQL query to answer the following question: `Which Sydney's Melbourne was no, when Auckland was yes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Sydney's Melbourne was no, when Auckland was yes?`: ```sql
SELECT "sydney" FROM "1994" WHERE "gold_coast"='no' AND "adelaide"='no' AND "melbourne"='no' AND "auckland"='no';
## Task Generate a SQL query to answer the following question: `Which Syndney's Gold coast, Adelaide, Melbourne, and Auckland were all no?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Syndney's Gold coast, Adelaide, Melbourne, and Auckland were all no?`: ```sql
SELECT "adelaide" FROM "1994" WHERE "melbourne"='no' AND "sydney"='no' AND "gold_coast"='no';
## Task Generate a SQL query to answer the following question: `Which Adelaide's Melbourne, Sydney, and Gold Coast were all no?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1994" ( "sydney" text, "melbourne" text, "perth" text, "adelaide" text, "gold_coast" text, "auckland" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Adelaide's Melbourne, Sydney, and Gold Coast were all no?`: ```sql
SELECT "date" FROM "stage_results" WHERE "type"='plain stage';
## Task Generate a SQL query to answer the following question: `Name the date which has type of plain stage` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "stage_results" ( "date" text, "course" text, "distance" text, "type" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the date which has type of plain stage`: ```sql
SELECT "distance" FROM "stage_results" WHERE "course"='vittorio veneto to marina romea';
## Task Generate a SQL query to answer the following question: `Name the distance for Course of vittorio veneto to marina romea` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "stage_results" ( "date" text, "course" text, "distance" text, "type" text, "winner" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the distance for Course of vittorio veneto to marina romea`: ```sql
SELECT "partner" FROM "doubles_6_3_titles_3_runners_up" WHERE "surface"='grass';
## Task Generate a SQL query to answer the following question: `Who was the partner that played a match on a grass court?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_6_3_titles_3_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the partner that played a match on a grass court?`: ```sql
SELECT "score" FROM "doubles_6_3_titles_3_runners_up" WHERE "partner"='mardy fish';
## Task Generate a SQL query to answer the following question: `What was the score of the match in which mardy fish was the partner?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_6_3_titles_3_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score of the match in which mardy fish was the partner?`: ```sql
SELECT "opponents" FROM "doubles_6_3_titles_3_runners_up" WHERE "surface"='hard' AND "outcome"='runner-up';
## Task Generate a SQL query to answer the following question: `Who were the opponents in the match that was played on a hard court and had a runner-up outcome?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_6_3_titles_3_runners_up" ( "outcome" text, "date" text, "surface" text, "partner" text, "opponents" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Who were the opponents in the match that was played on a hard court and had a runner-up outcome?`: ```sql
SELECT "time" FROM "mixed_martial_arts_record" WHERE "opponent"='phil collins';
## Task Generate a SQL query to answer the following question: `What is the time when the opponent is phil collins?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the time when the opponent is phil collins?`: ```sql
SELECT COUNT("round") FROM "mixed_martial_arts_record" WHERE "method"='tko (punches)' AND "time"='0:40';
## Task Generate a SQL query to answer the following question: `what is the total number of rounds when method is tko (punches) and time is 0:40?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the total number of rounds when method is tko (punches) and time is 0:40?`: ```sql
SELECT "method" FROM "mixed_martial_arts_record" WHERE "time"='0:51';
## Task Generate a SQL query to answer the following question: `what is the method when the time is 0:51?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the method when the time is 0:51?`: ```sql
SELECT "time" FROM "mixed_martial_arts_record" WHERE "event"='bellator 89';
## Task Generate a SQL query to answer the following question: `what is the time when the event is bellator 89?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the time when the event is bellator 89?`: ```sql
SELECT AVG("debt_as_pct_of_value") FROM "2009_rankings" WHERE "pct_change_on_year"='62' AND "operating_income_m">-16;
## Task Generate a SQL query to answer the following question: `Name the average debt as % of value for operating income more than -16 and % change on year being 62` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pct_of_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the average debt as % of value for operating income more than -16 and % change on year being 62`: ```sql
SELECT "country" FROM "2009_rankings" WHERE "debt_as_pct_of_value"<86 AND "pct_change_on_year"='21';
## Task Generate a SQL query to answer the following question: `Name the country where % change on year is 21 and value is less than 86` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pct_of_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the country where % change on year is 21 and value is less than 86`: ```sql
SELECT COUNT("revenue_m") FROM "2009_rankings" WHERE "country"='italy' AND "team"='internazionale' AND "operating_income_m"<27;
## Task Generate a SQL query to answer the following question: `Name the total number of revenue for italy with team of internazionale with operating income less than 27` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pct_of_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of revenue for italy with team of internazionale with operating income less than 27`: ```sql
SELECT MAX("revenue_m") FROM "2009_rankings" WHERE "operating_income_m">27 AND "team"='hamburg' AND "debt_as_pct_of_value"<0;
## Task Generate a SQL query to answer the following question: `Name the most revenue for operating income more than 27 for hamburg and debt as % of value less than 0` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_rankings" ( "rank" real, "team" text, "country" text, "value_m" real, "debt_as_pct_of_value" real, "pct_change_on_year" text, "revenue_m" real, "operating_income_m" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the most revenue for operating income more than 27 for hamburg and debt as % of value less than 0`: ```sql
SELECT "result" FROM "1989_90_liverpool_f_c_season" WHERE "h_a"='h' AND "round"='r6 replay';
## Task Generate a SQL query to answer the following question: `What is the result for an H/A of H and a round value of R6 replay?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1989_90_liverpool_f_c_season" ( "round" text, "kick_off" text, "opponents" text, "h_a" text, "result" text, "attendance" real, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the result for an H/A of H and a round value of R6 replay?`: ```sql
SELECT "kick_off" FROM "1989_90_liverpool_f_c_season" WHERE "round"='r4';
## Task Generate a SQL query to answer the following question: `What was the kickoff date for the round value of R4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1989_90_liverpool_f_c_season" ( "round" text, "kick_off" text, "opponents" text, "h_a" text, "result" text, "attendance" real, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the kickoff date for the round value of R4?`: ```sql
SELECT "country" FROM "third_round" WHERE "player"='henry picard';
## Task Generate a SQL query to answer the following question: `What country was Henry Picard from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What country was Henry Picard from?`: ```sql
SELECT SUM("inversions") FROM "installations" WHERE "opened"='april 20, 2002';
## Task Generate a SQL query to answer the following question: `Name the sum of inversions for opened of april 20, 2002` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "installations" ( "name" text, "park" text, "country" text, "inversions" real, "opened" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the sum of inversions for opened of april 20, 2002`: ```sql
SELECT "opened" FROM "installations" WHERE "country"='spain';
## Task Generate a SQL query to answer the following question: `Name the opened for spain` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "installations" ( "name" text, "park" text, "country" text, "inversions" real, "opened" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the opened for spain`: ```sql
SELECT "status" FROM "installations" WHERE "park"='six flags new england';
## Task Generate a SQL query to answer the following question: `Name the status for six flags new england` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "installations" ( "name" text, "park" text, "country" text, "inversions" real, "opened" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the status for six flags new england`: ```sql
SELECT "to_par" FROM "final_round" WHERE "money"='200,000' AND "country"='australia';
## Task Generate a SQL query to answer the following question: `Name the to par with money of 200,000 for australia` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the to par with money of 200,000 for australia`: ```sql
SELECT "money" FROM "final_round" WHERE "country"='ireland';
## Task Generate a SQL query to answer the following question: `Name the money for ireland` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the money for ireland`: ```sql
SELECT "money" FROM "final_round" WHERE "player"='pádraig harrington';
## Task Generate a SQL query to answer the following question: `Name the money for pádraig harrington` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the money for pádraig harrington`: ```sql
SELECT "to_par" FROM "final_round" WHERE "score"='69-73-68-70=280';
## Task Generate a SQL query to answer the following question: `Name the to par for score of 69-73-68-70=280` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the to par for score of 69-73-68-70=280`: ```sql
SELECT "money" FROM "final_round" WHERE "to_par"='-6';
## Task Generate a SQL query to answer the following question: `Name the money for the to par of -6` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the money for the to par of -6`: ```sql
SELECT "term_end" FROM "list_of_health_minsters" WHERE "party"='centre party';
## Task Generate a SQL query to answer the following question: `On what date or dates did the term with the Centre Party end?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_health_minsters" ( "minister" text, "party" text, "governments" text, "term_start" text, "term_end" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date or dates did the term with the Centre Party end?`: ```sql
SELECT "term_end" FROM "list_of_health_minsters" WHERE "governments"='27' AND "minister"='tzachi hanegbi';
## Task Generate a SQL query to answer the following question: `When did the term end for the term that had government 27 and Minister Tzachi Hanegbi?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_health_minsters" ( "minister" text, "party" text, "governments" text, "term_start" text, "term_end" text ); ### SQL Given the database schema, here is the SQL query that answers `When did the term end for the term that had government 27 and Minister Tzachi Hanegbi?`: ```sql
SELECT "location_state" FROM "race_calendar" WHERE "circuit"='wanneroo raceway';
## Task Generate a SQL query to answer the following question: `What is the location/state of the race on the Wanneroo raceway?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "location_state" text, "date" text, "winner" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the location/state of the race on the Wanneroo raceway?`: ```sql
SELECT "location_state" FROM "race_calendar" WHERE "race_title"='launceston';
## Task Generate a SQL query to answer the following question: `What is the location/state of the Launceston race?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "location_state" text, "date" text, "winner" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the location/state of the Launceston race?`: ```sql
SELECT "team" FROM "race_calendar" WHERE "winner"='dick johnson';
## Task Generate a SQL query to answer the following question: `What is the team of winner Dick Johnson?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "location_state" text, "date" text, "winner" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the team of winner Dick Johnson?`: ```sql
SELECT "race_title" FROM "race_calendar" WHERE "team"='jps team bmw' AND "circuit"='oran park raceway';
## Task Generate a SQL query to answer the following question: `What is the race title of the Oran Park raceway circuit with team jps team bmw?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_calendar" ( "race_title" text, "circuit" text, "location_state" text, "date" text, "winner" text, "team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the race title of the Oran Park raceway circuit with team jps team bmw?`: ```sql
SELECT COUNT("population_hervey_bay") FROM "population" WHERE "population_woocoo"<640 AND "population_maryborough"<'19,257';
## Task Generate a SQL query to answer the following question: `Name the total number of population hervey bay with population woocoo less than 640 and population of maryborough less than 19,257` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "population" ( "year" real, "population_region_total" real, "population_maryborough" real, "population_hervey_bay" real, "population_woocoo" real, "population_tiaro" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of population hervey bay with population woocoo less than 640 and population of maryborough less than 19,257`: ```sql
SELECT AVG("population_hervey_bay") FROM "population" WHERE "population_maryborough">'11,415' AND "population_region_total"<'48,308' AND "population_tiaro"<'2,066' AND "population_woocoo"=491;
## Task Generate a SQL query to answer the following question: `Name the average population hervey bay with population maryborough more than 11,415 and population region total less than 48,308 and population tiaro less than 2,066 and population woocoo of 491` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "population" ( "year" real, "population_region_total" real, "population_maryborough" real, "population_hervey_bay" real, "population_woocoo" real, "population_tiaro" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the average population hervey bay with population maryborough more than 11,415 and population region total less than 48,308 and population tiaro less than 2,066 and population woocoo of 491`: ```sql
SELECT MAX("population_hervey_bay") FROM "population" WHERE "population_maryborough"='22,977' AND "population_tiaro"<'3,287';
## Task Generate a SQL query to answer the following question: `Name the most population hervey bay for when population maryborough of 22,977 and population tiaro less than 3,287` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "population" ( "year" real, "population_region_total" real, "population_maryborough" real, "population_hervey_bay" real, "population_woocoo" real, "population_tiaro" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the most population hervey bay for when population maryborough of 22,977 and population tiaro less than 3,287`: ```sql