output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT COUNT("total_goals") FROM "appearances_and_goals" WHERE "fa_cup_apps">0 AND "position"='mf' AND "league_goals"=4;
## Task Generate a SQL query to answer the following question: `how many times is the fa cup apps more than 0, the position mf and the league goals 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "appearances_and_goals" ( "name" text, "position" text, "league_apps" text, "league_goals" real, "fa_cup_apps" real, "fa_cup_goals" real, "league_cup_apps" text, "league_cup_goals" real, "total_apps" text, "total_goals" real ); ### SQL Given the database schema, here is the SQL query that answers `how many times is the fa cup apps more than 0, the position mf and the league goals 4?`: ```sql
SELECT "district" FROM "assembly_segments" WHERE "number_of_electorates_2009">'1,246,756' AND "constituency_number"='191';
## Task Generate a SQL query to answer the following question: `What is the district with more than 1,246,756 electorates and a constituency number of 191?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "assembly_segments" ( "constituency_number" text, "name" text, "reserved_for_sc_st_none" text, "district" text, "number_of_electorates_2009" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the district with more than 1,246,756 electorates and a constituency number of 191?`: ```sql
SELECT COUNT("number_of_electorates_2009") FROM "assembly_segments" WHERE "constituency_number"='193';
## Task Generate a SQL query to answer the following question: `What is the total number of electorates in 2009 with a constituency of 193?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "assembly_segments" ( "constituency_number" text, "name" text, "reserved_for_sc_st_none" text, "district" text, "number_of_electorates_2009" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of electorates in 2009 with a constituency of 193?`: ```sql
SELECT "reserved_for_sc_st_none" FROM "assembly_segments" WHERE "constituency_number"='192';
## Task Generate a SQL query to answer the following question: `What is the reserved for the constituency of 192?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "assembly_segments" ( "constituency_number" text, "name" text, "reserved_for_sc_st_none" text, "district" text, "number_of_electorates_2009" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the reserved for the constituency of 192?`: ```sql
SELECT "artist" FROM "results_of_heat_9" WHERE "percentage"='11.32%';
## Task Generate a SQL query to answer the following question: `Which Artist has a Percentage of 11.32%?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results_of_heat_9" ( "draw" real, "artist" text, "song" text, "percentage" text, "place" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Artist has a Percentage of 11.32%?`: ```sql
SELECT MIN("week") FROM "schedule" WHERE "date"='november 28, 1982';
## Task Generate a SQL query to answer the following question: `What is the week for November 28, 1982?` ### 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the week for November 28, 1982?`: ```sql
SELECT "attendance" FROM "schedule" WHERE "result"='l 41-37';
## Task Generate a SQL query to answer the following question: `What is the attendance number when the result is l 41-37?` ### 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the attendance number when the result is l 41-37?`: ```sql
SELECT AVG("attendance") FROM "schedule" WHERE "week"<4 AND "result"='w 31-20';
## Task Generate a SQL query to answer the following question: `What is the attendance in a week earlier than 4, and result is w 31-20?` ### 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the attendance in a week earlier than 4, and result is w 31-20?`: ```sql
SELECT "opponent" FROM "schedule" WHERE "week">1 AND "result"='l 21-20';
## Task Generate a SQL query to answer the following question: `What is the opponent in a week larger than 1, with a result of l 21-20?` ### 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the opponent in a week larger than 1, with a result of l 21-20?`: ```sql
SELECT "sport" FROM "sports" WHERE "founded"=2010;
## Task Generate a SQL query to answer the following question: `What sport was played by the team founded in 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "sports" ( "club" text, "sport" text, "founded" real, "league" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `What sport was played by the team founded in 2010?`: ```sql
SELECT "club" FROM "sports" WHERE "founded"<2011 AND "venue"='champion window field';
## Task Generate a SQL query to answer the following question: `What club team was founded before 2011 and plays at the champion window field?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "sports" ( "club" text, "sport" text, "founded" real, "league" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `What club team was founded before 2011 and plays at the champion window field?`: ```sql
SELECT COUNT("founded") FROM "sports" WHERE "venue"='champion window field';
## Task Generate a SQL query to answer the following question: `How many different dates are there for founded teams for the venue of champion window field?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "sports" ( "club" text, "sport" text, "founded" real, "league" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `How many different dates are there for founded teams for the venue of champion window field?`: ```sql
SELECT "club" FROM "sports" WHERE "venue"='champion window field';
## Task Generate a SQL query to answer the following question: `What club team plays at the champion window field?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "sports" ( "club" text, "sport" text, "founded" real, "league" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `What club team plays at the champion window field?`: ```sql
SELECT SUM("gross_domestic_product") FROM "historical_trend" WHERE "us_dollar_exchange"='12.19 algerian dinars' AND "inflation_index_2000_100">22;
## Task Generate a SQL query to answer the following question: `How much Gross Domestic Product has a US Dollar Exchange of 12.19 algerian dinars, and an Inflation Index (2000=100) larger than 22?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "historical_trend" ( "year" real, "gross_domestic_product" real, "us_dollar_exchange" text, "inflation_index_2000_100" real, "per_capita_income_as_pct_of_usa" real ); ### SQL Given the database schema, here is the SQL query that answers `How much Gross Domestic Product has a US Dollar Exchange of 12.19 algerian dinars, and an Inflation Index (2000=100) larger than 22?`: ```sql
SELECT AVG("gross_domestic_product") FROM "historical_trend" WHERE "inflation_index_2000_100"<9.3;
## Task Generate a SQL query to answer the following question: `Which Gross Domestic Product has an Inflation Index (2000=100) smaller than 9.3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "historical_trend" ( "year" real, "gross_domestic_product" real, "us_dollar_exchange" text, "inflation_index_2000_100" real, "per_capita_income_as_pct_of_usa" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Gross Domestic Product has an Inflation Index (2000=100) smaller than 9.3?`: ```sql
SELECT MAX("inflation_index_2000_100") FROM "historical_trend" WHERE "per_capita_income_as_pct_of_usa"=10.65 AND "year"<1990;
## Task Generate a SQL query to answer the following question: `Which Inflation Index (2000=100) has a Per Capita Income (as % of USA) of 10.65, and a Year smaller than 1990?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "historical_trend" ( "year" real, "gross_domestic_product" real, "us_dollar_exchange" text, "inflation_index_2000_100" real, "per_capita_income_as_pct_of_usa" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Inflation Index (2000=100) has a Per Capita Income (as % of USA) of 10.65, and a Year smaller than 1990?`: ```sql
SELECT "release_date" FROM "1935" WHERE "production_num"='6998';
## Task Generate a SQL query to answer the following question: `What release date has 6998 as the production num.?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1935" ( "title" text, "series" text, "director" text, "production_num" text, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What release date has 6998 as the production num.?`: ```sql
SELECT "director" FROM "1935" WHERE "series"='lt' AND "production_num"='6982';
## Task Generate a SQL query to answer the following question: `What director has lt as the series, with 6982 as the production num.?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1935" ( "title" text, "series" text, "director" text, "production_num" text, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What director has lt as the series, with 6982 as the production num.?`: ```sql
SELECT "series" FROM "1935" WHERE "release_date"='1935-07-13';
## Task Generate a SQL query to answer the following question: `What series has 1935-07-13 as the release date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1935" ( "title" text, "series" text, "director" text, "production_num" text, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What series has 1935-07-13 as the release date?`: ```sql
SELECT "title" FROM "1935" WHERE "series"='lt' AND "director"='ben hardaway' AND "production_num"='6612';
## Task Generate a SQL query to answer the following question: `What title has lt as the series, ben hardaway as the director, with 6612 as the production num.?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1935" ( "title" text, "series" text, "director" text, "production_num" text, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What title has lt as the series, ben hardaway as the director, with 6612 as the production num.?`: ```sql
SELECT "title" FROM "albums_as" WHERE "label"='pacific jazz' AND "year"=1963 AND "label_nr"='st-81';
## Task Generate a SQL query to answer the following question: `What is the song title from 1963 on the Pacific Jazz label, and a Label-Nr of st-81?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "albums_as" ( "year" real, "title" text, "type" text, "label" text, "label_nr" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the song title from 1963 on the Pacific Jazz label, and a Label-Nr of st-81?`: ```sql
SELECT MIN("year") FROM "albums_as" WHERE "label_nr"='st-43';
## Task Generate a SQL query to answer the following question: `What is the earliest year with a label-Nr of st-43?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "albums_as" ( "year" real, "title" text, "type" text, "label" text, "label_nr" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the earliest year with a label-Nr of st-43?`: ```sql
SELECT "title" FROM "albums_as" WHERE "label"='pacific jazz' AND "label_nr"='st-20124';
## Task Generate a SQL query to answer the following question: `What is the song title on the Pacific Jazz label, and a Label-Nr of st-20124?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "albums_as" ( "year" real, "title" text, "type" text, "label" text, "label_nr" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the song title on the Pacific Jazz label, and a Label-Nr of st-20124?`: ```sql
SELECT "type" FROM "albums_as" WHERE "year"<1968 AND "title"='stretchin'' out';
## Task Generate a SQL query to answer the following question: `What is the type earlier than 1968, and a Title of stretchin' out?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "albums_as" ( "year" real, "title" text, "type" text, "label" text, "label_nr" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the type earlier than 1968, and a Title of stretchin' out?`: ```sql
SELECT "team" FROM "supplemental_first_round_selections" WHERE "pick"=31;
## Task Generate a SQL query to answer the following question: `what is the team that is pick 31?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "supplemental_first_round_selections" ( "pick" real, "player" text, "team" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the team that is pick 31?`: ```sql
SELECT "position" FROM "supplemental_first_round_selections" WHERE "pick">32 AND "team"='atlanta braves';
## Task Generate a SQL query to answer the following question: `what is the position when the pick is higher than 32 and the team is atlanta braves?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "supplemental_first_round_selections" ( "pick" real, "player" text, "team" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the position when the pick is higher than 32 and the team is atlanta braves?`: ```sql
SELECT "position" FROM "supplemental_first_round_selections" WHERE "pick">33 AND "school"='tottenville hs (staten island, ny)';
## Task Generate a SQL query to answer the following question: `what is the position when the pick is higher than 33 and the school is tottenville hs (staten island, ny)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "supplemental_first_round_selections" ( "pick" real, "player" text, "team" text, "position" text, "school" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the position when the pick is higher than 33 and the school is tottenville hs (staten island, ny)?`: ```sql
SELECT MAX("attendance") FROM "schedule" WHERE "week"=12;
## Task Generate a SQL query to answer the following question: `What is the Attendance of the game in Week 12?` ### 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the Attendance of the game in Week 12?`: ```sql
SELECT "opponent" FROM "schedule" WHERE "date"='december 3, 1979';
## Task Generate a SQL query to answer the following question: `What is the Opponent on December 3, 1979?` ### 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the Opponent on December 3, 1979?`: ```sql
SELECT "result" FROM "schedule" WHERE "opponent"='philadelphia eagles';
## Task Generate a SQL query to answer the following question: `What is the Result of the game against Philadelphia Eagles?` ### 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the Result of the game against Philadelphia Eagles?`: ```sql
SELECT "score" FROM "playoffs" WHERE "date"='march 27';
## Task Generate a SQL query to answer the following question: `What is the score March 27?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "series" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the score March 27?`: ```sql
SELECT "score" FROM "playoffs" WHERE "game">4 AND "series"='3-2';
## Task Generate a SQL query to answer the following question: `What is the score for the game larger than 4 in series 3-2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "series" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the score for the game larger than 4 in series 3-2?`: ```sql
SELECT COUNT("game") FROM "playoffs" WHERE "series"='4-2';
## Task Generate a SQL query to answer the following question: `What is the game number for series 4-2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "series" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the game number for series 4-2?`: ```sql
SELECT "date" FROM "playoffs" WHERE "game"<4 AND "score"='116-114';
## Task Generate a SQL query to answer the following question: `What date has a game smaller than 4, and a score of 116-114?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "series" text ); ### SQL Given the database schema, here is the SQL query that answers `What date has a game smaller than 4, and a score of 116-114?`: ```sql
SELECT COUNT("game") FROM "playoffs" WHERE "date"='april 7';
## Task Generate a SQL query to answer the following question: `What is the game number on April 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "series" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the game number on April 7?`: ```sql
SELECT "opposing_team" FROM "matches" WHERE "against"<19 AND "date"='20/05/1979';
## Task Generate a SQL query to answer the following question: `Which Opposing Team has an Against smaller than 19, and a Date of 20/05/1979?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "matches" ( "opposing_team" text, "against" real, "date" text, "venue" text, "status" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Opposing Team has an Against smaller than 19, and a Date of 20/05/1979?`: ```sql
SELECT COUNT("production_number") FROM "1958" WHERE "title"='pre-hysterical hare';
## Task Generate a SQL query to answer the following question: `What was the production number of the episode titel of pre-hysterical hare?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1958" ( "title" text, "series" text, "director" text, "production_number" real, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the production number of the episode titel of pre-hysterical hare?`: ```sql
SELECT "director" FROM "1958" WHERE "production_number"=1490;
## Task Generate a SQL query to answer the following question: `What director had a production number of 1490?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1958" ( "title" text, "series" text, "director" text, "production_number" real, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `What director had a production number of 1490?`: ```sql
SELECT "title" FROM "1958" WHERE "director"='chuck jones' AND "release_date"='1958-04-12';
## Task Generate a SQL query to answer the following question: `Which title was directed by chuck jones and released on 1958-04-12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1958" ( "title" text, "series" text, "director" text, "production_number" real, "release_date" text ); ### SQL Given the database schema, here is the SQL query that answers `Which title was directed by chuck jones and released on 1958-04-12?`: ```sql
SELECT "name" FROM "semifinal_1" WHERE "time">53.06 AND "lane"<8 AND "rank">2 AND "nationality"='japan';
## Task Generate a SQL query to answer the following question: `Which Name has a Time larger than 53.06, and a Lane smaller than 8, and a Rank larger than 2, and a Nationality of japan?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semifinal_1" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Name has a Time larger than 53.06, and a Lane smaller than 8, and a Rank larger than 2, and a Nationality of japan?`: ```sql
SELECT SUM("lane") FROM "semifinal_1" WHERE "time"=53.61 AND "rank">3;
## Task Generate a SQL query to answer the following question: `How many lanes have a Time of 53.61, and a Rank larger than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semifinal_1" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" real ); ### SQL Given the database schema, here is the SQL query that answers `How many lanes have a Time of 53.61, and a Rank larger than 3?`: ```sql
SELECT "3rd_day" FROM "may_bumps" WHERE "2nd_day"='rowed-over' AND "year"=2010;
## Task Generate a SQL query to answer the following question: `What is the 3rd day result when the 2nd day was rowed-over in 2010?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "may_bumps" ( "year" real, "finish_position" text, "1st_day" text, "2nd_day" text, "3rd_day" text, "4th_day" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the 3rd day result when the 2nd day was rowed-over in 2010?`: ```sql
SELECT "3rd_day" FROM "may_bumps" WHERE "4th_day"='bumped fitzwilliam';
## Task Generate a SQL query to answer the following question: `What is the 3rd day result when the 4th day was bumped Fitzwilliam?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "may_bumps" ( "year" real, "finish_position" text, "1st_day" text, "2nd_day" text, "3rd_day" text, "4th_day" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the 3rd day result when the 4th day was bumped Fitzwilliam?`: ```sql
SELECT "finish_position" FROM "may_bumps" WHERE "year"<2009;
## Task Generate a SQL query to answer the following question: `What is the finish position in the year prior to 2009?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "may_bumps" ( "year" real, "finish_position" text, "1st_day" text, "2nd_day" text, "3rd_day" text, "4th_day" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the finish position in the year prior to 2009?`: ```sql
SELECT "1st_day" FROM "may_bumps" WHERE "year"<2011 AND "4th_day"='bumped girton';
## Task Generate a SQL query to answer the following question: `What is the result for the first day in a year prior to 2011 when the 4th day's result is bumped Girton?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "may_bumps" ( "year" real, "finish_position" text, "1st_day" text, "2nd_day" text, "3rd_day" text, "4th_day" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the result for the first day in a year prior to 2011 when the 4th day's result is bumped Girton?`: ```sql
SELECT "num_county" FROM "membership" WHERE "location"='ossian';
## Task Generate a SQL query to answer the following question: `Which #/ County has a Location of ossian?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "membership" ( "school" text, "location" text, "mascot" text, "enrollment" real, "ihsaa_class" text, "num_county" text ); ### SQL Given the database schema, here is the SQL query that answers `Which #/ County has a Location of ossian?`: ```sql
SELECT COUNT("enrollment") FROM "membership" WHERE "ihsaa_class"='aaaaa' AND "mascot"='spartans';
## Task Generate a SQL query to answer the following question: `How much Enrollment has an IHSAA Class of aaaaa, and a Mascot of spartans?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "membership" ( "school" text, "location" text, "mascot" text, "enrollment" real, "ihsaa_class" text, "num_county" text ); ### SQL Given the database schema, here is the SQL query that answers `How much Enrollment has an IHSAA Class of aaaaa, and a Mascot of spartans?`: ```sql
SELECT SUM("enrollment") FROM "membership" WHERE "school"='fort wayne homestead';
## Task Generate a SQL query to answer the following question: `How much Enrollment has a School of fort wayne homestead?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "membership" ( "school" text, "location" text, "mascot" text, "enrollment" real, "ihsaa_class" text, "num_county" text ); ### SQL Given the database schema, here is the SQL query that answers `How much Enrollment has a School of fort wayne homestead?`: ```sql
SELECT "ihsaa_class" FROM "membership" WHERE "location"='columbia city';
## Task Generate a SQL query to answer the following question: `Which IHSAA Class has a Location of columbia city?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "membership" ( "school" text, "location" text, "mascot" text, "enrollment" real, "ihsaa_class" text, "num_county" text ); ### SQL Given the database schema, here is the SQL query that answers `Which IHSAA Class has a Location of columbia city?`: ```sql
SELECT "opponent" FROM "game_log" WHERE "score"='111-106';
## Task Generate a SQL query to answer the following question: `Who was the opponent at the game with a score of 111-106?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the opponent at the game with a score of 111-106?`: ```sql
SELECT "location_attendance" FROM "game_log" WHERE "score"='113-106';
## Task Generate a SQL query to answer the following question: `What was the location of the game with a score of 113-106?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "game" real, "date" text, "opponent" text, "score" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the location of the game with a score of 113-106?`: ```sql
SELECT MAX("pick") FROM "third_round" WHERE "team"='denver broncos';
## Task Generate a SQL query to answer the following question: `What is the highest pick number for a pick drafted by the denver broncos?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "pick" real, "team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest pick number for a pick drafted by the denver broncos?`: ```sql
SELECT "opponent" FROM "schedule" WHERE "result"='l 27-7';
## Task Generate a SQL query to answer the following question: `What opponent has l 27-7 as the result?` ### 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What opponent has l 27-7 as the result?`: ```sql
SELECT COUNT("week") FROM "schedule" WHERE "attendance"='54,187';
## Task Generate a SQL query to answer the following question: `How many weeks has 54,187 as the 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `How many weeks has 54,187 as the attendance?`: ```sql
SELECT SUM("week") FROM "schedule" WHERE "attendance">'55,121' AND "result"='l 27-7';
## Task Generate a SQL query to answer the following question: `How many weeks have an attendance greater than 55,121, and l 27-7 as the result?` ### 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `How many weeks have an attendance greater than 55,121, and l 27-7 as the result?`: ```sql
SELECT "tournament" FROM "singles_15_10_5" WHERE "opponent"='alberta brianti' AND "score"='6-4 2-6 6-2';
## Task Generate a SQL query to answer the following question: `What tournament had Alberta Brianti as an opponent with a score of 6-4 2-6 6-2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_15_10_5" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What tournament had Alberta Brianti as an opponent with a score of 6-4 2-6 6-2?`: ```sql
SELECT "date" FROM "singles_15_10_5" WHERE "score"='3-6 4-6';
## Task Generate a SQL query to answer the following question: `When was the score 3-6 4-6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_15_10_5" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the score 3-6 4-6?`: ```sql
SELECT AVG("rank") FROM "semifinal_2" WHERE "time"='2:25.65' AND "lane">3;
## Task Generate a SQL query to answer the following question: `What is the Rank of the Swimmer with a Time of 2:25.65 in a Lane larger than 3?` ### 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 is the Rank of the Swimmer with a Time of 2:25.65 in a Lane larger than 3?`: ```sql
SELECT COUNT("rank") FROM "semifinal_2" WHERE "name"='qi hui';
## Task Generate a SQL query to answer the following question: `What is the Rank of Qi Hui?` ### 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 is the Rank of Qi Hui?`: ```sql
SELECT COUNT("forfeits") FROM "2012_ladder" WHERE "wins"<8 AND "losses">16;
## Task Generate a SQL query to answer the following question: `How many Forfeits have Wins smaller than 8, and Losses larger than 16?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_ladder" ( "millewa" text, "wins" real, "forfeits" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `How many Forfeits have Wins smaller than 8, and Losses larger than 16?`: ```sql
SELECT COUNT("losses") FROM "2012_ladder" WHERE "millewa"='nangiloc';
## Task Generate a SQL query to answer the following question: `How many Losses have a Millewa of nangiloc?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_ladder" ( "millewa" text, "wins" real, "forfeits" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `How many Losses have a Millewa of nangiloc?`: ```sql
SELECT MAX("losses") FROM "2012_ladder" WHERE "draws">0;
## Task Generate a SQL query to answer the following question: `How many Losses have Draws larger than 0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_ladder" ( "millewa" text, "wins" real, "forfeits" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `How many Losses have Draws larger than 0?`: ```sql
SELECT "spike" FROM "volleyball_at_the_2008_summer_olympics_w" WHERE "2008_club"='d.c.';
## Task Generate a SQL query to answer the following question: `What is the spike for the club of d.c. in 2008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "volleyball_at_the_2008_summer_olympics_w" ( "name" text, "height" text, "weight" text, "spike" text, "2008_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the spike for the club of d.c. in 2008?`: ```sql
SELECT AVG("rank") FROM "semifinal_1" WHERE "name"='elise matthysen' AND "lane"<8;
## Task Generate a SQL query to answer the following question: `What is the average rank of Elise Matthysen in lanes under 8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semifinal_1" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average rank of Elise Matthysen in lanes under 8?`: ```sql
SELECT "time" FROM "semifinal_1" WHERE "name"='yuliya yefimova';
## Task Generate a SQL query to answer the following question: `What is the time of Yuliya Yefimova?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semifinal_1" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the time of Yuliya Yefimova?`: ```sql
SELECT "name" FROM "semifinal_1" WHERE "lane"<3 AND "nationality"='great britain';
## Task Generate a SQL query to answer the following question: `Who was from Great Britain in lanes under number 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "semifinal_1" ( "rank" real, "lane" real, "name" text, "nationality" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was from Great Britain in lanes under number 3?`: ```sql
SELECT "wheel_arrangement" FROM "4_6_2" WHERE "year_made"='1910';
## Task Generate a SQL query to answer the following question: `What wheel arrangement was made in 1910?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "4_6_2" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text, "year_s_retired" text ); ### SQL Given the database schema, here is the SQL query that answers `What wheel arrangement was made in 1910?`: ```sql
SELECT "year_s_retired" FROM "4_6_2" WHERE "serial_numbers"='27317–27336';
## Task Generate a SQL query to answer the following question: `What year were the retired serial numbers 27317–27336?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "4_6_2" ( "class" text, "wheel_arrangement" text, "fleet_number_s" text, "manufacturer" text, "serial_numbers" text, "year_made" text, "quantity_made" text, "quantity_preserved" text, "year_s_retired" text ); ### SQL Given the database schema, here is the SQL query that answers `What year were the retired serial numbers 27317–27336?`: ```sql
SELECT "surface" FROM "doubles_titles" WHERE "score"='7-5, 5-7, 6-3';
## Task Generate a SQL query to answer the following question: `Which Surface has a score of 7-5, 5-7, 6-3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_titles" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Surface has a score of 7-5, 5-7, 6-3?`: ```sql
SELECT "tournament" FROM "doubles_titles" WHERE "score"='6-4, 6-4';
## Task Generate a SQL query to answer the following question: `Which tournament has a Score of 6-4, 6-4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_titles" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Which tournament has a Score of 6-4, 6-4?`: ```sql
SELECT "surface" FROM "doubles_titles" WHERE "date"='10 november 2006';
## Task Generate a SQL query to answer the following question: `What was the Surface on during 10 November 2006?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_titles" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the Surface on during 10 November 2006?`: ```sql
SELECT "score" FROM "doubles_titles" WHERE "date"='25 may 2007';
## Task Generate a SQL query to answer the following question: `What was the Score on 25 May 2007?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_titles" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the Score on 25 May 2007?`: ```sql
SELECT "score" FROM "doubles_titles" WHERE "date"='10 november 2006';
## Task Generate a SQL query to answer the following question: `What was the score on 10 November 2006?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_titles" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score on 10 November 2006?`: ```sql
SELECT "partnering" FROM "doubles_titles" WHERE "score"='6-3, 4-6, 6-4';
## Task Generate a SQL query to answer the following question: `Which Partnering has a Score of 6-3, 4-6, 6-4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "doubles_titles" ( "date" text, "tournament" text, "surface" text, "partnering" text, "opponents_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Partnering has a Score of 6-3, 4-6, 6-4?`: ```sql
SELECT MAX("rank") FROM "heat_2" WHERE "notes"='qs' AND "country"='china';
## Task Generate a SQL query to answer the following question: `What is the rank for the man from China with notes of QS?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "heat_2" ( "rank" real, "athletes" text, "country" text, "time" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the rank for the man from China with notes of QS?`: ```sql
SELECT MIN("rank") FROM "heat_2" WHERE "country"='bulgaria';
## Task Generate a SQL query to answer the following question: `What is the rank for the competitor from Bulgaria?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "heat_2" ( "rank" real, "athletes" text, "country" text, "time" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the rank for the competitor from Bulgaria?`: ```sql
SELECT "athletes" FROM "heat_2" WHERE "rank"<5 AND "country"='china';
## Task Generate a SQL query to answer the following question: `Which athlete is ranked below 5 and is from China?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "heat_2" ( "rank" real, "athletes" text, "country" text, "time" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `Which athlete is ranked below 5 and is from China?`: ```sql
SELECT "game" FROM "kotaku" WHERE "genre"='platformer';
## Task Generate a SQL query to answer the following question: `Which game was a Platformer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "kotaku" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Which game was a Platformer?`: ```sql
SELECT "developer_s" FROM "kotaku" WHERE "game"='xcom: enemy unknown';
## Task Generate a SQL query to answer the following question: `Who was the developer of XCom: Enemy Unknown?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "kotaku" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the developer of XCom: Enemy Unknown?`: ```sql
SELECT "platform_s" FROM "kotaku" WHERE "game"='red dead redemption';
## Task Generate a SQL query to answer the following question: `Which platform was Red Dead Redemption for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "kotaku" ( "year" real, "game" text, "genre" text, "platform_s" text, "developer_s" text ); ### SQL Given the database schema, here is the SQL query that answers `Which platform was Red Dead Redemption for?`: ```sql
SELECT MAX("total") FROM "top_scorers" WHERE "egyptian_premier_league"<2 AND "egypt_cup"<0;
## Task Generate a SQL query to answer the following question: `What is the highest total for players with under 2 Egyptian Premier League goals and 0 Egypt Cup goals?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "name" text, "egyptian_premier_league" real, "egypt_cup" real, "caf_champions_league" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest total for players with under 2 Egyptian Premier League goals and 0 Egypt Cup goals?`: ```sql
SELECT AVG("egypt_cup") FROM "top_scorers" WHERE "caf_champions_league"=0 AND "egyptian_premier_league"=6 AND "total"<6;
## Task Generate a SQL query to answer the following question: `What is the aveage Egypt Cup value for players with 0 CAF Champions League goals, 6 Egyptian Premier League goals, and totals under 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_scorers" ( "name" text, "egyptian_premier_league" real, "egypt_cup" real, "caf_champions_league" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the aveage Egypt Cup value for players with 0 CAF Champions League goals, 6 Egyptian Premier League goals, and totals under 6?`: ```sql
SELECT COUNT("silver") FROM "medal_count_by_country" WHERE "gold">0 AND "rank"<2;
## Task Generate a SQL query to answer the following question: `how many times is gold more than 0 and the rank less than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_count_by_country" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `how many times is gold more than 0 and the rank less than 2?`: ```sql
SELECT MAX("total") FROM "medal_count_by_country" WHERE "nation"='france' AND "silver">1;
## Task Generate a SQL query to answer the following question: `what is the highest total when the nation is france and silver is more than 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_count_by_country" ( "rank" real, "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 total when the nation is france and silver is more than 1?`: ```sql
SELECT MIN("silver") FROM "medal_count_by_country" WHERE "nation"='germany' AND "gold">4;
## Task Generate a SQL query to answer the following question: `what is the least silver for germany when gold is more than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_count_by_country" ( "rank" real, "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 least silver for germany when gold is more than 4?`: ```sql
SELECT COUNT("silver") FROM "medal_count_by_country" WHERE "total"<15 AND "rank"<5 AND "bronze"=4 AND "gold"<3;
## Task Generate a SQL query to answer the following question: `How many times is the total less than 15, rank less than 5, bronze is 4 and gold smaller than 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_count_by_country" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many times is the total less than 15, rank less than 5, bronze is 4 and gold smaller than 3?`: ```sql
SELECT "venue" FROM "international_goals" WHERE "date"='september 5, 1998';
## Task Generate a SQL query to answer the following question: `What venue did the game on september 5, 1998 take place at?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What venue did the game on september 5, 1998 take place at?`: ```sql
SELECT "venue" FROM "international_goals" WHERE "competition"='2000 tiger cup' AND "date"='november 10, 2000';
## Task Generate a SQL query to answer the following question: `What venue did the 2000 tiger cup take place at on November 10, 2000?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What venue did the 2000 tiger cup take place at on November 10, 2000?`: ```sql
SELECT "date" FROM "international_goals" WHERE "score"='5-4';
## Task Generate a SQL query to answer the following question: `What date had a game with a score of 5-4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What date had a game with a score of 5-4?`: ```sql
SELECT SUM("s_barangay") FROM "administrative_districts" WHERE "area_has">865.13;
## Task Generate a SQL query to answer the following question: `What is the total of Barangay with an area larger than 865.13?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "administrative_districts" ( "district" text, "s_barangay" real, "population_2010_census" real, "area_has" real, "pop_density_per_km2" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total of Barangay with an area larger than 865.13?`: ```sql
SELECT MIN("pop_density_per_km2") FROM "administrative_districts" WHERE "district"='santa cruz' AND "s_barangay">82;
## Task Generate a SQL query to answer the following question: `What is the lowest population density for the district of Santa Cruz and a Barangay larger than 82?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "administrative_districts" ( "district" text, "s_barangay" real, "population_2010_census" real, "area_has" real, "pop_density_per_km2" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest population density for the district of Santa Cruz and a Barangay larger than 82?`: ```sql
SELECT MAX("pop_density_per_km2") FROM "administrative_districts" WHERE "population_2010_census"<'115,942' AND "s_barangay"<82;
## Task Generate a SQL query to answer the following question: `What is the highest population density that is less than 115,942 and a Barangay less than 82?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "administrative_districts" ( "district" text, "s_barangay" real, "population_2010_census" real, "area_has" real, "pop_density_per_km2" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest population density that is less than 115,942 and a Barangay less than 82?`: ```sql
SELECT SUM("population_2010_census") FROM "administrative_districts" WHERE "pop_density_per_km2"<'29,384.8' AND "district"='san nicolas';
## Task Generate a SQL query to answer the following question: `What is the total population with a population density less than 29,384.8 in San Nicolas?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "administrative_districts" ( "district" text, "s_barangay" real, "population_2010_census" real, "area_has" real, "pop_density_per_km2" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total population with a population density less than 29,384.8 in San Nicolas?`: ```sql
SELECT AVG("gold") FROM "medal_table" WHERE "rank"='17' AND "silver">4;
## Task Generate a SQL query to answer the following question: `What is the average number of golds for teams in rank 17 with more than 4 silver?` ### 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 average number of golds for teams in rank 17 with more than 4 silver?`: ```sql
SELECT AVG("total") FROM "medal_table" WHERE "bronze"<34 AND "gold"<14 AND "silver"<0;
## Task Generate a SQL query to answer the following question: `What is the average total for teams with under 34 bronzes, 0 silver, and under 14 gold?` ### 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 average total for teams with under 34 bronzes, 0 silver, and under 14 gold?`: ```sql
SELECT MIN("gold") FROM "medal_table" WHERE "silver"<0;
## Task Generate a SQL query to answer the following question: `What is the fewest number of golds for teams with 0 silver?` ### 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 fewest number of golds for teams with 0 silver?`: ```sql
SELECT "nations" FROM "world_championships_and_world_cups" WHERE "year"='2007';
## Task Generate a SQL query to answer the following question: `What nations participated in 2007?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championships_and_world_cups" ( "sport" text, "body" text, "year" text, "event_type" text, "location" text, "nations" text ); ### SQL Given the database schema, here is the SQL query that answers `What nations participated in 2007?`: ```sql
SELECT "event_type" FROM "world_championships_and_world_cups" WHERE "body"='cmas' AND "year"='1980' AND "sport"='underwater hockey';
## Task Generate a SQL query to answer the following question: `What event type had BODY CMAS in 1980 and underwater hockey?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championships_and_world_cups" ( "sport" text, "body" text, "year" text, "event_type" text, "location" text, "nations" text ); ### SQL Given the database schema, here is the SQL query that answers `What event type had BODY CMAS in 1980 and underwater hockey?`: ```sql
SELECT "body" FROM "world_championships_and_world_cups" WHERE "event_type"='world championship' AND "sport"='underwater target shooting';
## Task Generate a SQL query to answer the following question: `What body is at the World Championship for Underwater Target shooting?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championships_and_world_cups" ( "sport" text, "body" text, "year" text, "event_type" text, "location" text, "nations" text ); ### SQL Given the database schema, here is the SQL query that answers `What body is at the World Championship for Underwater Target shooting?`: ```sql
SELECT "body" FROM "world_championships_and_world_cups" WHERE "year"='1973';
## Task Generate a SQL query to answer the following question: `What body participated in 1973?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championships_and_world_cups" ( "sport" text, "body" text, "year" text, "event_type" text, "location" text, "nations" text ); ### SQL Given the database schema, here is the SQL query that answers `What body participated in 1973?`: ```sql