output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "haat" FROM "stations" WHERE "facility_id"=65944;
## Task Generate a SQL query to answer the following question: `Which HAAT has 65944?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "stations" ( "station" text, "city_of_license" text, "channels_tv_rf" text, "first_air_date" text, "haat" text, "facility_id" real, "public_license_information" text ); ### SQL Given the database schema, here is the SQL query that answers `Which HAAT has 65944?`: ```sql
SELECT "city_of_license" FROM "stations" WHERE "channels_tv_rf"='36 (psip) 36 (uhf)';
## Task Generate a SQL query to answer the following question: `Which City of license has a Channels TV / RF of 36 (psip) 36 (uhf)? Question 5` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "stations" ( "station" text, "city_of_license" text, "channels_tv_rf" text, "first_air_date" text, "haat" text, "facility_id" real, "public_license_information" text ); ### SQL Given the database schema, here is the SQL query that answers `Which City of license has a Channels TV / RF of 36 (psip) 36 (uhf)? Question 5`: ```sql
SELECT "format" FROM "release_history" WHERE "date"='october 29, 2004';
## Task Generate a SQL query to answer the following question: `What format is dated October 29, 2004?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "country" text, "date" text, "label" text, "format" text, "catalogue_num" text ); ### SQL Given the database schema, here is the SQL query that answers `What format is dated October 29, 2004?`: ```sql
SELECT "date" FROM "release_history" WHERE "catalogue_num"='ptcd-1015-6';
## Task Generate a SQL query to answer the following question: `What is the date with the catalogue number ptcd-1015-6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "country" text, "date" text, "label" text, "format" text, "catalogue_num" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date with the catalogue number ptcd-1015-6?`: ```sql
SELECT "label" FROM "release_history" WHERE "date"='december 2004';
## Task Generate a SQL query to answer the following question: `What is the label for December 2004?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "country" text, "date" text, "label" text, "format" text, "catalogue_num" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the label for December 2004?`: ```sql
SELECT "date" FROM "release_history" WHERE "label"='hydra head records' AND "format"='cd';
## Task Generate a SQL query to answer the following question: `What is the date for Hydra Head Records with a CD format?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "country" text, "date" text, "label" text, "format" text, "catalogue_num" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date for Hydra Head Records with a CD format?`: ```sql
SELECT "country" FROM "release_history" WHERE "label"='hydra head records' AND "date"='february 2005';
## Task Generate a SQL query to answer the following question: `Which country has Hydra Head Records on February 2005?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "country" text, "date" text, "label" text, "format" text, "catalogue_num" text ); ### SQL Given the database schema, here is the SQL query that answers `Which country has Hydra Head Records on February 2005?`: ```sql
SELECT "country" FROM "release_history" WHERE "format"='2lp' AND "label"='hydra head records';
## Task Generate a SQL query to answer the following question: `Which country has Hydra Head Records with a 2lp format?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "country" text, "date" text, "label" text, "format" text, "catalogue_num" text ); ### SQL Given the database schema, here is the SQL query that answers `Which country has Hydra Head Records with a 2lp format?`: ```sql
SELECT "jockey" FROM "race_starters" WHERE "horse"='mad rush';
## Task Generate a SQL query to answer the following question: `Who rode mad rush?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_starters" ( "saddle_cloth" real, "horse" text, "trainer" text, "jockey" text, "weight_kg" real, "barrier_b" text, "placing" text ); ### SQL Given the database schema, here is the SQL query that answers `Who rode mad rush?`: ```sql
SELECT "placing" FROM "race_starters" WHERE "weight_kg"<54 AND "barrier_b"='20';
## Task Generate a SQL query to answer the following question: `What place was the horse with a barrier of 20 and weighing less than 54 kg` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_starters" ( "saddle_cloth" real, "horse" text, "trainer" text, "jockey" text, "weight_kg" real, "barrier_b" text, "placing" text ); ### SQL Given the database schema, here is the SQL query that answers `What place was the horse with a barrier of 20 and weighing less than 54 kg`: ```sql
SELECT "placing" FROM "race_starters" WHERE "horse"='viewed';
## Task Generate a SQL query to answer the following question: `What place was the viewed horse?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_starters" ( "saddle_cloth" real, "horse" text, "trainer" text, "jockey" text, "weight_kg" real, "barrier_b" text, "placing" text ); ### SQL Given the database schema, here is the SQL query that answers `What place was the viewed horse?`: ```sql
SELECT AVG("wins") FROM "nascar_nationwide_series" WHERE "top_10"<5 AND "winnings"='$39,190' AND "starts"<2;
## Task Generate a SQL query to answer the following question: `What is the average number of wins of the year with less than 5 top 10s, a winning of $39,190 and less than 2 starts?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nascar_nationwide_series" ( "year" real, "starts" real, "wins" real, "top_5" real, "top_10" real, "poles" real, "avg_start" real, "avg_finish" real, "winnings" text, "position" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average number of wins of the year with less than 5 top 10s, a winning of $39,190 and less than 2 starts?`: ```sql
SELECT MAX("poles") FROM "nascar_nationwide_series" WHERE "starts">18 AND "winnings"='$125,102' AND "year"<1992;
## Task Generate a SQL query to answer the following question: `What is the highest number of poles of the year before 1992 with more than 18 starts and winnings of $125,102?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nascar_nationwide_series" ( "year" real, "starts" real, "wins" real, "top_5" real, "top_10" real, "poles" real, "avg_start" real, "avg_finish" real, "winnings" text, "position" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number of poles of the year before 1992 with more than 18 starts and winnings of $125,102?`: ```sql
SELECT "theatre" FROM "notable_works" WHERE "author"='stanisław wyspiański' AND "year"=1969;
## Task Generate a SQL query to answer the following question: `Author of stanisław wyspiański, and a Year of 1969 happened in what theatre?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "notable_works" ( "year" real, "play" text, "author" text, "theatre" text, "type" text, "role" text ); ### SQL Given the database schema, here is the SQL query that answers `Author of stanisław wyspiański, and a Year of 1969 happened in what theatre?`: ```sql
SELECT "game" FROM "schedule_and_results" WHERE "opponent"='new jersey devils';
## Task Generate a SQL query to answer the following question: `Which game did New Jersey Devils played in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule_and_results" ( "game" real, "february" real, "opponent" text, "score" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Which game did New Jersey Devils played in?`: ```sql
SELECT "score" FROM "schedule_and_results" WHERE "record"='21-25-7-4';
## Task Generate a SQL query to answer the following question: `What score has a record of 21-25-7-4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule_and_results" ( "game" real, "february" real, "opponent" text, "score" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What score has a record of 21-25-7-4?`: ```sql
SELECT "score" FROM "schedule_and_results" WHERE "record"='22-28-7-4';
## Task Generate a SQL query to answer the following question: `What score has a record of 22-28-7-4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule_and_results" ( "game" real, "february" real, "opponent" text, "score" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What score has a record of 22-28-7-4?`: ```sql
SELECT "group" FROM "2000_01_season_as_a_two_year_old" WHERE "distance"='1200 m';
## Task Generate a SQL query to answer the following question: `What group has 1200 m as the distance?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2000_01_season_as_a_two_year_old" ( "result" text, "date" text, "race" text, "venue" text, "group" text, "distance" text, "weight_kg" real, "time" text, "jockey" text, "winner_2nd" text ); ### SQL Given the database schema, here is the SQL query that answers `What group has 1200 m as the distance?`: ```sql
SELECT "venue" FROM "2000_01_season_as_a_two_year_old" WHERE "group"='g1';
## Task Generate a SQL query to answer the following question: `What venue has g1 as the group?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2000_01_season_as_a_two_year_old" ( "result" text, "date" text, "race" text, "venue" text, "group" text, "distance" text, "weight_kg" real, "time" text, "jockey" text, "winner_2nd" text ); ### SQL Given the database schema, here is the SQL query that answers `What venue has g1 as the group?`: ```sql
SELECT MAX("points") FROM "torneo_apertura" WHERE "team"='tacuary' AND "losses"<4;
## Task Generate a SQL query to answer the following question: `What's the highest Points with the Team of Tacuary, and has Losses that's smaller than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the highest Points with the Team of Tacuary, and has Losses that's smaller than 4?`: ```sql
SELECT SUM("losses") FROM "torneo_apertura" WHERE "scored">15 AND "points">16 AND "played">9;
## Task Generate a SQL query to answer the following question: `What's the sum of Losses that Scored larger than 15, has Points that's larger than 16, and Played that's larger than 9?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the sum of Losses that Scored larger than 15, has Points that's larger than 16, and Played that's larger than 9?`: ```sql
SELECT MAX("played") FROM "torneo_apertura" WHERE "scored"=15 AND "draws"<1;
## Task Generate a SQL query to answer the following question: `What's the highest Played with a Scored of 15, and Draws that's less than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the highest Played with a Scored of 15, and Draws that's less than 1?`: ```sql
SELECT SUM("wins") FROM "torneo_apertura" WHERE "draws">1 AND "losses"<4 AND "conceded"=20;
## Task Generate a SQL query to answer the following question: `What's the sum of WIns with Draws that's larger than 1, Losses that's smaller than 4, and Conceded of 20?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the sum of WIns with Draws that's larger than 1, Losses that's smaller than 4, and Conceded of 20?`: ```sql
SELECT MIN("position") FROM "torneo_apertura" WHERE "conceded">16 AND "draws"=3 AND "losses">3;
## Task Generate a SQL query to answer the following question: `What's the lowest Position with a Conceded that's larger than 16, Draws of 3, and Losses that's larger than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "torneo_apertura" ( "position" real, "team" text, "played" real, "wins" real, "draws" real, "losses" real, "scored" real, "conceded" real, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the lowest Position with a Conceded that's larger than 16, Draws of 3, and Losses that's larger than 3?`: ```sql
SELECT "processors_supported" FROM "series" WHERE "pci_express"='x16: 1 slot x1: 4 slots' AND "model"='nforce 550';
## Task Generate a SQL query to answer the following question: `Which processors are supported with a PCI-express of x16: 1 slot x1: 4 slots and the nforce 550 model?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "series" ( "model" text, "processors_supported" text, "fsb_ht_frequency_m_hz" text, "memory" text, "pci_express" text, "sata" text, "pata" text, "sound" text ); ### SQL Given the database schema, here is the SQL query that answers `Which processors are supported with a PCI-express of x16: 1 slot x1: 4 slots and the nforce 550 model?`: ```sql
SELECT "processors_supported" FROM "series" WHERE "memory"='ddr2' AND "model"='nforce 550';
## Task Generate a SQL query to answer the following question: `What are the processors supported by a ddr2 memory and the nforce 550 model?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "series" ( "model" text, "processors_supported" text, "fsb_ht_frequency_m_hz" text, "memory" text, "pci_express" text, "sata" text, "pata" text, "sound" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the processors supported by a ddr2 memory and the nforce 550 model?`: ```sql
SELECT "pci_express" FROM "series" WHERE "memory"='ddr2' AND "model"='nforce 520';
## Task Generate a SQL query to answer the following question: `What is the PCI-express with a ddr2 memory and a nforce 520 model?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "series" ( "model" text, "processors_supported" text, "fsb_ht_frequency_m_hz" text, "memory" text, "pci_express" text, "sata" text, "pata" text, "sound" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the PCI-express with a ddr2 memory and a nforce 520 model?`: ```sql
SELECT "russian" FROM "liquid_measures" WHERE "us_customary"='4.16 fl. oz.';
## Task Generate a SQL query to answer the following question: `What is the Russian word for wine glass that contains 4.16 fl. oz.?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "liquid_measures" ( "unit" text, "russian" text, "translation" text, "ratio" text, "cubic_inches_exact" text, "metric_value" text, "imperial" text, "us_customary" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Russian word for wine glass that contains 4.16 fl. oz.?`: ```sql
SELECT "imperial" FROM "liquid_measures" WHERE "ratio"='1/20';
## Task Generate a SQL query to answer the following question: `What are the imperial size for the unit that has a ratio of 1/20?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "liquid_measures" ( "unit" text, "russian" text, "translation" text, "ratio" text, "cubic_inches_exact" text, "metric_value" text, "imperial" text, "us_customary" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the imperial size for the unit that has a ratio of 1/20?`: ```sql
SELECT "metric_value" FROM "liquid_measures" WHERE "ratio"='1/20';
## Task Generate a SQL query to answer the following question: `How big in metric terms is the unit that has a ratio of 1/20?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "liquid_measures" ( "unit" text, "russian" text, "translation" text, "ratio" text, "cubic_inches_exact" text, "metric_value" text, "imperial" text, "us_customary" text ); ### SQL Given the database schema, here is the SQL query that answers `How big in metric terms is the unit that has a ratio of 1/20?`: ```sql
SELECT "us_customary" FROM "liquid_measures" WHERE "unit"='butylka (vodochnaya)';
## Task Generate a SQL query to answer the following question: `How large in US customary terms is the unit called butylka (vodochnaya)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "liquid_measures" ( "unit" text, "russian" text, "translation" text, "ratio" text, "cubic_inches_exact" text, "metric_value" text, "imperial" text, "us_customary" text ); ### SQL Given the database schema, here is the SQL query that answers `How large in US customary terms is the unit called butylka (vodochnaya)?`: ```sql
SELECT "translation" FROM "liquid_measures" WHERE "unit"='chetvert';
## Task Generate a SQL query to answer the following question: `What is the translation of chetvert?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "liquid_measures" ( "unit" text, "russian" text, "translation" text, "ratio" text, "cubic_inches_exact" text, "metric_value" text, "imperial" text, "us_customary" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the translation of chetvert?`: ```sql
SELECT "russian" FROM "liquid_measures" WHERE "translation"='bucket';
## Task Generate a SQL query to answer the following question: `What Russian word translates to bucket?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "liquid_measures" ( "unit" text, "russian" text, "translation" text, "ratio" text, "cubic_inches_exact" text, "metric_value" text, "imperial" text, "us_customary" text ); ### SQL Given the database schema, here is the SQL query that answers `What Russian word translates to bucket?`: ```sql
SELECT MIN("matches") FROM "results" WHERE "points">6 AND "results"='522:443';
## Task Generate a SQL query to answer the following question: `Points larger than 6, and a Results of 522:443 had what lowest matches?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "pos" real, "matches" real, "wins" real, "loses" real, "results" text, "points" real, "diff" text ); ### SQL Given the database schema, here is the SQL query that answers `Points larger than 6, and a Results of 522:443 had what lowest matches?`: ```sql
SELECT MAX("matches") FROM "results" WHERE "loses"=2 AND "pos"<2;
## Task Generate a SQL query to answer the following question: `Loses of 2, and a Pos. smaller than 2 had how many highest matches?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "pos" real, "matches" real, "wins" real, "loses" real, "results" text, "points" real, "diff" text ); ### SQL Given the database schema, here is the SQL query that answers `Loses of 2, and a Pos. smaller than 2 had how many highest matches?`: ```sql
SELECT "outcome" FROM "doubles_6_5_titles_1_runner_up" WHERE "surface"='clay' AND "date"='2 may 2009';
## Task Generate a SQL query to answer the following question: `What was the outcome when the game was played on clay and on 2 May 2009?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_6_5_titles_1_runner_up" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the outcome when the game was played on clay and on 2 May 2009?`: ```sql
SELECT "opponent" FROM "doubles_6_5_titles_1_runner_up" WHERE "surface"='hard';
## Task Generate a SQL query to answer the following question: `What person was played against when the playing surface was hard?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_6_5_titles_1_runner_up" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What person was played against when the playing surface was hard?`: ```sql
SELECT "opponent" FROM "doubles_6_5_titles_1_runner_up" WHERE "surface"='clay' AND "score"='6–3, 2–6, [10–8]';
## Task Generate a SQL query to answer the following question: `With the score of 6–3, 2–6, [10–8] and played on clay who was the opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_6_5_titles_1_runner_up" ( "outcome" text, "date" text, "tournament" text, "surface" text, "partner" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `With the score of 6–3, 2–6, [10–8] and played on clay who was the opponent?`: ```sql
SELECT MIN("live_births") FROM "1900_1912" WHERE "natural_change_per_1_000"=9.4 AND "crude_death_rate_per_1_000">29.3;
## Task Generate a SQL query to answer the following question: `What is the lowest number of live births of Syria when the natural change was 9.4 and the crude death rate was greater than 29.3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1900_1912" ( "average_population_x_1_000" real, "live_births" real, "deaths" real, "natural_change" real, "crude_birth_rate_per_1_000" real, "crude_death_rate_per_1_000" real, "natural_change_per_1_000" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest number of live births of Syria when the natural change was 9.4 and the crude death rate was greater than 29.3?`: ```sql
SELECT SUM("natural_change") FROM "1900_1912" WHERE "deaths"='67,000' AND "average_population_x_1_000">'2,820';
## Task Generate a SQL query to answer the following question: `What is the natural change number of Syria when there were 67,000 deaths and an average population greater than 2,820?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1900_1912" ( "average_population_x_1_000" real, "live_births" real, "deaths" real, "natural_change" real, "crude_birth_rate_per_1_000" real, "crude_death_rate_per_1_000" real, "natural_change_per_1_000" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the natural change number of Syria when there were 67,000 deaths and an average population greater than 2,820?`: ```sql
SELECT COUNT("rank") FROM "2013_winners" WHERE "location"='pigeon forge, tennessee' AND "category"='best food';
## Task Generate a SQL query to answer the following question: `What is the rank of the park in pigeon forge, tennessee in the best food category?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2013_winners" ( "category" text, "rank" real, "2013_recipient" text, "location" text, "vote" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the rank of the park in pigeon forge, tennessee in the best food category?`: ```sql
SELECT "name" FROM "under_construction" WHERE "city"='shenzhen' AND "completion"<2017 AND "floors"<115;
## Task Generate a SQL query to answer the following question: `What building is in Shenzhen, have less than 115 floors, and was completed before 2017?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "under_construction" ( "name" text, "pinnacle_height" text, "floors" real, "completion" real, "city" text ); ### SQL Given the database schema, here is the SQL query that answers `What building is in Shenzhen, have less than 115 floors, and was completed before 2017?`: ```sql
SELECT MIN("year") FROM "official_versions" WHERE "length"='11:25';
## Task Generate a SQL query to answer the following question: `What is the earliest year having a length of 11:25?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "official_versions" ( "version" text, "length" text, "album" text, "remixed_by" text, "year" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the earliest year having a length of 11:25?`: ```sql
SELECT AVG("year") FROM "official_versions" WHERE "version"='wolf mix';
## Task Generate a SQL query to answer the following question: `What year had a version called Wolf Mix?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "official_versions" ( "version" text, "length" text, "album" text, "remixed_by" text, "year" real ); ### SQL Given the database schema, here is the SQL query that answers `What year had a version called Wolf Mix?`: ```sql
SELECT "nfl_team" FROM "cowboys_drafted_into_the_nfl" WHERE "draft_year"=1978;
## Task Generate a SQL query to answer the following question: `In 1978 what is the NFL team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "cowboys_drafted_into_the_nfl" ( "draft_year" real, "player" text, "position" text, "round" real, "overall" real, "nfl_team" text ); ### SQL Given the database schema, here is the SQL query that answers `In 1978 what is the NFL team?`: ```sql
SELECT "opponent" FROM "schedule" WHERE "attendance"='64,002';
## Task Generate a SQL query to answer the following question: `Who was the opponent with attendance at 64,002?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the opponent with attendance at 64,002?`: ```sql
SELECT MAX("week") FROM "schedule" WHERE "attendance"='84,856';
## Task Generate a SQL query to answer the following question: `What was the highest week with 84,856 in attendance?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the highest week with 84,856 in attendance?`: ```sql
SELECT "record" FROM "schedule" WHERE "week"<13 AND "date"='november 9, 2003';
## Task Generate a SQL query to answer the following question: `What was the record in a week less than 13 on November 9, 2003?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the record in a week less than 13 on November 9, 2003?`: ```sql
SELECT "date" FROM "schedule" WHERE "result"='w 20-17';
## Task Generate a SQL query to answer the following question: `On what date was the result w 20-17?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the result w 20-17?`: ```sql
SELECT "attendance" FROM "schedule" WHERE "record"='2-0';
## Task Generate a SQL query to answer the following question: `What was the attendance for record 2-0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the attendance for record 2-0?`: ```sql
SELECT "date" FROM "schedule" WHERE "game_site"='lincoln financial field';
## Task Generate a SQL query to answer the following question: `On what date was the game at Lincoln Financial Field?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the game at Lincoln Financial Field?`: ```sql
SELECT "player" FROM "nfl_draft" WHERE "pick"=175;
## Task Generate a SQL query to answer the following question: `Which player has a pick of 175?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "round" real, "pick" real, "player" text, "position" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which player has a pick of 175?`: ```sql
SELECT MIN("pick") FROM "nfl_draft" WHERE "player"='zack jordan' AND "round"<28;
## Task Generate a SQL query to answer the following question: `Zack Jordan has the lowest pick and a round of less than 28?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "round" real, "pick" real, "player" text, "position" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Zack Jordan has the lowest pick and a round of less than 28?`: ```sql
SELECT SUM("pick") FROM "nfl_draft" WHERE "player"='roger zatkoff';
## Task Generate a SQL query to answer the following question: `What is the sum of the pick for player roger zatkoff?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nfl_draft" ( "round" real, "pick" real, "player" text, "position" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of the pick for player roger zatkoff?`: ```sql
SELECT "metal" FROM "aluminium_series" WHERE "size"='26mm (across scallops)';
## Task Generate a SQL query to answer the following question: `Which metal has a size that is 26mm (across scallops)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aluminium_series" ( "denomination" text, "metal" text, "weight" text, "shape" text, "size" text ); ### SQL Given the database schema, here is the SQL query that answers `Which metal has a size that is 26mm (across scallops)?`: ```sql
SELECT "weight" FROM "aluminium_series" WHERE "shape"='scalloped' AND "size"='20mm (across scallops)';
## Task Generate a SQL query to answer the following question: `What is the weight with the shape of scalloped, and that is a size of 20mm (across scallops)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aluminium_series" ( "denomination" text, "metal" text, "weight" text, "shape" text, "size" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the weight with the shape of scalloped, and that is a size of 20mm (across scallops)?`: ```sql
SELECT "weight" FROM "aluminium_series" WHERE "denomination"='three paise';
## Task Generate a SQL query to answer the following question: `What is the weight with a denomination that is three paise?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aluminium_series" ( "denomination" text, "metal" text, "weight" text, "shape" text, "size" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the weight with a denomination that is three paise?`: ```sql
SELECT "weight" FROM "aluminium_series" WHERE "denomination"='ten paise';
## Task Generate a SQL query to answer the following question: `What is the weight with a denomination that is ten paise?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "aluminium_series" ( "denomination" text, "metal" text, "weight" text, "shape" text, "size" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the weight with a denomination that is ten paise?`: ```sql
SELECT MAX("drawn") FROM "world_championship_group_c_hungary" WHERE "games"<7;
## Task Generate a SQL query to answer the following question: `What is the highest number of games drawn, where the games played was less than 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championship_group_c_hungary" ( "games" real, "drawn" real, "lost" real, "points_difference" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number of games drawn, where the games played was less than 7?`: ```sql
SELECT MIN("october") FROM "game_log" WHERE "opponent"='washington capitals';
## Task Generate a SQL query to answer the following question: `Which October is the lowest one that has an Opponent of washington capitals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Which October is the lowest one that has an Opponent of washington capitals?`: ```sql
SELECT "score" FROM "game_log" WHERE "game">7 AND "points"<14;
## Task Generate a SQL query to answer the following question: `Which Score has a Game larger than 7, and Points smaller than 14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Score has a Game larger than 7, and Points smaller than 14?`: ```sql
SELECT SUM("points") FROM "game_log" WHERE "opponent"='@ calgary flames';
## Task Generate a SQL query to answer the following question: `How many Points have an Opponent of @ calgary flames?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "october" real, "opponent" text, "score" text, "record" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `How many Points have an Opponent of @ calgary flames?`: ```sql
SELECT AVG("events") FROM "leaders" WHERE "rank"=1 AND "wins">3;
## Task Generate a SQL query to answer the following question: `What is the mean number of events where the rank is 1 and there are more than 3 wins?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "leaders" ( "rank" real, "player" text, "country" text, "earnings" real, "events" real, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the mean number of events where the rank is 1 and there are more than 3 wins?`: ```sql
SELECT "supercopa_1994" FROM "argentine_clubs_in_international_competi" WHERE "team"='estudiantes';
## Task Generate a SQL query to answer the following question: `Which Supercopa 1994 has a Team of estudiantes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "argentine_clubs_in_international_competi" ( "team" text, "recopa_1994" text, "supercopa_1994" text, "conmebol_1994" text, "copa_libertadores_1995" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Supercopa 1994 has a Team of estudiantes?`: ```sql
SELECT "conmebol_1994" FROM "argentine_clubs_in_international_competi" WHERE "supercopa_1994"='n/a' AND "recopa_1994"='n/a' AND "team"='san lorenzo';
## Task Generate a SQL query to answer the following question: `Which CONMEBOL 1994 has a Supercopa 1994 of n/a, and a Recopa 1994 of n/a, and a Team of san lorenzo?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "argentine_clubs_in_international_competi" ( "team" text, "recopa_1994" text, "supercopa_1994" text, "conmebol_1994" text, "copa_libertadores_1995" text ); ### SQL Given the database schema, here is the SQL query that answers `Which CONMEBOL 1994 has a Supercopa 1994 of n/a, and a Recopa 1994 of n/a, and a Team of san lorenzo?`: ```sql
SELECT "recopa_1994" FROM "argentine_clubs_in_international_competi" WHERE "supercopa_1994"='1st round' AND "team"='argentinos juniors';
## Task Generate a SQL query to answer the following question: `Which Recopa 1994 has a Supercopa 1994 of 1st round, and a Team of argentinos juniors?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "argentine_clubs_in_international_competi" ( "team" text, "recopa_1994" text, "supercopa_1994" text, "conmebol_1994" text, "copa_libertadores_1995" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Recopa 1994 has a Supercopa 1994 of 1st round, and a Team of argentinos juniors?`: ```sql
SELECT "team" FROM "argentine_clubs_in_international_competi" WHERE "recopa_1994"='n/a' AND "conmebol_1994"='1st round';
## Task Generate a SQL query to answer the following question: `Which Team has a Recopa 1994 of n/a and a CONMEBOL 1994 of 1st round?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "argentine_clubs_in_international_competi" ( "team" text, "recopa_1994" text, "supercopa_1994" text, "conmebol_1994" text, "copa_libertadores_1995" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Team has a Recopa 1994 of n/a and a CONMEBOL 1994 of 1st round?`: ```sql
SELECT SUM("social_and_liberal_democrats_liberal_democrats") FROM "summary_of_election_results_1973_2003" WHERE "control"='labour hold' AND "liberal">0;
## Task Generate a SQL query to answer the following question: `Which Social and Liberal Democrats/ Liberal Democrats has a Control of labour hold, and a Liberal larger than 0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary_of_election_results_1973_2003" ( "election" real, "labour" real, "conservative" real, "liberal" real, "social_democratic_party" real, "social_and_liberal_democrats_liberal_democrats" real, "independent" real, "green" real, "other" text, "control" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Social and Liberal Democrats/ Liberal Democrats has a Control of labour hold, and a Liberal larger than 0?`: ```sql
SELECT "social_and_liberal_democrats_liberal_democrats" FROM "summary_of_election_results_1973_2003" WHERE "independent"=1 AND "election">1988 AND "green"<1;
## Task Generate a SQL query to answer the following question: `Which Social and Liberal Democrats/ Liberal Democrats has an Independent of 1, and an Election larger than 1988, and a Green smaller than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary_of_election_results_1973_2003" ( "election" real, "labour" real, "conservative" real, "liberal" real, "social_democratic_party" real, "social_and_liberal_democrats_liberal_democrats" real, "independent" real, "green" real, "other" text, "control" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Social and Liberal Democrats/ Liberal Democrats has an Independent of 1, and an Election larger than 1988, and a Green smaller than 1?`: ```sql
SELECT "other" FROM "summary_of_election_results_1973_2003" WHERE "green"=0 AND "independent"=1 AND "labour"<45 AND "control"='labour lose to no overall control';
## Task Generate a SQL query to answer the following question: `Which Other has a Green of 0, and an Independent of 1, and a Labour smaller than 45, and a Control of labour lose to no overall control?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary_of_election_results_1973_2003" ( "election" real, "labour" real, "conservative" real, "liberal" real, "social_democratic_party" real, "social_and_liberal_democrats_liberal_democrats" real, "independent" real, "green" real, "other" text, "control" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Other has a Green of 0, and an Independent of 1, and a Labour smaller than 45, and a Control of labour lose to no overall control?`: ```sql
SELECT AVG("social_democratic_party") FROM "summary_of_election_results_1973_2003" WHERE "green"<0;
## Task Generate a SQL query to answer the following question: `Which Social Democratic Party has a Green smaller than 0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary_of_election_results_1973_2003" ( "election" real, "labour" real, "conservative" real, "liberal" real, "social_democratic_party" real, "social_and_liberal_democrats_liberal_democrats" real, "independent" real, "green" real, "other" text, "control" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Social Democratic Party has a Green smaller than 0?`: ```sql
SELECT "losing_bonus" FROM "2009_2010_table" WHERE "try_bonus"='10';
## Task Generate a SQL query to answer the following question: `When the try bonus was 10 what was the losing bonus?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_2010_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `When the try bonus was 10 what was the losing bonus?`: ```sql
SELECT "drawn" FROM "2009_2010_table" WHERE "losing_bonus"='2';
## Task Generate a SQL query to answer the following question: `When the losing bonus was 2 what was drawn score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_2010_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `When the losing bonus was 2 what was drawn score?`: ```sql
SELECT "tries_against" FROM "2009_2010_table" WHERE "try_bonus"='5';
## Task Generate a SQL query to answer the following question: `If the try bonus was 5 what was the try against score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_2010_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `If the try bonus was 5 what was the try against score?`: ```sql
SELECT "points" FROM "2009_2010_table" WHERE "tries_against"='90';
## Task Generate a SQL query to answer the following question: `When the tries against is 90 how many points are there?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_2010_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `When the tries against is 90 how many points are there?`: ```sql
SELECT "club" FROM "2009_2010_table" WHERE "tries_against"='75';
## Task Generate a SQL query to answer the following question: `What club has tries against of 75?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009_2010_table" ( "club" text, "played" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `What club has tries against of 75?`: ```sql
SELECT SUM("overall") FROM "atlanta_falcons_draft_history" WHERE "college"='duke' AND "round">7;
## Task Generate a SQL query to answer the following question: `What is the total number of overall figures when duke was the college and the round was higher than 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of overall figures when duke was the college and the round was higher than 7?`: ```sql
SELECT MAX("pick_num") FROM "atlanta_falcons_draft_history" WHERE "round"<2;
## Task Generate a SQL query to answer the following question: `Which of the highest pick numbers had a round of less than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Which of the highest pick numbers had a round of less than 2?`: ```sql
SELECT "pick_num" FROM "atlanta_falcons_draft_history" WHERE "round"<7 AND "overall"<127 AND "name"='robert alford';
## Task Generate a SQL query to answer the following question: `Which pick number had a round of less than 7, an overall of less than 127, and where the name was Robert Alford?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Which pick number had a round of less than 7, an overall of less than 127, and where the name was Robert Alford?`: ```sql
SELECT MAX("overall") FROM "atlanta_falcons_draft_history" WHERE "name"='robert alford' AND "round">2;
## Task Generate a SQL query to answer the following question: `Which highest overall figure had Robert Alford as a name and a round of more than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "atlanta_falcons_draft_history" ( "round" real, "pick_num" real, "overall" real, "name" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Which highest overall figure had Robert Alford as a name and a round of more than 2?`: ```sql
SELECT "game_site" FROM "schedule" WHERE "opponent"='miami dolphins';
## Task Generate a SQL query to answer the following question: `What Game site has an Opponent of Miami Dolphins?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What Game site has an Opponent of Miami Dolphins?`: ```sql
SELECT MIN("attendance") FROM "schedule" WHERE "game_site"='riverfront stadium';
## Task Generate a SQL query to answer the following question: `What's the Lowest Attendance with a Game site of Riverfront Stadium?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the Lowest Attendance with a Game site of Riverfront Stadium?`: ```sql
SELECT MIN("attendance") FROM "schedule" WHERE "week"=2;
## Task Generate a SQL query to answer the following question: `What's the lowest Attendance for a Week of 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the lowest Attendance for a Week of 2?`: ```sql
SELECT "bronze" FROM "medal_table" WHERE "nation"='south korea';
## Task Generate a SQL query to answer the following question: `How many bronze medals does South Korea have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" text, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many bronze medals does South Korea have?`: ```sql
SELECT MIN("total") FROM "medal_table" WHERE "silver">0 AND "nation"='georgia' AND "bronze"<1;
## Task Generate a SQL query to answer the following question: `What is the smallest number of total medals for Georgia with 0 silver and 1 bronze?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "rank" text, "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 smallest number of total medals for Georgia with 0 silver and 1 bronze?`: ```sql
SELECT MIN("year") FROM "achievements" WHERE "event"='foil team' AND "venue"='melbourne';
## Task Generate a SQL query to answer the following question: `What is the lowest year that had foil team as the event at Melbourne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest year that had foil team as the event at Melbourne?`: ```sql
SELECT COUNT("year") FROM "achievements" WHERE "venue"='los angeles' AND "event"='foil team';
## Task Generate a SQL query to answer the following question: `What is the number of years that the event was foil team and took place in Los Angeles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of years that the event was foil team and took place in Los Angeles?`: ```sql
SELECT "position" FROM "achievements" WHERE "venue"='lyon';
## Task Generate a SQL query to answer the following question: `What was the position at the venue of lyon?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the position at the venue of lyon?`: ```sql
SELECT "position" FROM "achievements" WHERE "event"='foil individual' AND "competition"='world championships' AND "year"=1985;
## Task Generate a SQL query to answer the following question: `What was the position for mauro at the world championships in 1985 during the foil individual event?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "competition" text, "venue" text, "position" text, "event" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the position for mauro at the world championships in 1985 during the foil individual event?`: ```sql
SELECT "playoffs" FROM "season_by_season_record" WHERE "head_coach"='brent sutter' AND "finish"='4th central' AND "points"='82';
## Task Generate a SQL query to answer the following question: `What was the playoff status when the head coach was Brent Sutter, the finish was 4th central, and the points were 82?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_by_season_record" ( "season" text, "points" text, "finish" text, "playoffs" text, "head_coach" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the playoff status when the head coach was Brent Sutter, the finish was 4th central, and the points were 82?`: ```sql
SELECT "tournament" FROM "grand_slam_tournaments" WHERE "2001"='2–4';
## Task Generate a SQL query to answer the following question: `2001 of 2–4 was in which tournament?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_slam_tournaments" ( "tournament" text, "1998" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" 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 `2001 of 2–4 was in which tournament?`: ```sql
SELECT "2006" FROM "grand_slam_tournaments" WHERE "2013"='4–4';
## Task Generate a SQL query to answer the following question: `2013 of 4–4 is involved in what 2006?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_slam_tournaments" ( "tournament" text, "1998" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" 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 `2013 of 4–4 is involved in what 2006?`: ```sql
SELECT "2001" FROM "grand_slam_tournaments" WHERE "2007"='1r';
## Task Generate a SQL query to answer the following question: `2007 of 1r is involved in what 2001?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_slam_tournaments" ( "tournament" text, "1998" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" 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 `2007 of 1r is involved in what 2001?`: ```sql
SELECT "2002" FROM "grand_slam_tournaments" WHERE "2007"='8–4';
## Task Generate a SQL query to answer the following question: `2007 of 8–4 is involved in what 2002?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_slam_tournaments" ( "tournament" text, "1998" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" 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 `2007 of 8–4 is involved in what 2002?`: ```sql
SELECT "2004" FROM "grand_slam_tournaments" WHERE "2005"='3r' AND "2000"='lq' AND "2002"='3r';
## Task Generate a SQL query to answer the following question: `2005 of 3r, and a 2000 of lq, and a 2002 of 3r is in what 2004?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_slam_tournaments" ( "tournament" text, "1998" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" 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 `2005 of 3r, and a 2000 of lq, and a 2002 of 3r is in what 2004?`: ```sql
SELECT "2000" FROM "grand_slam_tournaments" WHERE "2006"='10–4';
## Task Generate a SQL query to answer the following question: `2006 of 10–4 is in which 2000?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grand_slam_tournaments" ( "tournament" text, "1998" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" 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 `2006 of 10–4 is in which 2000?`: ```sql
SELECT MIN("drawn") FROM "world_championship_group_c_poland" WHERE "points"<4 AND "lost">4;
## Task Generate a SQL query to answer the following question: `What is the smallest number of drawn games when there are fewer than 4 points and more than 4 lost games?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championship_group_c_poland" ( "games" real, "drawn" real, "lost" real, "points_difference" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest number of drawn games when there are fewer than 4 points and more than 4 lost games?`: ```sql
SELECT SUM("points") FROM "world_championship_group_c_poland" WHERE "games"<4;
## Task Generate a SQL query to answer the following question: `What is the sum of the points when there are fewer than 4 games?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championship_group_c_poland" ( "games" real, "drawn" real, "lost" real, "points_difference" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of the points when there are fewer than 4 games?`: ```sql
SELECT "lead" FROM "teams" WHERE "third"='aanders brorson';
## Task Generate a SQL query to answer the following question: `Who holds the lead role when Aanders Brorson is third?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams" ( "country" text, "skip" text, "third" text, "second" text, "lead" text ); ### SQL Given the database schema, here is the SQL query that answers `Who holds the lead role when Aanders Brorson is third?`: ```sql
SELECT "skip" FROM "teams" WHERE "lead"='dominik greindl';
## Task Generate a SQL query to answer the following question: `Who has the role of skip when the lead is Dominik Greindl?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams" ( "country" text, "skip" text, "third" text, "second" text, "lead" text ); ### SQL Given the database schema, here is the SQL query that answers `Who has the role of skip when the lead is Dominik Greindl?`: ```sql