output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "colliery" FROM "mining_disasters_in_the_rhondda_valley_1" WHERE "death_toll"=7;
## Task Generate a SQL query to answer the following question: `Which Colliery has a Death toll of 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mining_disasters_in_the_rhondda_valley_1" ( "colliery" text, "location" text, "date" text, "year" real, "death_toll" real, "cause" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Colliery has a Death toll of 7?`: ```sql
SELECT "score_1" FROM "south" WHERE "tie_no"='6';
## Task Generate a SQL query to answer the following question: `What is the Score 1 of Tie no 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south" ( "tie_no" text, "home_team" text, "score_1" text, "away_team" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Score 1 of Tie no 6?`: ```sql
SELECT "attendance" FROM "south" WHERE "tie_no"='3';
## Task Generate a SQL query to answer the following question: `What is the Attendance of Tie no 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south" ( "tie_no" text, "home_team" text, "score_1" text, "away_team" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Attendance of Tie no 3?`: ```sql
SELECT "attendance" FROM "south" WHERE "away_team"='hereford united';
## Task Generate a SQL query to answer the following question: `What is the Attendance at the Hereford United Away game?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south" ( "tie_no" text, "home_team" text, "score_1" text, "away_team" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Attendance at the Hereford United Away game?`: ```sql
SELECT "home_team" FROM "south" WHERE "tie_no"='11';
## Task Generate a SQL query to answer the following question: `What is the Home team of Tie no 11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south" ( "tie_no" text, "home_team" text, "score_1" text, "away_team" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Home team of Tie no 11?`: ```sql
SELECT "tie_no" FROM "south" WHERE "away_team"='hereford united';
## Task Generate a SQL query to answer the following question: `What is the Tie no of Hereford United's Away game?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south" ( "tie_no" text, "home_team" text, "score_1" text, "away_team" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Tie no of Hereford United's Away game?`: ```sql
SELECT "score_1" FROM "south" WHERE "attendance"='2,571';
## Task Generate a SQL query to answer the following question: `What is the Score 1 of the game with Attendance of 2,571?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "south" ( "tie_no" text, "home_team" text, "score_1" text, "away_team" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Score 1 of the game with Attendance of 2,571?`: ```sql
SELECT SUM("clubs_remaining") FROM "teams" WHERE "new_entries_this_round"='34' AND "clubs_involved">34;
## Task Generate a SQL query to answer the following question: `What is the sum of the clubs remaining with 34 new entries this round and more than 34 clubs involved?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams" ( "round" text, "clubs_remaining" real, "clubs_involved" real, "winners_from_previous_round" text, "new_entries_this_round" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of the clubs remaining with 34 new entries this round and more than 34 clubs involved?`: ```sql
SELECT "clubs_involved" FROM "teams" WHERE "clubs_remaining"=16;
## Task Generate a SQL query to answer the following question: `What are the clubs involved with 16 clubs remaining?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams" ( "round" text, "clubs_remaining" real, "clubs_involved" real, "winners_from_previous_round" text, "new_entries_this_round" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the clubs involved with 16 clubs remaining?`: ```sql
SELECT COUNT("rank") FROM "men_s_taijiquan_taijijian_combined" WHERE "total">19.42 AND "taijiquan"<9.87;
## Task Generate a SQL query to answer the following question: `What is the total rank of the athlete with a total larger than 19.42 and a taijiquan less than 9.87?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "men_s_taijiquan_taijijian_combined" ( "rank" real, "athlete" text, "taijijian" real, "taijiquan" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total rank of the athlete with a total larger than 19.42 and a taijiquan less than 9.87?`: ```sql
SELECT MIN("rank") FROM "men_s_taijiquan_taijijian_combined" WHERE "taijiquan">9.42 AND "total"=19.02;
## Task Generate a SQL query to answer the following question: `What is the lowest rank of the athlete with a taijiquan greater than 9.42 and a 19.02 total?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "men_s_taijiquan_taijijian_combined" ( "rank" real, "athlete" text, "taijijian" real, "taijiquan" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest rank of the athlete with a taijiquan greater than 9.42 and a 19.02 total?`: ```sql
SELECT MAX("taijijian") FROM "men_s_taijiquan_taijijian_combined" WHERE "taijiquan"=9.87 AND "total"<19.77;
## Task Generate a SQL query to answer the following question: `What is the highest taijijian with a 9.87 taijiquan and a total less than 19.77?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "men_s_taijiquan_taijijian_combined" ( "rank" real, "athlete" text, "taijijian" real, "taijiquan" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest taijijian with a 9.87 taijiquan and a total less than 19.77?`: ```sql
SELECT "week_3" FROM "2008" WHERE "week_1"='demi jessica';
## Task Generate a SQL query to answer the following question: `Who is the cyber girl in week 3 when Demi Jessica was the cyber girl in week 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "week_1" text, "week_2" text, "week_3" text, "week_4" text, "week_5" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the cyber girl in week 3 when Demi Jessica was the cyber girl in week 1?`: ```sql
SELECT "week_4" FROM "2008" WHERE "week_2"='lexi lombardelli';
## Task Generate a SQL query to answer the following question: `What is the name of the cyber girl in week 4 when Lexi Lombardelli was the cyber girl in week 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "week_1" text, "week_2" text, "week_3" text, "week_4" text, "week_5" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the cyber girl in week 4 when Lexi Lombardelli was the cyber girl in week 2?`: ```sql
SELECT "week_1" FROM "2008" WHERE "week_3"='alinna d penta';
## Task Generate a SQL query to answer the following question: `When Alinna D Penta was the cyber girl in week 3, who was the cyber girl in week 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "week_1" text, "week_2" text, "week_3" text, "week_4" text, "week_5" text ); ### SQL Given the database schema, here is the SQL query that answers `When Alinna D Penta was the cyber girl in week 3, who was the cyber girl in week 1?`: ```sql
SELECT "week_5" FROM "2008" WHERE "week_3"='felicia taylor';
## Task Generate a SQL query to answer the following question: `Felicia Taylor was cyber girl in week 3, so who was the cyber girl in week 5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "week_1" text, "week_2" text, "week_3" text, "week_4" text, "week_5" text ); ### SQL Given the database schema, here is the SQL query that answers `Felicia Taylor was cyber girl in week 3, so who was the cyber girl in week 5?`: ```sql
SELECT "week_3" FROM "2008" WHERE "week_2"='ashley lowe';
## Task Generate a SQL query to answer the following question: `Who is the cyber girl in week 3 when Ashley Lowe was the cyber girl in week 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "week_1" text, "week_2" text, "week_3" text, "week_4" text, "week_5" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the cyber girl in week 3 when Ashley Lowe was the cyber girl in week 2?`: ```sql
SELECT "week_2" FROM "2008" WHERE "week_4"='diane deluna';
## Task Generate a SQL query to answer the following question: `When Diane Deluna was the cyber girl in week 4 who was the cyber girl in week 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2008" ( "week_1" text, "week_2" text, "week_3" text, "week_4" text, "week_5" text ); ### SQL Given the database schema, here is the SQL query that answers `When Diane Deluna was the cyber girl in week 4 who was the cyber girl in week 2?`: ```sql
SELECT "round" FROM "fed_cup_results_10_8" WHERE "year">2011;
## Task Generate a SQL query to answer the following question: `Which Round has a Year later than 2011?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fed_cup_results_10_8" ( "year" real, "edition" text, "round" text, "date" text, "location" text, "surface" text, "against" text, "opponent_s" text, "score" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Round has a Year later than 2011?`: ```sql
SELECT "date" FROM "fed_cup_results_10_8" WHERE "result"='3–2' AND "score"='6–0, 6–4';
## Task Generate a SQL query to answer the following question: `When was the Result of 3–2, with a Score of 6–0, 6–4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fed_cup_results_10_8" ( "year" real, "edition" text, "round" text, "date" text, "location" text, "surface" text, "against" text, "opponent_s" text, "score" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `When was the Result of 3–2, with a Score of 6–0, 6–4?`: ```sql
SELECT "surface" FROM "fed_cup_results_10_8" WHERE "opponent_s"='anna-lena grönefeld tatjana malek';
## Task Generate a SQL query to answer the following question: `Which Surface has an Opponent(s) of anna-lena grönefeld tatjana malek?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fed_cup_results_10_8" ( "year" real, "edition" text, "round" text, "date" text, "location" text, "surface" text, "against" text, "opponent_s" text, "score" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Surface has an Opponent(s) of anna-lena grönefeld tatjana malek?`: ```sql
SELECT AVG("year") FROM "fed_cup_results_10_8" WHERE "date"='5–6 february';
## Task Generate a SQL query to answer the following question: `Which Year has a Date of 5–6 february?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fed_cup_results_10_8" ( "year" real, "edition" text, "round" text, "date" text, "location" text, "surface" text, "against" text, "opponent_s" text, "score" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Year has a Date of 5–6 february?`: ```sql
SELECT "home_team" FROM "third_round_proper" WHERE "tie_no"='27';
## Task Generate a SQL query to answer the following question: `What home team has 27 as the tie no.?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What home team has 27 as the tie no.?`: ```sql
SELECT "date" FROM "third_round_proper" WHERE "tie_no"='1';
## Task Generate a SQL query to answer the following question: `What date has 1 as the tie no.?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What date has 1 as the tie no.?`: ```sql
SELECT "score" FROM "third_round_proper" WHERE "away_team"='west ham united';
## Task Generate a SQL query to answer the following question: `What score has west ham united as the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What score has west ham united as the away team?`: ```sql
SELECT "home_team" FROM "third_round_proper" WHERE "away_team"='southampton';
## Task Generate a SQL query to answer the following question: `What home team has Southampton as the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round_proper" ( "tie_no" text, "home_team" text, "score" text, "away_team" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What home team has Southampton as the away team?`: ```sql
SELECT "current_club" FROM "fiba_world_olympic_qualifying_tournament" WHERE "height"=1.96;
## Task Generate a SQL query to answer the following question: `What current club has a Height of 1.96?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fiba_world_olympic_qualifying_tournament" ( "player" text, "height" real, "position" text, "year_born_age" text, "current_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What current club has a Height of 1.96?`: ```sql
SELECT "year_born_age" FROM "fiba_world_olympic_qualifying_tournament" WHERE "position"='f/c';
## Task Generate a SQL query to answer the following question: `What is the Age of f/c Posiiton?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fiba_world_olympic_qualifying_tournament" ( "player" text, "height" real, "position" text, "year_born_age" text, "current_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Age of f/c Posiiton?`: ```sql
SELECT "player" FROM "third_round" WHERE "score"='70-68-70=208';
## Task Generate a SQL query to answer the following question: `Who is the player with a score of 70-68-70=208?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the player with a score of 70-68-70=208?`: ```sql
SELECT "place" FROM "third_round" WHERE "score"='70-68-70=208';
## Task Generate a SQL query to answer the following question: `What place is the player with score of 70-68-70=208 from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What place is the player with score of 70-68-70=208 from?`: ```sql
SELECT "name_in_malay" FROM "ministry_of_higher_education" WHERE "foundation"='iptura';
## Task Generate a SQL query to answer the following question: `What is the name for Malay with a foundation in Iptura?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ministry_of_higher_education" ( "name_in_english" text, "name_in_malay" text, "acronym" text, "foundation" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name for Malay with a foundation in Iptura?`: ```sql
SELECT "acronym" FROM "ministry_of_higher_education" WHERE "name_in_malay"='kolej komuniti sungai petani';
## Task Generate a SQL query to answer the following question: `What is the acronym for the name Malay of Kolej Komuniti Sungai Petani?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ministry_of_higher_education" ( "name_in_english" text, "name_in_malay" text, "acronym" text, "foundation" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the acronym for the name Malay of Kolej Komuniti Sungai Petani?`: ```sql
SELECT "acronym" FROM "ministry_of_higher_education" WHERE "name_in_english"='northern management and technological institute';
## Task Generate a SQL query to answer the following question: `What is the acronym for the English name Northern management and technological institute?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ministry_of_higher_education" ( "name_in_english" text, "name_in_malay" text, "acronym" text, "foundation" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the acronym for the English name Northern management and technological institute?`: ```sql
SELECT "location" FROM "ministry_of_higher_education" WHERE "foundation"='kkspe';
## Task Generate a SQL query to answer the following question: `What is the location of the Kkspe Foundation?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ministry_of_higher_education" ( "name_in_english" text, "name_in_malay" text, "acronym" text, "foundation" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the location of the Kkspe Foundation?`: ```sql
SELECT "country" FROM "second_round" WHERE "place"='t3' AND "score"='67-70=137';
## Task Generate a SQL query to answer the following question: `What is Country, when Place is "T3", and when Score is "67-70=137"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Country, when Place is "T3", and when Score is "67-70=137"?`: ```sql
SELECT "score" FROM "second_round" WHERE "player"='david toms';
## Task Generate a SQL query to answer the following question: `What is Score, when Player is "David Toms"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Score, when Player is "David Toms"?`: ```sql
SELECT "score" FROM "second_round" WHERE "player"='tom lehman';
## Task Generate a SQL query to answer the following question: `What is Score, when Player is "Tom Lehman"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "second_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Score, when Player is "Tom Lehman"?`: ```sql
SELECT "title" FROM "release_history" WHERE "format"='mono lp' AND "label"='pye';
## Task Generate a SQL query to answer the following question: `What is the Title of the Pye Label mono LP release?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "title" text, "label" text, "format" text, "catalog_nr" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Title of the Pye Label mono LP release?`: ```sql
SELECT "catalog_nr" FROM "release_history" WHERE "format"='stereo lp' AND "label"='epic' AND "title"='for little ones';
## Task Generate a SQL query to answer the following question: `What is the Catalog-Nr of the Epic Label Stereo LP named For Little Ones?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "title" text, "label" text, "format" text, "catalog_nr" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Catalog-Nr of the Epic Label Stereo LP named For Little Ones?`: ```sql
SELECT "assumed_office" FROM "rank_by_time_in_office" WHERE "rank"=22;
## Task Generate a SQL query to answer the following question: `What is the assumed office date of the prime minister ranked 22?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rank_by_time_in_office" ( "rank" real, "prime_minister" text, "party" text, "assumed_office" text, "left_office" text, "total_time_in_office" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the assumed office date of the prime minister ranked 22?`: ```sql
SELECT "total_time_in_office" FROM "rank_by_time_in_office" WHERE "party"='liberal' AND "left_office"='19 december 1967';
## Task Generate a SQL query to answer the following question: `What is the total time in office of the prime minister from the liberal party and left office in 19 December 1967?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rank_by_time_in_office" ( "rank" real, "prime_minister" text, "party" text, "assumed_office" text, "left_office" text, "total_time_in_office" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total time in office of the prime minister from the liberal party and left office in 19 December 1967?`: ```sql
SELECT "party" FROM "rank_by_time_in_office" WHERE "left_office"='11 march 1983';
## Task Generate a SQL query to answer the following question: `What is the party of the prime minister who left office on 11 March 1983?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "rank_by_time_in_office" ( "rank" real, "prime_minister" text, "party" text, "assumed_office" text, "left_office" text, "total_time_in_office" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the party of the prime minister who left office on 11 March 1983?`: ```sql
SELECT COUNT("area_km_2") FROM "westmorland_county_new_brunswick" WHERE "census_ranking"='3,129 of 5,008' AND "population"<460;
## Task Generate a SQL query to answer the following question: `What is the total area with the census ranking of 3,129 of 5,008, and a Population smaller than 460?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "westmorland_county_new_brunswick" ( "official_name" text, "status" text, "area_km_2" real, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total area with the census ranking of 3,129 of 5,008, and a Population smaller than 460?`: ```sql
SELECT COUNT("area_km_2") FROM "westmorland_county_new_brunswick" WHERE "census_ranking"='3,129 of 5,008' AND "population">460;
## Task Generate a SQL query to answer the following question: `What is the total area with the Census Ranking of 3,129 of 5,008, and a Population larger than 460?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "westmorland_county_new_brunswick" ( "official_name" text, "status" text, "area_km_2" real, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the total area with the Census Ranking of 3,129 of 5,008, and a Population larger than 460?`: ```sql
SELECT "census_ranking" FROM "westmorland_county_new_brunswick" WHERE "area_km_2">578.28;
## Task Generate a SQL query to answer the following question: `What census ranking has an area greater than 578.28 km2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "westmorland_county_new_brunswick" ( "official_name" text, "status" text, "area_km_2" real, "population" real, "census_ranking" text ); ### SQL Given the database schema, here is the SQL query that answers `What census ranking has an area greater than 578.28 km2?`: ```sql
SELECT "position" FROM "draft_picks" WHERE "player"='jani lajunen';
## Task Generate a SQL query to answer the following question: `What is the position for Jani Lajunen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "draft_picks" ( "round" real, "pick" text, "player" text, "position" text, "nationality" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the position for Jani Lajunen?`: ```sql
SELECT COUNT("round") FROM "draft_picks" WHERE "nationality"='united states' AND "player"='jeffrey foss';
## Task Generate a SQL query to answer the following question: `What is the round number when nationality was United States, and player is Jeffrey Foss?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "draft_picks" ( "round" real, "pick" text, "player" text, "position" text, "nationality" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the round number when nationality was United States, and player is Jeffrey Foss?`: ```sql
SELECT "player" FROM "draft_picks" WHERE "round">2 AND "position"='(d)';
## Task Generate a SQL query to answer the following question: `What player has a round larger than 2, and position of (d)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "draft_picks" ( "round" real, "pick" text, "player" text, "position" text, "nationality" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What player has a round larger than 2, and position of (d)?`: ```sql
SELECT "nationality" FROM "draft_picks" WHERE "position"='(d)' AND "college"='sc bern ( swiss )';
## Task Generate a SQL query to answer the following question: `What is the nationality for the position of (d), and college was SC Bern ( Swiss )?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "draft_picks" ( "round" real, "pick" text, "player" text, "position" text, "nationality" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality for the position of (d), and college was SC Bern ( Swiss )?`: ```sql
SELECT "athlete" FROM "men" WHERE "run_1">54.95 AND "run_2"=56.19;
## Task Generate a SQL query to answer the following question: `Who is the athlete with a run 1 larger than 54.95 and a 56.19 run 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "men" ( "athlete" text, "country" text, "run_1" real, "run_2" real, "run_3" real ); ### SQL Given the database schema, here is the SQL query that answers `Who is the athlete with a run 1 larger than 54.95 and a 56.19 run 2?`: ```sql
SELECT MAX("run_2") FROM "men" WHERE "athlete"='eric neilson' AND "run_3">55.97;
## Task Generate a SQL query to answer the following question: `What is the highest run 2 of athlete eric neilson, who has a run 3 larger than 55.97?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "men" ( "athlete" text, "country" text, "run_1" real, "run_2" real, "run_3" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest run 2 of athlete eric neilson, who has a run 3 larger than 55.97?`: ```sql
SELECT MAX("run_3") FROM "men" WHERE "run_2"=55.44;
## Task Generate a SQL query to answer the following question: `What is the highest run 3 of the athlete with a 55.44 run 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "men" ( "athlete" text, "country" text, "run_1" real, "run_2" real, "run_3" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest run 3 of the athlete with a 55.44 run 2?`: ```sql
SELECT "athlete" FROM "men" WHERE "run_1"<54.13 AND "run_3"=55.21;
## Task Generate a SQL query to answer the following question: `Who is the athlete with a run 1 less than 54.13 and a 55.21 run 3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "men" ( "athlete" text, "country" text, "run_1" real, "run_2" real, "run_3" real ); ### SQL Given the database schema, here is the SQL query that answers `Who is the athlete with a run 1 less than 54.13 and a 55.21 run 3?`: ```sql
SELECT SUM("run_1") FROM "men" WHERE "run_2">55.24 AND "athlete"='matthias guggenberger';
## Task Generate a SQL query to answer the following question: `What is the sum of the run 1 of athlete matthias guggenberger, who has a run 2 greater than 55.24?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "men" ( "athlete" text, "country" text, "run_1" real, "run_2" real, "run_3" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of the run 1 of athlete matthias guggenberger, who has a run 2 greater than 55.24?`: ```sql
SELECT "dissolved" FROM "parliaments_of_king_edward_iv" WHERE "assembled"='3 june 1467';
## Task Generate a SQL query to answer the following question: `What is the dissolved date of the parliament assembled on 3 June 1467?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_iv" ( "summoned" text, "elected" text, "assembled" text, "dissolved" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the dissolved date of the parliament assembled on 3 June 1467?`: ```sql
SELECT "dissolved" FROM "parliaments_of_king_edward_iv" WHERE "assembled"='4 november 1461';
## Task Generate a SQL query to answer the following question: `What is the dissolved date of the parliament assembled on 4 November 1461?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_iv" ( "summoned" text, "elected" text, "assembled" text, "dissolved" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the dissolved date of the parliament assembled on 4 November 1461?`: ```sql
SELECT "assembled" FROM "parliaments_of_king_edward_iv" WHERE "2nd_member"='unknown' AND "elected"='1482/83';
## Task Generate a SQL query to answer the following question: `What is the assembled date of the parliament with an unknown 2nd member who was elected in 1482/83?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_iv" ( "summoned" text, "elected" text, "assembled" text, "dissolved" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the assembled date of the parliament with an unknown 2nd member who was elected in 1482/83?`: ```sql
SELECT "dissolved" FROM "parliaments_of_king_edward_iv" WHERE "2nd_member"='unknown' AND "assembled"='4 november 1461';
## Task Generate a SQL query to answer the following question: `What is the dissolved date of the parliament assembled on 4 November 1461 with an unknown 2nd member?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_iv" ( "summoned" text, "elected" text, "assembled" text, "dissolved" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the dissolved date of the parliament assembled on 4 November 1461 with an unknown 2nd member?`: ```sql
SELECT "2nd_member" FROM "parliaments_of_king_edward_iv" WHERE "elected"='1461';
## Task Generate a SQL query to answer the following question: `Who is the 2nd member elected in 1461?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_iv" ( "summoned" text, "elected" text, "assembled" text, "dissolved" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the 2nd member elected in 1461?`: ```sql
SELECT "dissolved" FROM "parliaments_of_king_edward_iv" WHERE "summoned"='28 february 1467';
## Task Generate a SQL query to answer the following question: `What is the dissolved date of the parliament summoned on 28 February 1467?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_iv" ( "summoned" text, "elected" text, "assembled" text, "dissolved" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the dissolved date of the parliament summoned on 28 February 1467?`: ```sql
SELECT "2nd_member" FROM "parliaments_of_king_edward_i" WHERE "assembled"='30 march 1298';
## Task Generate a SQL query to answer the following question: `What is 2nd Member, when Assembled is "30 March 1298"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_i" ( "summoned" text, "elected" text, "assembled" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is 2nd Member, when Assembled is "30 March 1298"?`: ```sql
SELECT "assembled" FROM "parliaments_of_king_edward_i" WHERE "2nd_member"='unknown';
## Task Generate a SQL query to answer the following question: `What is Assembled, when 2nd Member is "Unknown"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_i" ( "summoned" text, "elected" text, "assembled" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Assembled, when 2nd Member is "Unknown"?`: ```sql
SELECT "1st_member" FROM "parliaments_of_king_edward_i" WHERE "summoned"='14 july 1302';
## Task Generate a SQL query to answer the following question: `What is 1st Member, when Summoned is "14 July 1302"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_i" ( "summoned" text, "elected" text, "assembled" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is 1st Member, when Summoned is "14 July 1302"?`: ```sql
SELECT "assembled" FROM "parliaments_of_king_edward_i" WHERE "summoned"='6 october 1297';
## Task Generate a SQL query to answer the following question: `What is Assembled, when Summoned is "6 October 1297"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_i" ( "summoned" text, "elected" text, "assembled" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Assembled, when Summoned is "6 October 1297"?`: ```sql
SELECT "1st_member" FROM "parliaments_of_king_edward_i" WHERE "2nd_member"='william benne' AND "elected"='1300/01';
## Task Generate a SQL query to answer the following question: `What is 1st Member, when 2nd Member is "William Benne", and when Elected is "1300/01"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_i" ( "summoned" text, "elected" text, "assembled" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is 1st Member, when 2nd Member is "William Benne", and when Elected is "1300/01"?`: ```sql
SELECT "summoned" FROM "parliaments_of_king_edward_i" WHERE "elected"='march 1298';
## Task Generate a SQL query to answer the following question: `What is Summoned, when Elected is "March 1298"?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "parliaments_of_king_edward_i" ( "summoned" text, "elected" text, "assembled" text, "1st_member" text, "2nd_member" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Summoned, when Elected is "March 1298"?`: ```sql
SELECT "planet" FROM "weekdays" WHERE "sanskrit_word"='budha';
## Task Generate a SQL query to answer the following question: `Which Planet has a Sanskrit word of budha?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekdays" ( "english_name" text, "thai_name" text, "transcription" text, "color" text, "sanskrit_word" text, "planet" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Planet has a Sanskrit word of budha?`: ```sql
SELECT "thai_name" FROM "weekdays" WHERE "transcription"='wan phruehatsabodi';
## Task Generate a SQL query to answer the following question: `WHich Thai name has a Transcription of wan phruehatsabodi?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekdays" ( "english_name" text, "thai_name" text, "transcription" text, "color" text, "sanskrit_word" text, "planet" text ); ### SQL Given the database schema, here is the SQL query that answers `WHich Thai name has a Transcription of wan phruehatsabodi?`: ```sql
SELECT "thai_name" FROM "weekdays" WHERE "transcription"='wan phruehatsabodi';
## Task Generate a SQL query to answer the following question: `Show the Thai name of wan phruehatsabodi?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekdays" ( "english_name" text, "thai_name" text, "transcription" text, "color" text, "sanskrit_word" text, "planet" text ); ### SQL Given the database schema, here is the SQL query that answers `Show the Thai name of wan phruehatsabodi?`: ```sql
SELECT "color" FROM "weekdays" WHERE "thai_name"='วันพฤหัสบดี';
## Task Generate a SQL query to answer the following question: `Show the Color which has a Thai name of วันพฤหัสบดี?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekdays" ( "english_name" text, "thai_name" text, "transcription" text, "color" text, "sanskrit_word" text, "planet" text ); ### SQL Given the database schema, here is the SQL query that answers `Show the Color which has a Thai name of วันพฤหัสบดี?`: ```sql
SELECT "color" FROM "weekdays" WHERE "transcription"='wan suk';
## Task Generate a SQL query to answer the following question: `Which Color has a Transcription of wan suk?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekdays" ( "english_name" text, "thai_name" text, "transcription" text, "color" text, "sanskrit_word" text, "planet" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Color has a Transcription of wan suk?`: ```sql
SELECT "english_name" FROM "weekdays" WHERE "color"='green';
## Task Generate a SQL query to answer the following question: `Which English name has a Color of green?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "weekdays" ( "english_name" text, "thai_name" text, "transcription" text, "color" text, "sanskrit_word" text, "planet" text ); ### SQL Given the database schema, here is the SQL query that answers `Which English name has a Color of green?`: ```sql
SELECT "place" FROM "third_round" WHERE "player"='gil morgan';
## Task Generate a SQL query to answer the following question: `What is Gil Morgan's Place?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Gil Morgan's Place?`: ```sql
SELECT "place" FROM "third_round" WHERE "to_par"='–5';
## Task Generate a SQL query to answer the following question: `What is the Place of the Player with a To par of –5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_round" ( "place" text, "player" text, "country" text, "score" text, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Place of the Player with a To par of –5?`: ```sql
SELECT "player" FROM "final_leaderboard" WHERE "money"=137 AND "score"='73-70-73-74=290';
## Task Generate a SQL query to answer the following question: `Which Player has a Money ($) of 137, and a Score of 73-70-73-74=290?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_leaderboard" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Player has a Money ($) of 137, and a Score of 73-70-73-74=290?`: ```sql
SELECT "to_par" FROM "final_leaderboard" WHERE "money"=350 AND "player"='henry picard';
## Task Generate a SQL query to answer the following question: `Which To Par has a Money ($) of 350, and a Player of henry picard?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_leaderboard" ( "place" text, "player" text, "country" text, "score" text, "to_par" text, "money" real ); ### SQL Given the database schema, here is the SQL query that answers `Which To Par has a Money ($) of 350, and a Player of henry picard?`: ```sql
SELECT SUM("year") FROM "original_london_production" WHERE "category"='best actor in a musical';
## Task Generate a SQL query to answer the following question: `What year had Best Actor in a Musical as a category?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "original_london_production" ( "year" real, "award" text, "category" text, "nominee" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What year had Best Actor in a Musical as a category?`: ```sql
SELECT "secretary" FROM "past_composition_of_the_executive_board" WHERE "social_ao"='lieke de boer';
## Task Generate a SQL query to answer the following question: `What Secretary has a Social AO of lieke de boer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_composition_of_the_executive_board" ( "president" text, "treasurer" text, "secretary" text, "social_ao" text, "academic_ao" text, "internal_co" text, "external_co" text ); ### SQL Given the database schema, here is the SQL query that answers `What Secretary has a Social AO of lieke de boer?`: ```sql
SELECT "social_ao" FROM "past_composition_of_the_executive_board" WHERE "external_co"='elena buscher' AND "president"='harm van leeuwen';
## Task Generate a SQL query to answer the following question: `What Social AO has an External CO of elena buscher, and a President of harm van leeuwen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_composition_of_the_executive_board" ( "president" text, "treasurer" text, "secretary" text, "social_ao" text, "academic_ao" text, "internal_co" text, "external_co" text ); ### SQL Given the database schema, here is the SQL query that answers `What Social AO has an External CO of elena buscher, and a President of harm van leeuwen?`: ```sql
SELECT "social_ao" FROM "past_composition_of_the_executive_board" WHERE "external_co"='simonas savickas' AND "internal_co"='pieter kuijsten';
## Task Generate a SQL query to answer the following question: `What Social AO has an External CO of simonas savickas, and an Internal CO of pieter kuijsten?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_composition_of_the_executive_board" ( "president" text, "treasurer" text, "secretary" text, "social_ao" text, "academic_ao" text, "internal_co" text, "external_co" text ); ### SQL Given the database schema, here is the SQL query that answers `What Social AO has an External CO of simonas savickas, and an Internal CO of pieter kuijsten?`: ```sql
SELECT "secretary" FROM "past_composition_of_the_executive_board" WHERE "internal_co"='isabel voets';
## Task Generate a SQL query to answer the following question: `What Secretary has an Internal CO of isabel voets?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_composition_of_the_executive_board" ( "president" text, "treasurer" text, "secretary" text, "social_ao" text, "academic_ao" text, "internal_co" text, "external_co" text ); ### SQL Given the database schema, here is the SQL query that answers `What Secretary has an Internal CO of isabel voets?`: ```sql
SELECT "academic_ao" FROM "past_composition_of_the_executive_board" WHERE "president"='harm van leeuwen';
## Task Generate a SQL query to answer the following question: `What Academic AO has a President of harm van leeuwen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_composition_of_the_executive_board" ( "president" text, "treasurer" text, "secretary" text, "social_ao" text, "academic_ao" text, "internal_co" text, "external_co" text ); ### SQL Given the database schema, here is the SQL query that answers `What Academic AO has a President of harm van leeuwen?`: ```sql
SELECT "social_ao" FROM "past_composition_of_the_executive_board" WHERE "president"='harm van leeuwen';
## Task Generate a SQL query to answer the following question: `What Social AO has a President of harm van leeuwen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "past_composition_of_the_executive_board" ( "president" text, "treasurer" text, "secretary" text, "social_ao" text, "academic_ao" text, "internal_co" text, "external_co" text ); ### SQL Given the database schema, here is the SQL query that answers `What Social AO has a President of harm van leeuwen?`: ```sql
SELECT "country" FROM "first_round" WHERE "to_par"='+2' AND "player"='bernhard langer';
## Task Generate a SQL query to answer the following question: `Which country has a to par of +2 for Bernhard Langer?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_round" ( "place" text, "player" text, "country" text, "score" real, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which country has a to par of +2 for Bernhard Langer?`: ```sql
SELECT "country" FROM "first_round" WHERE "score"=72 AND "player"='andrew brooks';
## Task Generate a SQL query to answer the following question: `Which country has a score of 72 by Andrew Brooks?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_round" ( "place" text, "player" text, "country" text, "score" real, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `Which country has a score of 72 by Andrew Brooks?`: ```sql
SELECT "score" FROM "first_round" WHERE "to_par"='+1' AND "player"='anders forsbrand';
## Task Generate a SQL query to answer the following question: `What is Anders Forsbrand's score with a to par of +1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "first_round" ( "place" text, "player" text, "country" text, "score" real, "to_par" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Anders Forsbrand's score with a to par of +1?`: ```sql
SELECT "road_number" FROM "see_also" WHERE "type"='dead end' AND "rank"='22';
## Task Generate a SQL query to answer the following question: `What is the rad number for the dead end in rank 22?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank" text, "height" text, "name" text, "road_number" text, "type" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the rad number for the dead end in rank 22?`: ```sql
SELECT "name" FROM "see_also" WHERE "type"='dead end' AND "rank"='22';
## Task Generate a SQL query to answer the following question: `What is the name of the dead end type ranked 22?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank" text, "height" text, "name" text, "road_number" text, "type" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the dead end type ranked 22?`: ```sql
SELECT "type" FROM "see_also" WHERE "rank"='13';
## Task Generate a SQL query to answer the following question: `What is the type ranked 13?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "see_also" ( "rank" text, "height" text, "name" text, "road_number" text, "type" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the type ranked 13?`: ```sql
SELECT "name" FROM "standings" WHERE "points"=1344;
## Task Generate a SQL query to answer the following question: `Who had 1344 points?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "standings" ( "position" real, "number" real, "name" text, "team" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `Who had 1344 points?`: ```sql
SELECT SUM("wins") FROM "2012_ladder" WHERE "against">1136 AND "losses"<15 AND "golden_rivers"='ultima' AND "byes"<2;
## Task Generate a SQL query to answer the following question: `What was the total number of wins that had an against greater than 1136 but losses less than 15 with Ultima with less than 2 byes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_ladder" ( "golden_rivers" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the total number of wins that had an against greater than 1136 but losses less than 15 with Ultima with less than 2 byes?`: ```sql
SELECT AVG("wins") FROM "2012_ladder" WHERE "byes"<2;
## Task Generate a SQL query to answer the following question: `What's the average number of wins for those with less than 2 byes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_ladder" ( "golden_rivers" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the average number of wins for those with less than 2 byes?`: ```sql
SELECT MAX("losses") FROM "2012_ladder" WHERE "wins">13;
## Task Generate a SQL query to answer the following question: `What's the greatest losses for those with more than 13 wins?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_ladder" ( "golden_rivers" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the greatest losses for those with more than 13 wins?`: ```sql
SELECT MAX("wins") FROM "2012_ladder" WHERE "losses"=7 AND "draws">0;
## Task Generate a SQL query to answer the following question: `What was the greatest number of wins for a team that had 7 losses and more than 0 draws?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_ladder" ( "golden_rivers" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the greatest number of wins for a team that had 7 losses and more than 0 draws?`: ```sql
SELECT SUM("byes") FROM "2012_ladder" WHERE "wins"=7 AND "against">1412;
## Task Generate a SQL query to answer the following question: `What's the number of byes for someone who had 7 wins and an against number greater than 1412?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_ladder" ( "golden_rivers" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the number of byes for someone who had 7 wins and an against number greater than 1412?`: ```sql
SELECT COUNT("wins") FROM "2012_ladder" WHERE "byes">2;
## Task Generate a SQL query to answer the following question: `What's the total wins of a team with more than 2 byes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_ladder" ( "golden_rivers" text, "wins" real, "byes" real, "losses" real, "draws" real, "against" real ); ### SQL Given the database schema, here is the SQL query that answers `What's the total wins of a team with more than 2 byes?`: ```sql
SELECT "player" FROM "made_the_cut" WHERE "finish"='t16';
## Task Generate a SQL query to answer the following question: `Who had a finish of t16?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `Who had a finish of t16?`: ```sql
SELECT "country" FROM "made_the_cut" WHERE "player"='jack nicklaus';
## Task Generate a SQL query to answer the following question: `What country is jack nicklaus from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `What country is jack nicklaus from?`: ```sql
SELECT "player" FROM "made_the_cut" WHERE "total"=272;
## Task Generate a SQL query to answer the following question: `Who has a total of 272?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `Who has a total of 272?`: ```sql
SELECT "country" FROM "made_the_cut" WHERE "year_s_won"='1977';
## Task Generate a SQL query to answer the following question: `What country won in 1977?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "made_the_cut" ( "player" text, "country" text, "year_s_won" text, "total" real, "to_par" text, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `What country won in 1977?`: ```sql