output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "away_team_score" FROM "round_10" WHERE "away_team"='south melbourne';
## Task Generate a SQL query to answer the following question: `Tell me the away team score for away team of south melbourne` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the away team score for away team of south melbourne`: ```sql
SELECT "away_team_score" FROM "round_10" WHERE "venue"='vfl park';
## Task Generate a SQL query to answer the following question: `I want to know the away team score for vfl park venue` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `I want to know the away team score for vfl park venue`: ```sql
SELECT COUNT("track") FROM "track_listing" WHERE "translation"='the fallen angel';
## Task Generate a SQL query to answer the following question: `Name the total number of tracks for of the fallen angel` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "track_listing" ( "track" real, "title" text, "translation" text, "composer" text, "recorded" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of tracks for of the fallen angel`: ```sql
SELECT "driver" FROM "drivers_and_constructors" WHERE "chassis"='193' AND "rounds"='14';
## Task Generate a SQL query to answer the following question: `What driver went 14 rounds with a 193 Chassis?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drivers_and_constructors" ( "entrant" text, "constructor" text, "chassis" text, "engine" text, "tyre" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `What driver went 14 rounds with a 193 Chassis?`: ```sql
SELECT "engine" FROM "drivers_and_constructors" WHERE "chassis"='fa13b fa14' AND "driver"='aguri suzuki';
## Task Generate a SQL query to answer the following question: `What engine was used when Aguri Suzuki drove the FA13B FA14 Chassis?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drivers_and_constructors" ( "entrant" text, "constructor" text, "chassis" text, "engine" text, "tyre" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `What engine was used when Aguri Suzuki drove the FA13B FA14 Chassis?`: ```sql
SELECT "entrant" FROM "drivers_and_constructors" WHERE "rounds"='all' AND "driver"='jean alesi';
## Task Generate a SQL query to answer the following question: `Who was the entrant for all the round with Jean Alesi?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drivers_and_constructors" ( "entrant" text, "constructor" text, "chassis" text, "engine" text, "tyre" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the entrant for all the round with Jean Alesi?`: ```sql
SELECT "engine" FROM "drivers_and_constructors" WHERE "driver"='riccardo patrese';
## Task Generate a SQL query to answer the following question: `What engine did Riccardo Patrese use?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "drivers_and_constructors" ( "entrant" text, "constructor" text, "chassis" text, "engine" text, "tyre" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `What engine did Riccardo Patrese use?`: ```sql
SELECT "venue" FROM "round_12" WHERE "home_team"='footscray';
## Task Generate a SQL query to answer the following question: `If the home team was footscray which venue did they play it?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_12" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `If the home team was footscray which venue did they play it?`: ```sql
SELECT "home_team_score" FROM "round_12" WHERE "home_team"='footscray';
## Task Generate a SQL query to answer the following question: `When the home team was footscray what did they score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_12" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `When the home team was footscray what did they score?`: ```sql
SELECT "home_team_score" FROM "round_12" WHERE "home_team"='north melbourne';
## Task Generate a SQL query to answer the following question: `When the home team north melbourne was playing what did they score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_12" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `When the home team north melbourne was playing what did they score?`: ```sql
SELECT "score" FROM "results" WHERE "opponents"='fc bayern munich' AND "date"='september 20, 2005';
## Task Generate a SQL query to answer the following question: `What is the score of the September 20, 2005 match when the Opponents are FC Bayern Munich?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "opponents" text, "score" text, "competition" text, "match_report" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the score of the September 20, 2005 match when the Opponents are FC Bayern Munich?`: ```sql
SELECT "match_report" FROM "results" WHERE "date"='july 10, 2005';
## Task Generate a SQL query to answer the following question: `What is the match report for July 10, 2005?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "opponents" text, "score" text, "competition" text, "match_report" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the match report for July 10, 2005?`: ```sql
SELECT "date" FROM "results" WHERE "opponents"='1. fc nuremberg' AND "competition"='gc';
## Task Generate a SQL query to answer the following question: `What is the date of the GC competition when the opponents are 1. FC Nuremberg?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "opponents" text, "score" text, "competition" text, "match_report" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of the GC competition when the opponents are 1. FC Nuremberg?`: ```sql
SELECT "competition" FROM "results" WHERE "date"='september 10, 2005';
## Task Generate a SQL query to answer the following question: `Which competition was held on September 10, 2005?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "opponents" text, "score" text, "competition" text, "match_report" text ); ### SQL Given the database schema, here is the SQL query that answers `Which competition was held on September 10, 2005?`: ```sql
SELECT "competition" FROM "results" WHERE "score"='3-0';
## Task Generate a SQL query to answer the following question: `In which competition was the score 3-0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "date" text, "opponents" text, "score" text, "competition" text, "match_report" text ); ### SQL Given the database schema, here is the SQL query that answers `In which competition was the score 3-0?`: ```sql
SELECT "visitor" FROM "april" WHERE "home"='lakers' AND "score"='85–106';
## Task Generate a SQL query to answer the following question: `Who was the visitor when the lakers were at home with a Score of 85–106?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "april" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the visitor when the lakers were at home with a Score of 85–106?`: ```sql
SELECT "date_of_birth" FROM "players_who_made_their_debut_for_the_gee" WHERE "goals"<4 AND "games">1 AND "years_at_club"='1945' AND "player"='jim young';
## Task Generate a SQL query to answer the following question: `what is the date of birth for the player with goals less than 4, games more than 1, years at club, 1945 and named jim young?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "players_who_made_their_debut_for_the_gee" ( "debut_year" real, "player" text, "date_of_birth" text, "games" real, "goals" real, "years_at_club" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the date of birth for the player with goals less than 4, games more than 1, years at club, 1945 and named jim young?`: ```sql
SELECT AVG("debut_year") FROM "players_who_made_their_debut_for_the_gee" WHERE "player"='terry fulton' AND "games"<51;
## Task Generate a SQL query to answer the following question: `what is the debut year for player terry fulton with games less than 51?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "players_who_made_their_debut_for_the_gee" ( "debut_year" real, "player" text, "date_of_birth" text, "games" real, "goals" real, "years_at_club" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the debut year for player terry fulton with games less than 51?`: ```sql
SELECT AVG("crowd") FROM "round_6" WHERE "venue"='victoria park';
## Task Generate a SQL query to answer the following question: `How people attended Victoria Park?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `How people attended Victoria Park?`: ```sql
SELECT "away_team_score" FROM "round_6" WHERE "away_team"='south melbourne';
## Task Generate a SQL query to answer the following question: `What is the away team score for South Melbourne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the away team score for South Melbourne?`: ```sql
SELECT "home_team" FROM "round_6" WHERE "away_team"='melbourne';
## Task Generate a SQL query to answer the following question: `Who played Melbourne as the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Who played Melbourne as the home team?`: ```sql
SELECT "away_team" FROM "round_6" WHERE "crowd">'17,000';
## Task Generate a SQL query to answer the following question: `Which away team has an attendance of more than 17,000?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_6" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Which away team has an attendance of more than 17,000?`: ```sql
SELECT "away_team" FROM "round_4" WHERE "venue"='mcg';
## Task Generate a SQL query to answer the following question: `Which away team played at MCG?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_4" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Which away team played at MCG?`: ```sql
SELECT "date" FROM "round_4" WHERE "home_team"='geelong';
## Task Generate a SQL query to answer the following question: `What was the date when Geelong was the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_4" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the date when Geelong was the home team?`: ```sql
SELECT "bowling_style" FROM "australia" WHERE "player"='damien martyn';
## Task Generate a SQL query to answer the following question: `What is Damien Martyn's bowling style?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "australia" ( "player" text, "date_of_birth" text, "batting_style" text, "bowling_style" text, "first_class_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is Damien Martyn's bowling style?`: ```sql
SELECT "batting_style" FROM "australia" WHERE "date_of_birth"='14 november 1971';
## Task Generate a SQL query to answer the following question: `What is the batting style of the player born on 14 November 1971?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "australia" ( "player" text, "date_of_birth" text, "batting_style" text, "bowling_style" text, "first_class_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the batting style of the player born on 14 November 1971?`: ```sql
SELECT "first_class_team" FROM "australia" WHERE "date_of_birth"='23 february 1973';
## Task Generate a SQL query to answer the following question: `What is the first class team of the player born on 23 February 1973?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "australia" ( "player" text, "date_of_birth" text, "batting_style" text, "bowling_style" text, "first_class_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the first class team of the player born on 23 February 1973?`: ```sql
SELECT "type" FROM "1975_2009" WHERE "eu_council_presidency"='uk' AND "president_in_office"='john major';
## Task Generate a SQL query to answer the following question: `What is the type for EU Council Presidency of UK and John Major as President-in-Office?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1975_2009" ( "year" real, "date" text, "type" text, "eu_council_presidency" text, "president_in_office" text, "host_city" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the type for EU Council Presidency of UK and John Major as President-in-Office?`: ```sql
SELECT "host_city" FROM "1975_2009" WHERE "president_in_office"='margaret thatcher' AND "year"=1981;
## Task Generate a SQL query to answer the following question: `In which host city was Margaret Thatcher the President-in-Office in 1981?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1975_2009" ( "year" real, "date" text, "type" text, "eu_council_presidency" text, "president_in_office" text, "host_city" text ); ### SQL Given the database schema, here is the SQL query that answers `In which host city was Margaret Thatcher the President-in-Office in 1981?`: ```sql
SELECT COUNT("average") FROM "final_competition_scores" WHERE "preliminaries">9.25 AND "interview">9.44 AND "evening_gown"=9.77;
## Task Generate a SQL query to answer the following question: `How many average scores have preliminary scores over 9.25, interview scores more than 9.44, and evening gown scores of 9.77?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_competition_scores" ( "country" text, "preliminaries" real, "interview" real, "swimsuit" real, "evening_gown" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `How many average scores have preliminary scores over 9.25, interview scores more than 9.44, and evening gown scores of 9.77?`: ```sql
SELECT MIN("interview") FROM "final_competition_scores" WHERE "preliminaries"<9.4 AND "evening_gown"<9.55 AND "country"='new york' AND "swimsuit">9.18;
## Task Generate a SQL query to answer the following question: `What is the least score for interview with a preliminaries score less than 9.4, evening gown score less than 9.55, and swimsuit score more than 9.18 in New York?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_competition_scores" ( "country" text, "preliminaries" real, "interview" real, "swimsuit" real, "evening_gown" real, "average" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the least score for interview with a preliminaries score less than 9.4, evening gown score less than 9.55, and swimsuit score more than 9.18 in New York?`: ```sql
SELECT "seven" FROM "in_ordinary" WHERE "date"='29 november 1690';
## Task Generate a SQL query to answer the following question: `Name the seven for 29 november 1690` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "in_ordinary" ( "date" text, "three" text, "four" text, "five" text, "seven" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the seven for 29 november 1690`: ```sql
SELECT "four" FROM "in_ordinary" WHERE "date"='6 march 1801';
## Task Generate a SQL query to answer the following question: `Name the four for 6 march 1801` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "in_ordinary" ( "date" text, "three" text, "four" text, "five" text, "seven" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the four for 6 march 1801`: ```sql
SELECT "three" FROM "in_ordinary" WHERE "four"='william prewett' AND "five"='richard ellis' AND "seven"='nicholas king' AND "date"='5 november 1693';
## Task Generate a SQL query to answer the following question: `Name the three for william prewett for four and five being richard ellis with seven being nicholas king on 5 november 1693` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "in_ordinary" ( "date" text, "three" text, "four" text, "five" text, "seven" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the three for william prewett for four and five being richard ellis with seven being nicholas king on 5 november 1693`: ```sql
SELECT "three" FROM "in_ordinary" WHERE "date"='16 december 1676';
## Task Generate a SQL query to answer the following question: `Name the three for 16 december 1676` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "in_ordinary" ( "date" text, "three" text, "four" text, "five" text, "seven" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the three for 16 december 1676`: ```sql
SELECT AVG("grid") FROM "race" WHERE "driver"='luca badoer' AND "laps">69;
## Task Generate a SQL query to answer the following question: `Tell me the average Grid for driver of Luca Badoer and Laps more than 69` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the average Grid for driver of Luca Badoer and Laps more than 69`: ```sql
SELECT "final" FROM "fencing" WHERE "athlete"='farhad rezaei';
## Task Generate a SQL query to answer the following question: `What final was Farhad Rezaei in?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fencing" ( "athlete" text, "event" text, "semifinal" text, "final" text, "rank" text ); ### SQL Given the database schema, here is the SQL query that answers `What final was Farhad Rezaei in?`: ```sql
SELECT "final" FROM "fencing" WHERE "rank"='4';
## Task Generate a SQL query to answer the following question: `What final was ranked 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fencing" ( "athlete" text, "event" text, "semifinal" text, "final" text, "rank" text ); ### SQL Given the database schema, here is the SQL query that answers `What final was ranked 4?`: ```sql
SELECT "rank" FROM "fencing" WHERE "athlete"='hamid veisi';
## Task Generate a SQL query to answer the following question: `What was the reanking of Hamid Veisi?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "fencing" ( "athlete" text, "event" text, "semifinal" text, "final" text, "rank" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the reanking of Hamid Veisi?`: ```sql
SELECT "franchise" FROM "season_records" WHERE "percentage"<0.707 AND "year">1931 AND "finish"='won 1998 world series';
## Task Generate a SQL query to answer the following question: `Which Franchise has a Percentage under 0.707, a Year larger than 1931, and the Finish was won 1998 World Series?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_records" ( "year" real, "franchise" text, "league" text, "percentage" real, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Franchise has a Percentage under 0.707, a Year larger than 1931, and the Finish was won 1998 World Series?`: ```sql
SELECT AVG("year") FROM "season_records" WHERE "finish"='lost 2001 alcs' AND "percentage">0.716;
## Task Generate a SQL query to answer the following question: `What is the average Year for the Finish of lost 2001 alcs and the Percentage is over 0.716?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_records" ( "year" real, "franchise" text, "league" text, "percentage" real, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average Year for the Finish of lost 2001 alcs and the Percentage is over 0.716?`: ```sql
SELECT "finish" FROM "season_records" WHERE "league"='al' AND "year"=1939;
## Task Generate a SQL query to answer the following question: `In the Year 1939, what was the Finish when Al was the League?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_records" ( "year" real, "franchise" text, "league" text, "percentage" real, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `In the Year 1939, what was the Finish when Al was the League?`: ```sql
SELECT "finish" FROM "season_records" WHERE "league"='nl' AND "percentage"<0.726 AND "year">1897 AND "franchise"='pittsburgh pirates';
## Task Generate a SQL query to answer the following question: `What was the Finish when NL was the League, the Percentage was under 0.726, the Year was larger than 1897, and the Franchies was the Pittsburgh Pirates?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_records" ( "year" real, "franchise" text, "league" text, "percentage" real, "finish" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the Finish when NL was the League, the Percentage was under 0.726, the Year was larger than 1897, and the Franchies was the Pittsburgh Pirates?`: ```sql
SELECT "venue" FROM "round_14" WHERE "home_team"='footscray';
## Task Generate a SQL query to answer the following question: `What was the venue when the home team was footscray?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_14" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the venue when the home team was footscray?`: ```sql
SELECT MIN("crowd") FROM "round_14" WHERE "away_team"='hawthorn';
## Task Generate a SQL query to answer the following question: `What was the crowd when the away team was hawthorn?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_14" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the crowd when the away team was hawthorn?`: ```sql
SELECT "city" FROM "girone_b" WHERE "stadium"='ciro vigorito';
## Task Generate a SQL query to answer the following question: `What city houses the Ciro Vigorito stadium?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "girone_b" ( "club" text, "city" text, "stadium" text, "capacity" real, "2011_12_season" text ); ### SQL Given the database schema, here is the SQL query that answers `What city houses the Ciro Vigorito stadium?`: ```sql
SELECT MAX("silver") FROM "medal_table" WHERE "total"=4 AND "nation"='poland' AND "gold"<1;
## Task Generate a SQL query to answer the following question: `I want to know the highest silver for total of 4 for poland and gold less than 1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `I want to know the highest silver for total of 4 for poland and gold less than 1`: ```sql
SELECT AVG("silver") FROM "medal_table" WHERE "total">1 AND "bronze"=2 AND "nation"='france' AND "gold">0;
## Task Generate a SQL query to answer the following question: `Tell me the average silver for total more than 1 with bronze of 2 for france and gold more than 0` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the average silver for total more than 1 with bronze of 2 for france and gold more than 0`: ```sql
SELECT COUNT("gold") FROM "medal_table" WHERE "silver"=1 AND "nation"='albania' AND "total"<1;
## Task Generate a SQL query to answer the following question: `Tell me the number of gold for albania with a silver of 1 and total less than 1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the number of gold for albania with a silver of 1 and total less than 1`: ```sql
SELECT AVG("gold") FROM "medal_table" WHERE "nation"='moldova' AND "bronze"<1;
## Task Generate a SQL query to answer the following question: `Tell me the average gold for moldova and bronze less than 1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the average gold for moldova and bronze less than 1`: ```sql
SELECT SUM("gold") FROM "medal_table" WHERE "bronze"<0;
## Task Generate a SQL query to answer the following question: `Tell me the sum of gold for bronze less than 0` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_table" ( "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the sum of gold for bronze less than 0`: ```sql
SELECT "tyre" FROM "world_championship_season_review" WHERE "circuit"='zandvoort';
## Task Generate a SQL query to answer the following question: `What tyre was used in the Zandvoort circuit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championship_season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What tyre was used in the Zandvoort circuit?`: ```sql
SELECT "circuit" FROM "world_championship_season_review" WHERE "constructor"='ferrari' AND "fastest_lap"='alberto ascari';
## Task Generate a SQL query to answer the following question: `Which circuit did Alberto Ascari set the fastest lap time with a Ferrari?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championship_season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Which circuit did Alberto Ascari set the fastest lap time with a Ferrari?`: ```sql
SELECT "winning_driver" FROM "world_championship_season_review" WHERE "constructor"='ferrari' AND "fastest_lap"='luigi villoresi';
## Task Generate a SQL query to answer the following question: `Who won the race with a Ferrari, were Luigi Villoresi set the fastest lap time?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championship_season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Who won the race with a Ferrari, were Luigi Villoresi set the fastest lap time?`: ```sql
SELECT "race" FROM "world_championship_season_review" WHERE "pole_position"='alberto ascari' AND "winning_driver"='alberto ascari' AND "fastest_lap"='luigi villoresi';
## Task Generate a SQL query to answer the following question: `Which race did Alberto Ascari have both the Pole position and the win, but Luigi Villoresi set the fastest lap time?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "world_championship_season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Which race did Alberto Ascari have both the Pole position and the win, but Luigi Villoresi set the fastest lap time?`: ```sql
SELECT "county" FROM "superfund_sites" WHERE "name"='broderick wood products';
## Task Generate a SQL query to answer the following question: `Which county is named broderick wood products?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "superfund_sites" ( "cerclis_id" text, "name" text, "county" text, "proposed" text, "listed" text, "construction_completed" text, "partially_deleted" text ); ### SQL Given the database schema, here is the SQL query that answers `Which county is named broderick wood products?`: ```sql
SELECT "construction_completed" FROM "superfund_sites" WHERE "name"='nelson tunnel/commodore waste rock';
## Task Generate a SQL query to answer the following question: `What construction completed is named nelson tunnel/commodore waste rock?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "superfund_sites" ( "cerclis_id" text, "name" text, "county" text, "proposed" text, "listed" text, "construction_completed" text, "partially_deleted" text ); ### SQL Given the database schema, here is the SQL query that answers `What construction completed is named nelson tunnel/commodore waste rock?`: ```sql
SELECT "cerclis_id" FROM "superfund_sites" WHERE "listed"='09/08/1983' AND "name"='marshall landfill';
## Task Generate a SQL query to answer the following question: `What is the ID of marshall landfill on 09/08/1983?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "superfund_sites" ( "cerclis_id" text, "name" text, "county" text, "proposed" text, "listed" text, "construction_completed" text, "partially_deleted" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the ID of marshall landfill on 09/08/1983?`: ```sql
SELECT "nominee" FROM "awards" WHERE "outcome"='won' AND "category"='fourth best indian film';
## Task Generate a SQL query to answer the following question: `Which nominee won the award for Fourth Best Indian Film?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "awards" ( "ceremony" text, "award" text, "category" text, "nominee" text, "outcome" text ); ### SQL Given the database schema, here is the SQL query that answers `Which nominee won the award for Fourth Best Indian Film?`: ```sql
SELECT "ceremony" FROM "awards" WHERE "nominee"='harnam singh rawail';
## Task Generate a SQL query to answer the following question: `In which ceremony was Harnam Singh Rawail nominated for an award?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "awards" ( "ceremony" text, "award" text, "category" text, "nominee" text, "outcome" text ); ### SQL Given the database schema, here is the SQL query that answers `In which ceremony was Harnam Singh Rawail nominated for an award?`: ```sql
SELECT "ceremony" FROM "awards" WHERE "nominee"='jayant';
## Task Generate a SQL query to answer the following question: `In which ceremony was Jayant nominated for an award?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "awards" ( "ceremony" text, "award" text, "category" text, "nominee" text, "outcome" text ); ### SQL Given the database schema, here is the SQL query that answers `In which ceremony was Jayant nominated for an award?`: ```sql
SELECT "surface" FROM "singles_18_8" WHERE "date"='april 24, 2003';
## Task Generate a SQL query to answer the following question: `What surface was the April 24, 2003 match played on?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_18_8" ( "edition" text, "round" text, "date" text, "surface" text, "opponent" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What surface was the April 24, 2003 match played on?`: ```sql
SELECT SUM("top_25") FROM "summary" WHERE "cuts_made"=6;
## Task Generate a SQL query to answer the following question: `How many times has Watney made the top 25 for a tournament in which he as also been cut 6 times?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `How many times has Watney made the top 25 for a tournament in which he as also been cut 6 times?`: ```sql
SELECT MAX("cuts_made") FROM "summary" WHERE "top_25"=4;
## Task Generate a SQL query to answer the following question: `Which tournament has the highest number of cuts while also having 4 top 25 appearances?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `Which tournament has the highest number of cuts while also having 4 top 25 appearances?`: ```sql
SELECT MIN("grid") FROM "race" WHERE "time_retired"='collision' AND "driver"='pedro diniz';
## Task Generate a SQL query to answer the following question: `What is the smallest grid with collision as the Time/Retired for pedro diniz?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest grid with collision as the Time/Retired for pedro diniz?`: ```sql
SELECT COUNT("laps") FROM "race" WHERE "grid"=14;
## Task Generate a SQL query to answer the following question: `What is the number of laps for Grid 14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of laps for Grid 14?`: ```sql
SELECT COUNT("grid") FROM "race" WHERE "driver"='mika häkkinen' AND "laps">45;
## Task Generate a SQL query to answer the following question: `What is the number of the grid for mika häkkinen and more than 45 laps?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of the grid for mika häkkinen and more than 45 laps?`: ```sql
SELECT "home_team" FROM "round_8" WHERE "crowd">'19,000';
## Task Generate a SQL query to answer the following question: `Which home team has more than 19,000 spectators?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_8" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Which home team has more than 19,000 spectators?`: ```sql
SELECT "theme" FROM "canadian_floral_collection" WHERE "artist"='christie paquet' AND "issue_price"='$34.95' AND "year">2004;
## Task Generate a SQL query to answer the following question: `What is the Theme of Christie Paquet after 2004 with an Issue Price of $34.95?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "canadian_floral_collection" ( "year" real, "theme" text, "artist" text, "finish" text, "issue_price" text, "total_mintage" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the Theme of Christie Paquet after 2004 with an Issue Price of $34.95?`: ```sql
SELECT AVG("year") FROM "canadian_floral_collection" WHERE "artist"='christie paquet' AND "issue_price"='$34.95';
## Task Generate a SQL query to answer the following question: `What is the Year of Christie Paquet with Issue Price of $34.95?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "canadian_floral_collection" ( "year" real, "theme" text, "artist" text, "finish" text, "issue_price" text, "total_mintage" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the Year of Christie Paquet with Issue Price of $34.95?`: ```sql
SELECT "crowd" FROM "round_16" WHERE "venue"='princes park';
## Task Generate a SQL query to answer the following question: `What is the Crowd for the Venue of Princes Park?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_16" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Crowd for the Venue of Princes Park?`: ```sql
SELECT "home_team_score" FROM "round_16" WHERE "home_team"='melbourne';
## Task Generate a SQL query to answer the following question: `What is the Home team score for the Home team of Melbourne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_16" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Home team score for the Home team of Melbourne?`: ```sql
SELECT "home_team_score" FROM "round_16" WHERE "home_team"='south melbourne';
## Task Generate a SQL query to answer the following question: `What is the Home team score for the Home team from South Melbourne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_16" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Home team score for the Home team from South Melbourne?`: ```sql
SELECT "away_team" FROM "round_16" WHERE "home_team_score"='18.12 (120)';
## Task Generate a SQL query to answer the following question: `What Away team has a Home team score of 18.12 (120)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_16" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What Away team has a Home team score of 18.12 (120)?`: ```sql
SELECT "home_team_score" FROM "round_16" WHERE "venue"='mcg';
## Task Generate a SQL query to answer the following question: `What is the Home team score for the Venue named MCG?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_16" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Home team score for the Venue named MCG?`: ```sql
SELECT MIN("earnings") FROM "leaders" WHERE "rank"<2;
## Task Generate a SQL query to answer the following question: `Who has the lowest earnings that has a rank smaller than 2?` ### 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 `Who has the lowest earnings that has a rank smaller than 2?`: ```sql
SELECT AVG("rank") FROM "leaders" WHERE "earnings"<'3,069,633';
## Task Generate a SQL query to answer the following question: `What is the average rank of someone who earned smaller than 3,069,633?` ### 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 `What is the average rank of someone who earned smaller than 3,069,633?`: ```sql
SELECT AVG("wins") FROM "leaders" WHERE "country"='australia' AND "earnings"<'3,133,913';
## Task Generate a SQL query to answer the following question: `What has the average wins in Australia who earned smaller than 3,133,913?` ### 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 `What has the average wins in Australia who earned smaller than 3,133,913?`: ```sql
SELECT COUNT("wins") FROM "leaders" WHERE "rank">2 AND "player"='mike hill';
## Task Generate a SQL query to answer the following question: `What was the total number of wins with player Mike Hill with a rank bigger than 2?` ### 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 `What was the total number of wins with player Mike Hill with a rank bigger than 2?`: ```sql
SELECT "location" FROM "championship_review" WHERE "race"='argentine grand prix';
## Task Generate a SQL query to answer the following question: `Where was the argentine grand prix?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "championship_review" ( "race" text, "date" text, "location" text, "pole_position" text, "fastest_lap" text, "race_winner" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Where was the argentine grand prix?`: ```sql
SELECT "constructor" FROM "championship_review" WHERE "fastest_lap"='nelson piquet';
## Task Generate a SQL query to answer the following question: `What was the constructor for the fastest nelson piquet?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "championship_review" ( "race" text, "date" text, "location" text, "pole_position" text, "fastest_lap" text, "race_winner" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the constructor for the fastest nelson piquet?`: ```sql
SELECT "constructor" FROM "championship_review" WHERE "location"='zolder';
## Task Generate a SQL query to answer the following question: `Tell me the constructor for zolder` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "championship_review" ( "race" text, "date" text, "location" text, "pole_position" text, "fastest_lap" text, "race_winner" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the constructor for zolder`: ```sql
SELECT "constructor" FROM "championship_review" WHERE "date"='10 august';
## Task Generate a SQL query to answer the following question: `Name the constructor for 10 august` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "championship_review" ( "race" text, "date" text, "location" text, "pole_position" text, "fastest_lap" text, "race_winner" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the constructor for 10 august`: ```sql
SELECT "years_at_club" FROM "players_who_made_their_debut_for_the_gee" WHERE "games">28 AND "goals">225 AND "debut_year">1950;
## Task Generate a SQL query to answer the following question: `What is the number of Years at Club for the player who has had more games than 28, more Goals than 225, and his Debut year was after 1950?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "players_who_made_their_debut_for_the_gee" ( "debut_year" real, "player" text, "date_of_birth" text, "games" real, "goals" real, "years_at_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the number of Years at Club for the player who has had more games than 28, more Goals than 225, and his Debut year was after 1950?`: ```sql
SELECT "date_of_birth" FROM "players_who_made_their_debut_for_the_gee" WHERE "years_at_club"='1951';
## Task Generate a SQL query to answer the following question: `What is the birthday of the player who has Years at Club of 1951?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "players_who_made_their_debut_for_the_gee" ( "debut_year" real, "player" text, "date_of_birth" text, "games" real, "goals" real, "years_at_club" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the birthday of the player who has Years at Club of 1951?`: ```sql
SELECT "rank" FROM "current_composition" WHERE "years_until_mandatory_retirement"='6 years';
## Task Generate a SQL query to answer the following question: `what rank has years until mandatory retirement of 6 years?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_composition" ( "name" text, "rank" text, "years_until_mandatory_retirement" text, "appointed_by" text, "year_appointed" real ); ### SQL Given the database schema, here is the SQL query that answers `what rank has years until mandatory retirement of 6 years?`: ```sql
SELECT "name" FROM "current_composition" WHERE "year_appointed"=2009 AND "years_until_mandatory_retirement"='13 years';
## Task Generate a SQL query to answer the following question: `what name has an appointed year of 2009 and years until mandatory retirement of 13 years?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "current_composition" ( "name" text, "rank" text, "years_until_mandatory_retirement" text, "appointed_by" text, "year_appointed" real ); ### SQL Given the database schema, here is the SQL query that answers `what name has an appointed year of 2009 and years until mandatory retirement of 13 years?`: ```sql
SELECT "player" FROM "j" WHERE "no_s"='12' AND "school_club_team_country"='oregon';
## Task Generate a SQL query to answer the following question: `Which player from Oregon used the number 12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "j" ( "player" text, "no_s" text, "height_in_ft" text, "position" text, "years_for_rockets" text, "school_club_team_country" text ); ### SQL Given the database schema, here is the SQL query that answers `Which player from Oregon used the number 12?`: ```sql
SELECT "position" FROM "j" WHERE "height_in_ft"='6-10';
## Task Generate a SQL query to answer the following question: `What position does the player who is 6-10 play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "j" ( "player" text, "no_s" text, "height_in_ft" text, "position" text, "years_for_rockets" text, "school_club_team_country" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does the player who is 6-10 play?`: ```sql
SELECT "no_s" FROM "j" WHERE "school_club_team_country"='washington';
## Task Generate a SQL query to answer the following question: `What are the numbers for any players from Washington?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "j" ( "player" text, "no_s" text, "height_in_ft" text, "position" text, "years_for_rockets" text, "school_club_team_country" text ); ### SQL Given the database schema, here is the SQL query that answers `What are the numbers for any players from Washington?`: ```sql
SELECT "years_for_rockets" FROM "j" WHERE "no_s"='6';
## Task Generate a SQL query to answer the following question: `Which years did the Rockets number 6 play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "j" ( "player" text, "no_s" text, "height_in_ft" text, "position" text, "years_for_rockets" text, "school_club_team_country" text ); ### SQL Given the database schema, here is the SQL query that answers `Which years did the Rockets number 6 play?`: ```sql
SELECT "senior_2nd_viii" FROM "winning_head_of_the_river_championship_e" WHERE "senior_iv"='stm';
## Task Generate a SQL query to answer the following question: `Which 2nd senior VIII that also has a 4th senior stm?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "winning_head_of_the_river_championship_e" ( "crew" real, "open_1st_viii" text, "senior_2nd_viii" text, "senior_3rd_viii" text, "senior_iv" text, "year_12_single_scull" text, "year_11_single_scull" text ); ### SQL Given the database schema, here is the SQL query that answers `Which 2nd senior VIII that also has a 4th senior stm?`: ```sql
SELECT "laps" FROM "classification" WHERE "grid"<11 AND "driver"='john love';
## Task Generate a SQL query to answer the following question: `How many laps did John Love have on a grid less than 11?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification" ( "driver" text, "constructor" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `How many laps did John Love have on a grid less than 11?`: ```sql
SELECT "builder" FROM "hebburn_line_locomotives" WHERE "locomotive"='2';
## Task Generate a SQL query to answer the following question: `What is the Builder of Locomotive 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "hebburn_line_locomotives" ( "locomotive" text, "type" text, "builder" text, "builder_s_no" text, "built" real, "entered_service" real, "withdrawn" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the Builder of Locomotive 2?`: ```sql
SELECT SUM("withdrawn") FROM "hebburn_line_locomotives" WHERE "type"='4-6-4t';
## Task Generate a SQL query to answer the following question: `With a Type of 4-6-4t, what is the sum Withdrawn?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "hebburn_line_locomotives" ( "locomotive" text, "type" text, "builder" text, "builder_s_no" text, "built" real, "entered_service" real, "withdrawn" real ); ### SQL Given the database schema, here is the SQL query that answers `With a Type of 4-6-4t, what is the sum Withdrawn?`: ```sql
SELECT "score" FROM "december" WHERE "home"='dallas' AND "visitor"='edmonton';
## Task Generate a SQL query to answer the following question: `What was the score from the game where Dallas played Home and Edmonton was visiting?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "december" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score from the game where Dallas played Home and Edmonton was visiting?`: ```sql
SELECT "mintage" FROM "holiday_coin_set" WHERE "theme"='santa claus';
## Task Generate a SQL query to answer the following question: `What was the mintage when the theme was Santa Claus?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "holiday_coin_set" ( "year" real, "theme" text, "artist" text, "mintage" text, "issue_price" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the mintage when the theme was Santa Claus?`: ```sql
SELECT SUM("issue_price") FROM "holiday_coin_set" WHERE "year"=2008;
## Task Generate a SQL query to answer the following question: `What was the issue price in the year 2008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "holiday_coin_set" ( "year" real, "theme" text, "artist" text, "mintage" text, "issue_price" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the issue price in the year 2008?`: ```sql
SELECT MIN("year") FROM "crystal_snowflake" WHERE "composition"='99.99% silver' AND "issue_price"='$94.95';
## Task Generate a SQL query to answer the following question: `What is the earliest year when the composition is 99.99% silver and the issue price is $94.95?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "crystal_snowflake" ( "year" real, "theme" text, "artist" text, "composition" text, "mintage" real, "issue_price" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the earliest year when the composition is 99.99% silver and the issue price is $94.95?`: ```sql
SELECT AVG("year") FROM "crystal_snowflake" WHERE "issue_price"='$94.95' AND "theme"='amethyst crystal';
## Task Generate a SQL query to answer the following question: `What year had an issue price of $94.95 and theme of Amethyst crystal?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "crystal_snowflake" ( "year" real, "theme" text, "artist" text, "composition" text, "mintage" real, "issue_price" text ); ### SQL Given the database schema, here is the SQL query that answers `What year had an issue price of $94.95 and theme of Amethyst crystal?`: ```sql