output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "player" FROM "1980_packers_draft_selections" WHERE "round"<9 AND "overall">143 AND "position"='db';
## Task Generate a SQL query to answer the following question: `Who is the athlete who was picked before round 9, had an overall draft pick after number 143 and plays the position of db?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1980_packers_draft_selections" ( "round" real, "overall" real, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the athlete who was picked before round 9, had an overall draft pick after number 143 and plays the position of db?`: ```sql
SELECT MAX("round") FROM "atlanta_falcons_draft_history" WHERE "overall"=152;
## Task Generate a SQL query to answer the following question: `What is the highest round of the player with an overall of 152?` ### 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 highest round of the player with an overall of 152?`: ```sql
SELECT AVG("round") FROM "atlanta_falcons_draft_history" WHERE "pick_num">5 AND "position"='defensive back' AND "overall"<152;
## Task Generate a SQL query to answer the following question: `What is the average round of the defensive back player with a pick # greater than 5 and an overall less than 152?` ### 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 average round of the defensive back player with a pick # greater than 5 and an overall less than 152?`: ```sql
SELECT AVG("overall") FROM "atlanta_falcons_draft_history" WHERE "name"='john ayres' AND "pick_num">4;
## Task Generate a SQL query to answer the following question: `What is the average overall of John Ayres, who had a pick # greater than 4?` ### 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 average overall of John Ayres, who had a pick # greater than 4?`: ```sql
SELECT "name" FROM "atlanta_falcons_draft_history" WHERE "pick_num"<5 AND "overall"=284;
## Task Generate a SQL query to answer the following question: `What is the name of the player with a pick # less than 5 and an overall of 284?` ### 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 name of the player with a pick # less than 5 and an overall of 284?`: ```sql
SELECT AVG("overall") FROM "atlanta_falcons_draft_history" WHERE "pick_num"=5 AND "name"='ken whisenhunt';
## Task Generate a SQL query to answer the following question: `What is the average overall of Ken Whisenhunt, who has a pick # of 5?` ### 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 average overall of Ken Whisenhunt, who has a pick # of 5?`: ```sql
SELECT MIN("pick_num") FROM "atlanta_falcons_draft_history" WHERE "name"='john ayres';
## Task Generate a SQL query to answer the following question: `What is the lowest pick # of John Ayres?` ### 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 lowest pick # of John Ayres?`: ```sql
SELECT "team" FROM "managerial_changes" WHERE "last_match"='palmeiras 4-2 portuguesa';
## Task Generate a SQL query to answer the following question: `What is the name of team with Palmeiras 4-2 portuguesa as the last match?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of team with Palmeiras 4-2 portuguesa as the last match?`: ```sql
SELECT "manner_of_departure" FROM "managerial_changes" WHERE "replaced_by"='tita';
## Task Generate a SQL query to answer the following question: `What was the manner of departure replaced by tita?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the manner of departure replaced by tita?`: ```sql
SELECT "last_match" FROM "managerial_changes" WHERE "manner_of_departure"='sacked' AND "outgoing_manager"='geninho';
## Task Generate a SQL query to answer the following question: `What is the name of the last match that had a sacked manner of departure and a geninho outgoing manner?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the last match that had a sacked manner of departure and a geninho outgoing manner?`: ```sql
SELECT "last_match" FROM "managerial_changes" WHERE "date_of_vacancy"='round 2' AND "outgoing_manager"='ney franco';
## Task Generate a SQL query to answer the following question: `What is the last match with a vacancy date of round 2 and Ney Franco as outgoing manager?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the last match with a vacancy date of round 2 and Ney Franco as outgoing manager?`: ```sql
SELECT "last_match" FROM "managerial_changes" WHERE "manner_of_departure"='resigned' AND "date_of_vacancy"='round 1';
## Task Generate a SQL query to answer the following question: `What is the last match with a resigned manner of departure and a round 1 date of vacancy?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "managerial_changes" ( "team" text, "outgoing_manager" text, "manner_of_departure" text, "date_of_vacancy" text, "last_match" text, "replaced_by" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the last match with a resigned manner of departure and a round 1 date of vacancy?`: ```sql
SELECT "issue_date_s" FROM "see_also" WHERE "volume_issue"='47:8-9';
## Task Generate a SQL query to answer the following question: `What was the issue date for the single with a Volume:Issue of 47:8-9?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "volume_issue" text, "issue_date_s" text, "weeks_on_top" real, "song" text, "artist" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the issue date for the single with a Volume:Issue of 47:8-9?`: ```sql
SELECT MAX("effic") FROM "passing" WHERE "avg_g"=91.9;
## Task Generate a SQL query to answer the following question: `What is the highest effic with an avg/g of 91.9?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "passing" ( "name" text, "gp_gs" text, "effic" real, "att_cmp_int" text, "avg_g" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest effic with an avg/g of 91.9?`: ```sql
SELECT "att_cmp_int" FROM "passing" WHERE "effic"<117.88 AND "gp_gs"='10-0';
## Task Generate a SQL query to answer the following question: `What is the att-cmp-int with an effic smaller than 117.88 and a gp-gs of 10-0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "passing" ( "name" text, "gp_gs" text, "effic" real, "att_cmp_int" text, "avg_g" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the att-cmp-int with an effic smaller than 117.88 and a gp-gs of 10-0?`: ```sql
SELECT SUM("avg_g") FROM "passing" WHERE "effic"=858.4;
## Task Generate a SQL query to answer the following question: `What is the sum avg/g with an effic of 858.4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "passing" ( "name" text, "gp_gs" text, "effic" real, "att_cmp_int" text, "avg_g" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum avg/g with an effic of 858.4?`: ```sql
SELECT "mascot" FROM "indiana_high_school_athletics_conference" WHERE "county"='32 hendricks';
## Task Generate a SQL query to answer the following question: `What is the mascot for the school in 32 Hendricks County?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indiana_high_school_athletics_conference" ( "school" text, "mascot" text, "location" text, "enrollment" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the mascot for the school in 32 Hendricks County?`: ```sql
SELECT "mascot" FROM "indiana_high_school_athletics_conference" WHERE "enrollment">'2,191' AND "school"='noblesville';
## Task Generate a SQL query to answer the following question: `What is the mascot for the school with a student body larger than 2,191 in Noblesville?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indiana_high_school_athletics_conference" ( "school" text, "mascot" text, "location" text, "enrollment" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the mascot for the school with a student body larger than 2,191 in Noblesville?`: ```sql
SELECT "location" FROM "indiana_high_school_athletics_conference" WHERE "county"='79 tippecanoe' AND "school"='lafayette t. jefferson';
## Task Generate a SQL query to answer the following question: `Where is Lafayette T. Jefferson School in 79 Tippecanoe county?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indiana_high_school_athletics_conference" ( "school" text, "mascot" text, "location" text, "enrollment" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); ### SQL Given the database schema, here is the SQL query that answers `Where is Lafayette T. Jefferson School in 79 Tippecanoe county?`: ```sql
SELECT "location" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='royals';
## Task Generate a SQL query to answer the following question: `Where is the school with Royals as their mascot?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "indiana_high_school_athletics_conference" ( "school" text, "mascot" text, "location" text, "enrollment" real, "ihsaa_class" text, "ihsaa_football_class" text, "county" text ); ### SQL Given the database schema, here is the SQL query that answers `Where is the school with Royals as their mascot?`: ```sql
SELECT "score" FROM "game_log" WHERE "date"='february 12';
## Task Generate a SQL query to answer the following question: `What was the score for the game on February 12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score for the game on February 12?`: ```sql
SELECT "score" FROM "game_log" WHERE "date"='february 29';
## Task Generate a SQL query to answer the following question: `What was the score for the game on February 29?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score for the game on February 29?`: ```sql
SELECT "home" FROM "game_log" WHERE "visitor"='chicago';
## Task Generate a SQL query to answer the following question: `Where was the home team in the game played against Chicago?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Where was the home team in the game played against Chicago?`: ```sql
SELECT MAX("season") FROM "fcs_regional_championship_games" WHERE "game"='fcs midwest region' AND "score"='40-33';
## Task Generate a SQL query to answer the following question: `Which Season has a Game of fcs midwest region, and a Score of 40-33?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fcs_regional_championship_games" ( "season" real, "game" text, "record" text, "opponent" text, "score" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Season has a Game of fcs midwest region, and a Score of 40-33?`: ```sql
SELECT "game" FROM "fcs_regional_championship_games" WHERE "result"='win' AND "opponent"='new hampshire' AND "season"<2008;
## Task Generate a SQL query to answer the following question: `Which Game has a Result of win, and an Opponent of new hampshire, and a Season smaller than 2008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fcs_regional_championship_games" ( "season" real, "game" text, "record" text, "opponent" text, "score" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Game has a Result of win, and an Opponent of new hampshire, and a Season smaller than 2008?`: ```sql
SELECT MAX("season") FROM "fcs_regional_championship_games" WHERE "score"='39-27';
## Task Generate a SQL query to answer the following question: `Which Season has a Score of 39-27?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fcs_regional_championship_games" ( "season" real, "game" text, "record" text, "opponent" text, "score" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Season has a Score of 39-27?`: ```sql
SELECT "result" FROM "international_goals" WHERE "goal"=5;
## Task Generate a SQL query to answer the following question: `What result has a goal of 5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "goal" real, "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What result has a goal of 5?`: ```sql
SELECT "record" FROM "game_log" WHERE "date"='may 25';
## Task Generate a SQL query to answer the following question: `What's the record on May 25?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the record on May 25?`: ```sql
SELECT MAX("attendance") FROM "game_log" WHERE "date"='may 7';
## Task Generate a SQL query to answer the following question: `What's greatest attendance on May 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What's greatest attendance on May 7?`: ```sql
SELECT "january" FROM "regular_season" WHERE "record"='28–14–8';
## Task Generate a SQL query to answer the following question: `Which January has a Record of 28–14–8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "game" real, "january" real, "opponent" text, "score" text, "record" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Which January has a Record of 28–14–8?`: ```sql
SELECT MAX("points") FROM "regular_season" WHERE "game"<43 AND "january">8;
## Task Generate a SQL query to answer the following question: `Which Points is the highest one that has a Game smaller than 43, and a January larger than 8?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "regular_season" ( "game" real, "january" real, "opponent" text, "score" text, "record" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Points is the highest one that has a Game smaller than 43, and a January larger than 8?`: ```sql
SELECT AVG("wins") FROM "motorcycle_grand_prix_results" WHERE "team"='norton' AND "year"=1966 AND "points"=8;
## Task Generate a SQL query to answer the following question: `What is the mean number of wins for the norton team in 1966, when there are 8 points?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the mean number of wins for the norton team in 1966, when there are 8 points?`: ```sql
SELECT MAX("year") FROM "motorcycle_grand_prix_results" WHERE "team"='ajs' AND "wins"<0;
## Task Generate a SQL query to answer the following question: `What is the most recent year for the ajs team when there are fewer than 0 wins?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the most recent year for the ajs team when there are fewer than 0 wins?`: ```sql
SELECT MIN("points") FROM "motorcycle_grand_prix_results" WHERE "year"<1958 AND "class"='350cc';
## Task Generate a SQL query to answer the following question: `What is the smallest point amount for years prior to 1958 when the class is 350cc?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest point amount for years prior to 1958 when the class is 350cc?`: ```sql
SELECT MAX("wins") FROM "motorcycle_grand_prix_results" WHERE "points"<5 AND "class"='500cc' AND "team"='norton' AND "year">1955;
## Task Generate a SQL query to answer the following question: `What is the largest amount of wins when there are less than 5 points, the class is 500cc, the team is norton, and the year is more recent than 1955?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "motorcycle_grand_prix_results" ( "year" real, "class" text, "team" text, "points" real, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the largest amount of wins when there are less than 5 points, the class is 500cc, the team is norton, and the year is more recent than 1955?`: ```sql
SELECT "first_prize" FROM "ftops_main_event_winners" WHERE "entrants">'5,291' AND "series"='ftops xiii';
## Task Generate a SQL query to answer the following question: `What was the first prize for the FTOPS XIII series with more than 5,291 entrants?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ftops_main_event_winners" ( "series" text, "date" text, "entrants" real, "winner" text, "first_prize" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the first prize for the FTOPS XIII series with more than 5,291 entrants?`: ```sql
SELECT "date" FROM "ftops_main_event_winners" WHERE "first_prize"='$161,480';
## Task Generate a SQL query to answer the following question: `When was the game that had a first prize of $161,480?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ftops_main_event_winners" ( "series" text, "date" text, "entrants" real, "winner" text, "first_prize" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the game that had a first prize of $161,480?`: ```sql
SELECT "winner" FROM "ftops_main_event_winners" WHERE "date"='may 2011';
## Task Generate a SQL query to answer the following question: `Who won on May 2011?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ftops_main_event_winners" ( "series" text, "date" text, "entrants" real, "winner" text, "first_prize" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won on May 2011?`: ```sql
SELECT "general_classification" FROM "classification_leadership" WHERE "stage"='13';
## Task Generate a SQL query to answer the following question: `What is the general classification with a 13 stage?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the general classification with a 13 stage?`: ```sql
SELECT "stage" FROM "classification_leadership" WHERE "points_classification"='daniele bennati' AND "general_classification"='giovanni visconti';
## Task Generate a SQL query to answer the following question: `What is teh stage with Daniele Bennati as the points classification and Giovanni VIsconti as the general classification?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); ### SQL Given the database schema, here is the SQL query that answers `What is teh stage with Daniele Bennati as the points classification and Giovanni VIsconti as the general classification?`: ```sql
SELECT "general_classification" FROM "classification_leadership" WHERE "points_classification"='daniele bennati' AND "young_rider_classification"='morris possoni' AND "stage"='3';
## Task Generate a SQL query to answer the following question: `What is the general classification of the stage 3 with Daniele Bennati as the points classification and Morris Possoni as the young rider classification.` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the general classification of the stage 3 with Daniele Bennati as the points classification and Morris Possoni as the young rider classification.`: ```sql
SELECT "general_classification" FROM "classification_leadership" WHERE "young_rider_classification"='riccardo riccò';
## Task Generate a SQL query to answer the following question: `What is the general classification with riccardo riccò as the young rider classification?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the general classification with riccardo riccò as the young rider classification?`: ```sql
SELECT "points_classification" FROM "classification_leadership" WHERE "young_rider_classification"='chris anker sørensen' AND "general_classification"='christian vande velde';
## Task Generate a SQL query to answer the following question: `What is the point classification with chris anker sørensen as the young rider classification and Christian vande velde as the general classification?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the point classification with chris anker sørensen as the young rider classification and Christian vande velde as the general classification?`: ```sql
SELECT "points_classification" FROM "classification_leadership" WHERE "stage"='15';
## Task Generate a SQL query to answer the following question: `What is the point classification of stage 15?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification_leadership" ( "stage" text, "general_classification" text, "points_classification" text, "mountains_classification" text, "young_rider_classification" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the point classification of stage 15?`: ```sql
SELECT AVG("week") FROM "schedule" WHERE "game_site"='memorial stadium';
## Task Generate a SQL query to answer the following question: `what week number was at memorial 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 week number was at memorial stadium?`: ```sql
SELECT SUM("attendance") FROM "schedule" WHERE "date"='1983-11-21' AND "week"<12;
## Task Generate a SQL query to answer the following question: `before week 12 what was the attendance on 1983-11-21?` ### 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 `before week 12 what was the attendance on 1983-11-21?`: ```sql
SELECT MIN("attendance") FROM "schedule" WHERE "week"=16;
## Task Generate a SQL query to answer the following question: `on week 16, what was the lowest 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, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `on week 16, what was the lowest attendance?`: ```sql
SELECT "women_s_doubles" FROM "past_winners" WHERE "men_s_singles"='andrey antropov' AND "women_s_singles"='marina yakusheva';
## Task Generate a SQL query to answer the following question: `Who won the women's doubles when andrey antropov won the men's singles and marina yakusheva won the womens' singles?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_winners" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won the women's doubles when andrey antropov won the men's singles and marina yakusheva won the womens' singles?`: ```sql
SELECT "venue" FROM "lpga_event" WHERE "margin_of_victory"='7 strokes';
## Task Generate a SQL query to answer the following question: `At what venue is the margin of victory 7 strokes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lpga_event" ( "year" real, "date" text, "venue" text, "champion" text, "country" text, "score" real, "to_par" text, "margin_of_victory" text, "purse" real, "winner_s_share" real ); ### SQL Given the database schema, here is the SQL query that answers `At what venue is the margin of victory 7 strokes?`: ```sql
SELECT COUNT("purse") FROM "lpga_event" WHERE "champion"='sherri steinhauer' AND "venue"='woburn golf and country club';
## Task Generate a SQL query to answer the following question: `What was the purse when Sherri Steinhauer was champion at Woburn Golf and Country Club?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "lpga_event" ( "year" real, "date" text, "venue" text, "champion" text, "country" text, "score" real, "to_par" text, "margin_of_victory" text, "purse" real, "winner_s_share" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the purse when Sherri Steinhauer was champion at Woburn Golf and Country Club?`: ```sql
SELECT "exit_date" FROM "first_team" WHERE "to_club"='cardiff city';
## Task Generate a SQL query to answer the following question: `What is the exit date of the player who transferred to Cardiff City?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_team" ( "exit_date" text, "pos" text, "player" text, "to_club" text, "transfer_fee" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the exit date of the player who transferred to Cardiff City?`: ```sql
SELECT "exit_date" FROM "first_team" WHERE "to_club"='portsmouth';
## Task Generate a SQL query to answer the following question: `What is the exit date of the player who transferred to Portsmouth?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_team" ( "exit_date" text, "pos" text, "player" text, "to_club" text, "transfer_fee" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the exit date of the player who transferred to Portsmouth?`: ```sql
SELECT "player" FROM "first_team" WHERE "pos"='fw';
## Task Generate a SQL query to answer the following question: `Which player has a position of FW?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_team" ( "exit_date" text, "pos" text, "player" text, "to_club" text, "transfer_fee" text ); ### SQL Given the database schema, here is the SQL query that answers `Which player has a position of FW?`: ```sql
SELECT "frequency_m_hz" FROM "repeaters" WHERE "erp_w">4 AND "call_sign"='w218ap';
## Task Generate a SQL query to answer the following question: `Which Frequency MHz has an ERP W larger than 4, and a Call sign of w218ap?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "repeaters" ( "call_sign" text, "frequency_m_hz" text, "city_of_license" text, "erp_w" real, "fcc_info" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Frequency MHz has an ERP W larger than 4, and a Call sign of w218ap?`: ```sql
SELECT "city_of_license" FROM "repeaters" WHERE "frequency_m_hz"='91.5 fm';
## Task Generate a SQL query to answer the following question: `Which City of license has a Frequency MHz of 91.5 fm?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "repeaters" ( "call_sign" text, "frequency_m_hz" text, "city_of_license" text, "erp_w" real, "fcc_info" text ); ### SQL Given the database schema, here is the SQL query that answers `Which City of license has a Frequency MHz of 91.5 fm?`: ```sql
SELECT "city_of_license" FROM "repeaters" WHERE "call_sign"='w220ba';
## Task Generate a SQL query to answer the following question: `Which City of license has a Call sign of w220ba?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "repeaters" ( "call_sign" text, "frequency_m_hz" text, "city_of_license" text, "erp_w" real, "fcc_info" text ); ### SQL Given the database schema, here is the SQL query that answers `Which City of license has a Call sign of w220ba?`: ```sql
SELECT MAX("erp_w") FROM "repeaters" WHERE "frequency_m_hz"='89.3 fm';
## Task Generate a SQL query to answer the following question: `Which ERP W has a Frequency MHz of 89.3 fm?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "repeaters" ( "call_sign" text, "frequency_m_hz" text, "city_of_license" text, "erp_w" real, "fcc_info" text ); ### SQL Given the database schema, here is the SQL query that answers `Which ERP W has a Frequency MHz of 89.3 fm?`: ```sql
SELECT MIN("wins") FROM "leaders" WHERE "earnings"='7,188,408' AND "rank">5;
## Task Generate a SQL query to answer the following question: `How many wins does a player who have $7,188,408 earnings with lower than rank 5?` ### 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, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `How many wins does a player who have $7,188,408 earnings with lower than rank 5?`: ```sql
SELECT SUM("wins") FROM "leaders" WHERE "player"='greg norman';
## Task Generate a SQL query to answer the following question: `How many wins does Greg Norman have?` ### 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, "wins" real ); ### SQL Given the database schema, here is the SQL query that answers `How many wins does Greg Norman have?`: ```sql
SELECT MIN("played") FROM "campeonato_brasileiro_s_rie_a" WHERE "position"=6 AND "drawn"<1;
## Task Generate a SQL query to answer the following question: `What is the lowest number played with a position of 6 and less than 1 draw?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest number played with a position of 6 and less than 1 draw?`: ```sql
SELECT MAX("against") FROM "campeonato_brasileiro_s_rie_a" WHERE "team"='palmeiras' AND "position"<4;
## Task Generate a SQL query to answer the following question: `What is the highest against value for Palmeiras and position less than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest against value for Palmeiras and position less than 4?`: ```sql
SELECT MAX("played") FROM "campeonato_brasileiro_s_rie_a" WHERE "lost">2 AND "team"='palmeiras' AND "drawn"<1;
## Task Generate a SQL query to answer the following question: `What is the highest number played with more than 2 lost for Palmeiras and less than 1 draw?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number played with more than 2 lost for Palmeiras and less than 1 draw?`: ```sql
SELECT AVG("lost") FROM "campeonato_brasileiro_s_rie_a" WHERE "against"<5;
## Task Generate a SQL query to answer the following question: `What is the average number lost when the against value is less than 5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average number lost when the against value is less than 5?`: ```sql
SELECT COUNT("won_by_2_or_more_goals_difference") FROM "campeonato_brasileiro_s_rie_a" WHERE "difference"='2' AND "points">9 AND "team"='america-rj' AND "played">7;
## Task Generate a SQL query to answer the following question: `How many values for a win by 2 or more goals correspond to a difference of 2, more than 9 points, and the America-RJ team when more than 7 are played?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "campeonato_brasileiro_s_rie_a" ( "position" real, "team" text, "points" real, "played" real, "won_by_2_or_more_goals_difference" real, "drawn" real, "lost" real, "against" real, "difference" text ); ### SQL Given the database schema, here is the SQL query that answers `How many values for a win by 2 or more goals correspond to a difference of 2, more than 9 points, and the America-RJ team when more than 7 are played?`: ```sql
SELECT AVG("total") FROM "national_structure_of_the_population_in_" WHERE "year_of_census">1971 AND "serbs"='10,412 (32.88%)';
## Task Generate a SQL query to answer the following question: `What is the average total of the census after 1971 with 10,412 (32.88%) Serbs?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "national_structure_of_the_population_in_" ( "year_of_census" real, "total" real, "croats" text, "serbs" text, "others" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average total of the census after 1971 with 10,412 (32.88%) Serbs?`: ```sql
SELECT "school_club_team" FROM "nfl_draft" WHERE "player"='jim goodman';
## Task Generate a SQL query to answer the following question: `what is the school that hosts jim goodman` ### 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 school that hosts jim goodman`: ```sql
SELECT "surface" FROM "singles_6" WHERE "date"='january 2, 2006';
## Task Generate a SQL query to answer the following question: `Which Surface has a Date of january 2, 2006?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponen" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Surface has a Date of january 2, 2006?`: ```sql
SELECT "tournament" FROM "singles_6" WHERE "date"='september 25, 2006';
## Task Generate a SQL query to answer the following question: `Which tournament happened on september 25, 2006?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponen" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Which tournament happened on september 25, 2006?`: ```sql
SELECT "date" FROM "singles_6" WHERE "opponen"='joão souza';
## Task Generate a SQL query to answer the following question: `When did joão souza play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponen" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `When did joão souza play?`: ```sql
SELECT "surface" FROM "singles_6" WHERE "score"='7–5, 6–4';
## Task Generate a SQL query to answer the following question: `Which Surface has a Score of 7–5, 6–4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponen" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Surface has a Score of 7–5, 6–4?`: ```sql
SELECT MAX("nfl_draft") FROM "top_nfl_draft_selections" WHERE "player"='jeff robinson' AND "overall_pick"<98;
## Task Generate a SQL query to answer the following question: `What is the highest NFL Draft that has jeff robinson as the player, with an overall pick less than 98?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_nfl_draft_selections" ( "player" text, "position" text, "overall_pick" real, "round" text, "nfl_draft" real, "franchise" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest NFL Draft that has jeff robinson as the player, with an overall pick less than 98?`: ```sql
SELECT "position" FROM "top_nfl_draft_selections" WHERE "nfl_draft"=1958 AND "player"='jerry kramer';
## Task Generate a SQL query to answer the following question: `What position has 1958 as the NFL Draft, and jerry kramer as the player?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_nfl_draft_selections" ( "player" text, "position" text, "overall_pick" real, "round" text, "nfl_draft" real, "franchise" text ); ### SQL Given the database schema, here is the SQL query that answers `What position has 1958 as the NFL Draft, and jerry kramer as the player?`: ```sql
SELECT MAX("overall_pick") FROM "top_nfl_draft_selections" WHERE "position"='c' AND "nfl_draft">1977;
## Task Generate a SQL query to answer the following question: `What is the highest overall pick that has c as the position, with an NFL Draft greater than 1977?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "top_nfl_draft_selections" ( "player" text, "position" text, "overall_pick" real, "round" text, "nfl_draft" real, "franchise" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest overall pick that has c as the position, with an NFL Draft greater than 1977?`: ```sql
SELECT "score" FROM "mls_regular_season" WHERE "home_team"='san jose' AND "venue"='spartan stadium';
## Task Generate a SQL query to answer the following question: `What was the score at Spartan Stadium when San Jose was the Home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mls_regular_season" ( "date" text, "home_team" text, "score" text, "away_team" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score at Spartan Stadium when San Jose was the Home team?`: ```sql
SELECT "venue" FROM "mls_regular_season" WHERE "date"='september 11, 2004';
## Task Generate a SQL query to answer the following question: `Where was the game on September 11, 2004?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mls_regular_season" ( "date" text, "home_team" text, "score" text, "away_team" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `Where was the game on September 11, 2004?`: ```sql
SELECT "home_team" FROM "mls_regular_season" WHERE "venue"='spartan stadium' AND "date"='september 20, 1998';
## Task Generate a SQL query to answer the following question: `Who was the home team on September 20, 1998 at Spartan Stadium?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mls_regular_season" ( "date" text, "home_team" text, "score" text, "away_team" text, "venue" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the home team on September 20, 1998 at Spartan Stadium?`: ```sql
SELECT "method" FROM "mixed_martial_arts_record" WHERE "round"<3 AND "time"='3:36';
## Task Generate a SQL query to answer the following question: `What method has a round less than 3, and 3:36 as the time?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What method has a round less than 3, and 3:36 as the time?`: ```sql
SELECT "method" FROM "mixed_martial_arts_record" WHERE "opponent"='randy couture';
## Task Generate a SQL query to answer the following question: `What method has randy couture as the opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What method has randy couture as the opponent?`: ```sql
SELECT "median_household_income" FROM "counties" WHERE "per_capita_income"='$28,789';
## Task Generate a SQL query to answer the following question: `What is the median household income where the per capita is $28,789?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "counties" ( "county" text, "population" real, "per_capita_income" text, "median_household_income" text, "median_family_income" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the median household income where the per capita is $28,789?`: ```sql
SELECT "median_family_income" FROM "counties" WHERE "per_capita_income"='$18,296';
## Task Generate a SQL query to answer the following question: `What is the median income for a family whose per capita income is $18,296?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "counties" ( "county" text, "population" real, "per_capita_income" text, "median_household_income" text, "median_family_income" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the median income for a family whose per capita income is $18,296?`: ```sql
SELECT "resolution" FROM "television" WHERE "network"='canal de las estrellas';
## Task Generate a SQL query to answer the following question: `What is the resolution of the network Canal de las Estrellas?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the resolution of the network Canal de las Estrellas?`: ```sql
SELECT "resolution" FROM "television" WHERE "network"='carismatv';
## Task Generate a SQL query to answer the following question: `What is the resolution of the network Carismatv?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the resolution of the network Carismatv?`: ```sql
SELECT "dish" FROM "television" WHERE "official_website"='ksat.com';
## Task Generate a SQL query to answer the following question: `Which dish belongs to the network that has the official website of ksat.com?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); ### SQL Given the database schema, here is the SQL query that answers `Which dish belongs to the network that has the official website of ksat.com?`: ```sql
SELECT "city_of_license" FROM "television" WHERE "network"='latv';
## Task Generate a SQL query to answer the following question: `In which city is the network latv licensed?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); ### SQL Given the database schema, here is the SQL query that answers `In which city is the network latv licensed?`: ```sql
SELECT "city_of_license" FROM "television" WHERE "callsign"='kgns-dt3';
## Task Generate a SQL query to answer the following question: `In which city is the network with the callsign kgns-dt3 licensed?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "television" ( "dish" text, "callsign" text, "network" text, "resolution" text, "city_of_license" text, "official_website" text ); ### SQL Given the database schema, here is the SQL query that answers `In which city is the network with the callsign kgns-dt3 licensed?`: ```sql
SELECT SUM("introduced") FROM "list_of_braathens_aircraft" WHERE "manufacturer"='fokker' AND "quantity"=5 AND "retired">1999;
## Task Generate a SQL query to answer the following question: `How many in the introduced section had Fokker as a manufacturer, a quantity of 5, and retired later than 1999?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_braathens_aircraft" ( "manufacturer" text, "model" text, "quantity" real, "introduced" real, "retired" real ); ### SQL Given the database schema, here is the SQL query that answers `How many in the introduced section had Fokker as a manufacturer, a quantity of 5, and retired later than 1999?`: ```sql
SELECT SUM("quantity") FROM "list_of_braathens_aircraft" WHERE "introduced"=1984;
## Task Generate a SQL query to answer the following question: `What is the total number of quantity when the introductory year was 1984?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_braathens_aircraft" ( "manufacturer" text, "model" text, "quantity" real, "introduced" real, "retired" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of quantity when the introductory year was 1984?`: ```sql
SELECT COUNT("introduced") FROM "list_of_braathens_aircraft" WHERE "retired">1994 AND "manufacturer"='fokker';
## Task Generate a SQL query to answer the following question: `How many in the introduced segment retired later than 1994 and had Fokker as a manufacturer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_braathens_aircraft" ( "manufacturer" text, "model" text, "quantity" real, "introduced" real, "retired" real ); ### SQL Given the database schema, here is the SQL query that answers `How many in the introduced segment retired later than 1994 and had Fokker as a manufacturer?`: ```sql
SELECT COUNT("quantity") FROM "list_of_braathens_aircraft" WHERE "manufacturer"='fokker' AND "retired">1999;
## Task Generate a SQL query to answer the following question: `How many in the quantity section had Fokker as a manufacturer and retired later than 1999?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_braathens_aircraft" ( "manufacturer" text, "model" text, "quantity" real, "introduced" real, "retired" real ); ### SQL Given the database schema, here is the SQL query that answers `How many in the quantity section had Fokker as a manufacturer and retired later than 1999?`: ```sql
SELECT "champion" FROM "mano_parejas" WHERE "scoreboard"='22-14';
## Task Generate a SQL query to answer the following question: `Which Championship has a Scoreboard that is 22-14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mano_parejas" ( "year" text, "champion" text, "subchampion" text, "scoreboard" text, "fronton" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Championship has a Scoreboard that is 22-14?`: ```sql
SELECT MAX("year_completed") FROM "skyline" WHERE "rank"<3 AND "height_ft_m"='274 (84)';
## Task Generate a SQL query to answer the following question: `What year was the building with a top 3 rank and a height of 274 (84) ft (m) completed?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "skyline" ( "rank" real, "name" text, "height_ft_m" text, "floors_stories" real, "year_completed" real ); ### SQL Given the database schema, here is the SQL query that answers `What year was the building with a top 3 rank and a height of 274 (84) ft (m) completed?`: ```sql
SELECT AVG("floors_stories") FROM "skyline" WHERE "height_ft_m"='274 (84)' AND "rank">1;
## Task Generate a SQL query to answer the following question: `How many floors are in the 274 (84) ft (m) building that is ranked number 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "skyline" ( "rank" real, "name" text, "height_ft_m" text, "floors_stories" real, "year_completed" real ); ### SQL Given the database schema, here is the SQL query that answers `How many floors are in the 274 (84) ft (m) building that is ranked number 1?`: ```sql
SELECT MAX("rank") FROM "skyline" WHERE "floors_stories">15;
## Task Generate a SQL query to answer the following question: `Which is the highest ranked building with more than 15 floors?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "skyline" ( "rank" real, "name" text, "height_ft_m" text, "floors_stories" real, "year_completed" real ); ### SQL Given the database schema, here is the SQL query that answers `Which is the highest ranked building with more than 15 floors?`: ```sql
SELECT MAX("scored") FROM "torneo_apertura" WHERE "position">5 AND "wins"<4 AND "draws">8;
## Task Generate a SQL query to answer the following question: `What is the highest points scored for the team with a position larger than 5, who had less than 4 wins and more than 8 draws?` ### 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 is the highest points scored for the team with a position larger than 5, who had less than 4 wins and more than 8 draws?`: ```sql
SELECT AVG("conceded") FROM "torneo_apertura" WHERE "points"<19 AND "position"<10 AND "played">18;
## Task Generate a SQL query to answer the following question: `What is the average number conceded for hte team that had less than 19 points, played more than 18 games and had a position less than 10?` ### 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 is the average number conceded for hte team that had less than 19 points, played more than 18 games and had a position less than 10?`: ```sql
SELECT SUM("draws") FROM "torneo_apertura" WHERE "position"<4 AND "wins"=11 AND "points"<38;
## Task Generate a SQL query to answer the following question: `What was the sum of the draws for the team that had 11 wins, less than 38 points, and a position 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 was the sum of the draws for the team that had 11 wins, less than 38 points, and a position smaller than 4?`: ```sql
SELECT MIN("wins") FROM "torneo_apertura" WHERE "position"=7 AND "scored">14;
## Task Generate a SQL query to answer the following question: `What was the lowest number of wins for the team that scored more than 14 points and had a position of 7?` ### 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 was the lowest number of wins for the team that scored more than 14 points and had a position of 7?`: ```sql
SELECT COUNT("scored") FROM "torneo_apertura" WHERE "position">4 AND "points"=19;
## Task Generate a SQL query to answer the following question: `What is the total number scored for the team that had 19 points and a position larger 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 is the total number scored for the team that had 19 points and a position larger than 4?`: ```sql
SELECT MIN("conceded") FROM "torneo_apertura" WHERE "wins"<8 AND "scored"=21 AND "points"<23;
## Task Generate a SQL query to answer the following question: `What is the lowest number conceded for the team that had less than 8 wins, scored 21, and had less than 23 points?` ### 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 is the lowest number conceded for the team that had less than 8 wins, scored 21, and had less than 23 points?`: ```sql
SELECT "date" FROM "schedule" WHERE "result"='l 14–13';
## Task Generate a SQL query to answer the following question: `Which Date has a Result of l 14–13?` ### 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 `Which Date has a Result of l 14–13?`: ```sql