output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT AVG("games") FROM "players_who_made_their_debut_for_the_gee" WHERE "goals"<1 AND "player"='keith j. miller' AND "debut_year">1974;
## Task Generate a SQL query to answer the following question: `How many games for keith j. miller, who debuted after 1974 with less than 1 goal?` ### 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 `How many games for keith j. miller, who debuted after 1974 with less than 1 goal?`: ```sql
SELECT MAX("crowd") FROM "round_9" WHERE "away_team"='carlton';
## Task Generate a SQL query to answer the following question: `What is the highest crowd when carlton is the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_9" ( "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 highest crowd when carlton is the away team?`: ```sql
SELECT MAX("crowd") FROM "round_9" WHERE "venue"='mcg';
## Task Generate a SQL query to answer the following question: `What is the highest crowd at mcg?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_9" ( "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 highest crowd at mcg?`: ```sql
SELECT COUNT("grid") FROM "classification" WHERE "time_retired"='+1.837';
## Task Generate a SQL query to answer the following question: `How many grids are associated with a Time/Retired of +1.837?` ### 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 grids are associated with a Time/Retired of +1.837?`: ```sql
SELECT "hometown" FROM "2011_boys_team" WHERE "college"='ucla';
## Task Generate a SQL query to answer the following question: `What is the hometown of the player that attends UCLA?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the hometown of the player that attends UCLA?`: ```sql
SELECT "college" FROM "2011_boys_team" WHERE "school"='wichita heights high school';
## Task Generate a SQL query to answer the following question: `What college is getting a player that attends Wichita Heights High School?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What college is getting a player that attends Wichita Heights High School?`: ```sql
SELECT "hometown" FROM "2011_boys_team" WHERE "player"='cody zeller';
## Task Generate a SQL query to answer the following question: `What is the hometown of Cody Zeller?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the hometown of Cody Zeller?`: ```sql
SELECT "player" FROM "2011_boys_team" WHERE "hometown"='washington, in';
## Task Generate a SQL query to answer the following question: `What player's hometown is Washington, IN?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `What player's hometown is Washington, IN?`: ```sql
SELECT "pct_2006" FROM "community_council" WHERE "seats_2001"<23 AND "seats_2006">4 AND "pct_2001"=25.4;
## Task Generate a SQL query to answer the following question: `What is the %2006 that has fewer seats than 23 in Seats 2001, more seats than 4 in 2006 Seats, and a % in 2001 of 25.4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "community_council" ( "parties_and_voter_communities" text, "pct_2006" real, "seats_2006" real, "pct_2001" real, "seats_2001" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the %2006 that has fewer seats than 23 in Seats 2001, more seats than 4 in 2006 Seats, and a % in 2001 of 25.4?`: ```sql
SELECT SUM("seats_2001") FROM "community_council" WHERE "pct_2001">61.4 AND "pct_2006"<54.1;
## Task Generate a SQL query to answer the following question: `When the %2001 is more than 61.4, and the %2006 fewer than 54.1, how many Seats in 2001 were there?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "community_council" ( "parties_and_voter_communities" text, "pct_2006" real, "seats_2006" real, "pct_2001" real, "seats_2001" real ); ### SQL Given the database schema, here is the SQL query that answers `When the %2001 is more than 61.4, and the %2006 fewer than 54.1, how many Seats in 2001 were there?`: ```sql
SELECT MAX("seats_2006") FROM "community_council" WHERE "parties_and_voter_communities"='christian democratic union of germany' AND "pct_2006">24.6;
## Task Generate a SQL query to answer the following question: `What is the highest number of Seats 2006 held by the Christian Democratic Union of Germany Party/Voter Community, with a %2006 higher than 24.6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "community_council" ( "parties_and_voter_communities" text, "pct_2006" real, "seats_2006" real, "pct_2001" real, "seats_2001" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number of Seats 2006 held by the Christian Democratic Union of Germany Party/Voter Community, with a %2006 higher than 24.6?`: ```sql
SELECT MAX("seats_2006") FROM "community_council" WHERE "parties_and_voter_communities"='bürger für groß-rohrheim' AND "pct_2006"<21.3;
## Task Generate a SQL query to answer the following question: `What is the highest number of Seats 2006 held by the communities of Bürger Für Groß-Rohrheim Party/Voter Community, with a %2006 less than 21.3?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "community_council" ( "parties_and_voter_communities" text, "pct_2006" real, "seats_2006" real, "pct_2001" real, "seats_2001" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number of Seats 2006 held by the communities of Bürger Für Groß-Rohrheim Party/Voter Community, with a %2006 less than 21.3?`: ```sql
SELECT AVG("pct_2006") FROM "community_council" WHERE "pct_2001">62.5;
## Task Generate a SQL query to answer the following question: `What is the %2006 when the %2001 was more than 62.5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "community_council" ( "parties_and_voter_communities" text, "pct_2006" real, "seats_2006" real, "pct_2001" real, "seats_2001" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the %2006 when the %2001 was more than 62.5?`: ```sql
SELECT SUM("losses") FROM "final_standing" WHERE "team"='montreal hockey club' AND "goals_against">15;
## Task Generate a SQL query to answer the following question: `What is the sum of the losses by the Montreal Hockey Club, who have more than 15 Goals Against?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_standing" ( "team" text, "games_played" real, "wins" real, "losses" real, "ties" real, "goals_for" real, "goals_against" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the sum of the losses by the Montreal Hockey Club, who have more than 15 Goals Against?`: ```sql
SELECT MAX("goals_for") FROM "final_standing" WHERE "ties">0;
## Task Generate a SQL query to answer the following question: `What is the largest Goals For by a team that has more than 0 ties?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_standing" ( "team" text, "games_played" real, "wins" real, "losses" real, "ties" real, "goals_for" real, "goals_against" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the largest Goals For by a team that has more than 0 ties?`: ```sql
SELECT SUM("ties") FROM "final_standing" WHERE "goals_for"=25 AND "wins">5;
## Task Generate a SQL query to answer the following question: `How many ties do teams with 25 Goals For and more than 5 wins have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_standing" ( "team" text, "games_played" real, "wins" real, "losses" real, "ties" real, "goals_for" real, "goals_against" real ); ### SQL Given the database schema, here is the SQL query that answers `How many ties do teams with 25 Goals For and more than 5 wins have?`: ```sql
SELECT MIN("goals_against") FROM "final_standing" WHERE "wins">5;
## Task Generate a SQL query to answer the following question: `What is the lowest Goals Against by a team with more than 5 wins?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_standing" ( "team" text, "games_played" real, "wins" real, "losses" real, "ties" real, "goals_for" real, "goals_against" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest Goals Against by a team with more than 5 wins?`: ```sql
SELECT COUNT("ties") FROM "final_standing" WHERE "losses"<3;
## Task Generate a SQL query to answer the following question: `What is the total number of ties a team with less than 3 losses have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_standing" ( "team" text, "games_played" real, "wins" real, "losses" real, "ties" real, "goals_for" real, "goals_against" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the total number of ties a team with less than 3 losses have?`: ```sql
SELECT "race_name" FROM "non_championship_races_review" WHERE "winning_driver"='stirling moss' AND "date"='16 april';
## Task Generate a SQL query to answer the following question: `Tell me the race name where stirling moss won on 16 april` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_races_review" ( "race_name" text, "circuit" text, "date" text, "winning_driver" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the race name where stirling moss won on 16 april`: ```sql
SELECT "report" FROM "non_championship_races_review" WHERE "circuit"='modena';
## Task Generate a SQL query to answer the following question: `Tell me the report for circuit of modena` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_races_review" ( "race_name" text, "circuit" text, "date" text, "winning_driver" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the report for circuit of modena`: ```sql
SELECT "race_name" FROM "non_championship_races_review" WHERE "constructor"='ferrari' AND "date"='25 april';
## Task Generate a SQL query to answer the following question: `Tell me the race name for ferrari on 25 april` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_races_review" ( "race_name" text, "circuit" text, "date" text, "winning_driver" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the race name for ferrari on 25 april`: ```sql
SELECT "constructor" FROM "non_championship_races_review" WHERE "race_name"='vii kanonloppet';
## Task Generate a SQL query to answer the following question: `Name the constructor for vii kanonloppet` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_races_review" ( "race_name" text, "circuit" text, "date" text, "winning_driver" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the constructor for vii kanonloppet`: ```sql
SELECT COUNT("from") FROM "r" WHERE "school_country"='bethel';
## Task Generate a SQL query to answer the following question: `How many players from bethel?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "r" ( "player" text, "pos" text, "from" real, "school_country" text, "rebs" real, "asts" real ); ### SQL Given the database schema, here is the SQL query that answers `How many players from bethel?`: ```sql
SELECT "date" FROM "round_14" WHERE "crowd">'12,425' AND "home_team"='north melbourne';
## Task Generate a SQL query to answer the following question: `I want the date for crowd larger than 12,425 for north melbourne` ### 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 `I want the date for crowd larger than 12,425 for north melbourne`: ```sql
SELECT "opponent" FROM "game_log" WHERE "date"='may 7';
## Task Generate a SQL query to answer the following question: `Who is the opponent on May 7?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "save" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the opponent on May 7?`: ```sql
SELECT "away_team_score" FROM "round_2" WHERE "home_team"='carlton';
## Task Generate a SQL query to answer the following question: `When the Home team was Carlton, what was the Away team score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_2" ( "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 Carlton, what was the Away team score?`: ```sql
SELECT "constructor" FROM "drivers_and_constructors" WHERE "chassis"='fw20';
## Task Generate a SQL query to answer the following question: `Who was the constructor for a FW20 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 `Who was the constructor for a FW20 chassis?`: ```sql
SELECT "engine" FROM "drivers_and_constructors" WHERE "chassis"='mp4-13' AND "driver"='david coulthard';
## Task Generate a SQL query to answer the following question: `What engine did David Coulthard have in his mp4-13 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 did David Coulthard have in his mp4-13 chassis?`: ```sql
SELECT "date" FROM "singles_5_2_titles_3_runners_up" WHERE "outcome"='runner-up' AND "opponent_in_the_final"='gilles simon';
## Task Generate a SQL query to answer the following question: `Which date has an Outcome of runner-up, and an Opponent in the final of gilles simon?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_5_2_titles_3_runners_up" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Which date has an Outcome of runner-up, and an Opponent in the final of gilles simon?`: ```sql
SELECT "opponent_in_the_final" FROM "singles_5_2_titles_3_runners_up" WHERE "date"='28 july 2013';
## Task Generate a SQL query to answer the following question: `Who was the opponent on the 28 july 2013 final?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_5_2_titles_3_runners_up" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the opponent on the 28 july 2013 final?`: ```sql
SELECT "date" FROM "singles_5_2_titles_3_runners_up" WHERE "score_in_the_final"='4–6, 3–6';
## Task Generate a SQL query to answer the following question: `Which date has a Score in the final of 4–6, 3–6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_5_2_titles_3_runners_up" ( "outcome" text, "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score_in_the_final" text ); ### SQL Given the database schema, here is the SQL query that answers `Which date has a Score in the final of 4–6, 3–6?`: ```sql
SELECT "prefix" FROM "groups_containing_sulfur" WHERE "formula"='rsor''';
## Task Generate a SQL query to answer the following question: `What is the prefix for the formula of Rsor'?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "groups_containing_sulfur" ( "chemical_class" text, "group" text, "formula" text, "prefix" text, "suffix" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the prefix for the formula of Rsor'?`: ```sql
SELECT "group" FROM "groups_containing_sulfur" WHERE "formula"='rncs';
## Task Generate a SQL query to answer the following question: `Which group has the RNCS formula?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "groups_containing_sulfur" ( "chemical_class" text, "group" text, "formula" text, "prefix" text, "suffix" text ); ### SQL Given the database schema, here is the SQL query that answers `Which group has the RNCS formula?`: ```sql
SELECT "formula" FROM "groups_containing_sulfur" WHERE "chemical_class"='thial';
## Task Generate a SQL query to answer the following question: `Which formula has a thial as a chemical class?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "groups_containing_sulfur" ( "chemical_class" text, "group" text, "formula" text, "prefix" text, "suffix" text ); ### SQL Given the database schema, here is the SQL query that answers `Which formula has a thial as a chemical class?`: ```sql
SELECT "suffix" FROM "groups_containing_sulfur" WHERE "prefix"='isothiocyanato- (-ncs)';
## Task Generate a SQL query to answer the following question: `Which suffix has the prefix of isothiocyanato- (-ncs)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "groups_containing_sulfur" ( "chemical_class" text, "group" text, "formula" text, "prefix" text, "suffix" text ); ### SQL Given the database schema, here is the SQL query that answers `Which suffix has the prefix of isothiocyanato- (-ncs)?`: ```sql
SELECT "suffix" FROM "groups_containing_sulfur" WHERE "prefix"='thiocyanato- (-scn)';
## Task Generate a SQL query to answer the following question: `Which item has the suffix containing thiocyanato- (-scn) as a prefix?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "groups_containing_sulfur" ( "chemical_class" text, "group" text, "formula" text, "prefix" text, "suffix" text ); ### SQL Given the database schema, here is the SQL query that answers `Which item has the suffix containing thiocyanato- (-scn) as a prefix?`: ```sql
SELECT "formula" FROM "groups_containing_sulfur" WHERE "chemical_class"='thial';
## Task Generate a SQL query to answer the following question: `Which formula has thial as a chemical class?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "groups_containing_sulfur" ( "chemical_class" text, "group" text, "formula" text, "prefix" text, "suffix" text ); ### SQL Given the database schema, here is the SQL query that answers `Which formula has thial as a chemical class?`: ```sql
SELECT "date" FROM "round_12" WHERE "away_team"='fitzroy';
## Task Generate a SQL query to answer the following question: `If fitzroy is the Away team, what Date did they play?` ### 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 fitzroy is the Away team, what Date did they play?`: ```sql
SELECT "home_team" FROM "round_12" WHERE "date"='15 july 1967' AND "away_team"='fitzroy';
## Task Generate a SQL query to answer the following question: `When the Away team is fitzroy on the Date of 15 july 1967, what was the Home team playing?` ### 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 Away team is fitzroy on the Date of 15 july 1967, what was the Home team playing?`: ```sql
SELECT "venue" FROM "round_12" WHERE "away_team"='st kilda';
## Task Generate a SQL query to answer the following question: `Which Venue has an Away team of st kilda?` ### 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 `Which Venue has an Away team of st kilda?`: ```sql
SELECT "away_team" FROM "round_12" WHERE "date"='15 july 1967' AND "away_team_score"='5.22 (52)';
## Task Generate a SQL query to answer the following question: `If the Away team scored 5.22 (52) on the Date of 15 july 1967, what was the Away team?` ### 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 Away team scored 5.22 (52) on the Date of 15 july 1967, what was the Away team?`: ```sql
SELECT "date" FROM "round_12" WHERE "home_team_score"='3.15 (33)';
## Task Generate a SQL query to answer the following question: `If the Home team had a score of 3.15 (33), what was the Date of the game played?` ### 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 had a score of 3.15 (33), what was the Date of the game played?`: ```sql
SELECT AVG("place") FROM "festival_da_can_o_1999_8_march_1999" WHERE "draw"<2;
## Task Generate a SQL query to answer the following question: `What place has a draw smaller than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "festival_da_can_o_1999_8_march_1999" ( "draw" real, "artist" text, "song" text, "points" real, "place" real ); ### SQL Given the database schema, here is the SQL query that answers `What place has a draw smaller than 2?`: ```sql
SELECT "launch_date_utc" FROM "satellites" WHERE "cospar_id_satcat"='1995-022a';
## Task Generate a SQL query to answer the following question: `What is the launch date of the satellite with a COSPAR ID of 1995-022a?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "satellites" ( "name" text, "cospar_id_satcat" text, "launch_date_utc" text, "launch_vehicle" text, "launch_site" text, "launch_designation" text, "longitude" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the launch date of the satellite with a COSPAR ID of 1995-022a?`: ```sql
SELECT "cospar_id_satcat" FROM "satellites" WHERE "launch_vehicle"='titan iv(401)a';
## Task Generate a SQL query to answer the following question: `What is the COSPAR ID of the satellite with a titan iv(401)a launch vehicle?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "satellites" ( "name" text, "cospar_id_satcat" text, "launch_date_utc" text, "launch_vehicle" text, "launch_site" text, "launch_designation" text, "longitude" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the COSPAR ID of the satellite with a titan iv(401)a launch vehicle?`: ```sql
SELECT "launch_designation" FROM "satellites" WHERE "cospar_id_satcat"='2009-001a';
## Task Generate a SQL query to answer the following question: `What is the launch designation of the satellite with a 2009-001a COSPAR ID?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "satellites" ( "name" text, "cospar_id_satcat" text, "launch_date_utc" text, "launch_vehicle" text, "launch_site" text, "launch_designation" text, "longitude" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the launch designation of the satellite with a 2009-001a COSPAR ID?`: ```sql
SELECT "launch_site" FROM "satellites" WHERE "cospar_id_satcat"='2003-041a';
## Task Generate a SQL query to answer the following question: `What is the launch site of the satellite with a 2003-041a COSPAR ID?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "satellites" ( "name" text, "cospar_id_satcat" text, "launch_date_utc" text, "launch_vehicle" text, "launch_site" text, "launch_designation" text, "longitude" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the launch site of the satellite with a 2003-041a COSPAR ID?`: ```sql
SELECT "construction_completed" FROM "superfund_sites" WHERE "cerclis_id"='ard092916188';
## Task Generate a SQL query to answer the following question: `What construction has a CERCLIS ID of ard092916188?` ### 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, "deleted" text ); ### SQL Given the database schema, here is the SQL query that answers `What construction has a CERCLIS ID of ard092916188?`: ```sql
SELECT "cerclis_id" FROM "superfund_sites" WHERE "deleted"='04/07/2008';
## Task Generate a SQL query to answer the following question: `What CERCLIS ID is Deleted of 04/07/2008?` ### 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, "deleted" text ); ### SQL Given the database schema, here is the SQL query that answers `What CERCLIS ID is Deleted of 04/07/2008?`: ```sql
SELECT "construction_completed" FROM "superfund_sites" WHERE "listed"='09/08/1983' AND "deleted"='–' AND "name"='mid-south wood products';
## Task Generate a SQL query to answer the following question: `What construction has a Listed 09/08/1983, and a Deleted of –, and a Name of mid-south 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, "deleted" text ); ### SQL Given the database schema, here is the SQL query that answers `What construction has a Listed 09/08/1983, and a Deleted of –, and a Name of mid-south wood products?`: ```sql
SELECT "construction_completed" FROM "superfund_sites" WHERE "listed"='09/08/1983' AND "name"='cecil lindsey';
## Task Generate a SQL query to answer the following question: `What is the Construction that has a Listed 09/08/1983, and a Name of cecil lindsey?` ### 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, "deleted" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Construction that has a Listed 09/08/1983, and a Name of cecil lindsey?`: ```sql
SELECT AVG("crowd") FROM "round_1" WHERE "venue"='kardinia park';
## Task Generate a SQL query to answer the following question: `What was the attendance at Kardinia Park?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_1" ( "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 attendance at Kardinia Park?`: ```sql
SELECT "date" FROM "schedule" WHERE "week"=16;
## Task Generate a SQL query to answer the following question: `What was the Date of Week 16?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "time_et" text, "result" text, "game_site" text, "record" text, "match_report" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the Date of Week 16?`: ```sql
SELECT "date" FROM "game_log" WHERE "home"='colorado';
## Task Generate a SQL query to answer the following question: `What date was Colorado the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What date was Colorado the home team?`: ```sql
SELECT "record" FROM "game_log" WHERE "decision"='backstrom' AND "date"='november 28';
## Task Generate a SQL query to answer the following question: `What was the record for the game on November 28 when the decision was Backstrom?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the record for the game on November 28 when the decision was Backstrom?`: ```sql
SELECT "home" FROM "game_log" WHERE "record"='11–8–2';
## Task Generate a SQL query to answer the following question: `What team was the home team when the record was 11–8–2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What team was the home team when the record was 11–8–2?`: ```sql
SELECT "score" FROM "game_log" WHERE "home"='edmonton';
## Task Generate a SQL query to answer the following question: `What was the score when Edmonton was the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score when Edmonton was the home team?`: ```sql
SELECT MAX("pl_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "pick_num">159 AND "reg_gp">0;
## Task Generate a SQL query to answer the following question: `Tell me the highest PI GP with pick # greater than 159 and reg GP more than 0` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_vancouver_canucks_draft_picks" ( "rd_num" real, "pick_num" real, "player" text, "team_league" text, "reg_gp" real, "pl_gp" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the highest PI GP with pick # greater than 159 and reg GP more than 0`: ```sql
SELECT "crowd" FROM "round_7" WHERE "home_team_score"='9.13 (67)';
## Task Generate a SQL query to answer the following question: `In the match where the home team scored 9.13 (67) what was the crowd attendance?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_7" ( "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 `In the match where the home team scored 9.13 (67) what was the crowd attendance?`: ```sql
SELECT "home_team" FROM "round_7" WHERE "away_team"='south melbourne';
## Task Generate a SQL query to answer the following question: `In the match where south melbourne was the away team, who was the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_7" ( "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 `In the match where south melbourne was the away team, who was the home team?`: ```sql
SELECT "date" FROM "round_7" WHERE "home_team_score"='14.13 (97)';
## Task Generate a SQL query to answer the following question: `What was the date of the match where the home team scored 14.13 (97)` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_7" ( "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 of the match where the home team scored 14.13 (97)`: ```sql
SELECT "team_2" FROM "third_qualifying_round" WHERE "team_1"='barcelona';
## Task Generate a SQL query to answer the following question: `Which Team 2 faced Team 1 from Barcelona?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_qualifying_round" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Team 2 faced Team 1 from Barcelona?`: ```sql
SELECT "1st_leg" FROM "third_qualifying_round" WHERE "team_1"='galatasaray';
## Task Generate a SQL query to answer the following question: `Which first leg had Galatasaray as Team 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "third_qualifying_round" ( "team_1" text, "agg" text, "team_2" text, "1st_leg" text, "2nd_leg" text ); ### SQL Given the database schema, here is the SQL query that answers `Which first leg had Galatasaray as Team 1?`: ```sql
SELECT "event" FROM "mixed_martial_arts_record" WHERE "time"='2:19';
## Task Generate a SQL query to answer the following question: `What was the name of the Event with a time of 2:19?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the name of the Event with a time of 2:19?`: ```sql
SELECT "location" FROM "mixed_martial_arts_record" WHERE "opponent"='joe lauzon';
## Task Generate a SQL query to answer the following question: `Where was match which had Joe Lauzon as an opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "mixed_martial_arts_record" ( "res" text, "record" text, "opponent" text, "method" text, "event" text, "round" real, "time" text, "location" text ); ### SQL Given the database schema, here is the SQL query that answers `Where was match which had Joe Lauzon as an opponent?`: ```sql
SELECT "name" FROM "timeline_of_tallest_buildings" WHERE "city"='frankfurt' AND "years_as_tallest"='1990–1997';
## Task Generate a SQL query to answer the following question: `What is the name of the building that was the tallest from 1990–1997 in Frankfurt?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "timeline_of_tallest_buildings" ( "name" text, "city" text, "height_m" real, "height_ft" real, "floors" real, "years_as_tallest" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the building that was the tallest from 1990–1997 in Frankfurt?`: ```sql
SELECT MAX("height_ft") FROM "timeline_of_tallest_buildings" WHERE "height_m"<122;
## Task Generate a SQL query to answer the following question: `For a height less than 122 meters, what is the greatest height in feet?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "timeline_of_tallest_buildings" ( "name" text, "city" text, "height_m" real, "height_ft" real, "floors" real, "years_as_tallest" text ); ### SQL Given the database schema, here is the SQL query that answers `For a height less than 122 meters, what is the greatest height in feet?`: ```sql
SELECT MAX("height_ft") FROM "timeline_of_tallest_buildings" WHERE "city"='cologne';
## Task Generate a SQL query to answer the following question: `How high was the highest building in feet in the city of cologne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "timeline_of_tallest_buildings" ( "name" text, "city" text, "height_m" real, "height_ft" real, "floors" real, "years_as_tallest" text ); ### SQL Given the database schema, here is the SQL query that answers `How high was the highest building in feet in the city of cologne?`: ```sql
SELECT MIN("height_ft") FROM "timeline_of_tallest_buildings" WHERE "city"='frankfurt' AND "height_m"=257 AND "floors"<55;
## Task Generate a SQL query to answer the following question: `What is the smallest height (ft) of a building in Frankfurt with a height (m) of 257 and less than 55 floors?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "timeline_of_tallest_buildings" ( "name" text, "city" text, "height_m" real, "height_ft" real, "floors" real, "years_as_tallest" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the smallest height (ft) of a building in Frankfurt with a height (m) of 257 and less than 55 floors?`: ```sql
SELECT "height_m" FROM "timeline_of_tallest_buildings" WHERE "city"='frankfurt' AND "height_ft"=850;
## Task Generate a SQL query to answer the following question: `What is the height in meters for a building in Frankfurt that is 850 feet tall?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "timeline_of_tallest_buildings" ( "name" text, "city" text, "height_m" real, "height_ft" real, "floors" real, "years_as_tallest" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the height in meters for a building in Frankfurt that is 850 feet tall?`: ```sql
SELECT "mintage" FROM "nhl_coins" WHERE "theme"='toronto maple leafs' AND "issue_price"<24.95;
## Task Generate a SQL query to answer the following question: `What is the mintage of the coin with a Toronto Maple Leafs theme and an issue price below 24.95?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "nhl_coins" ( "year" real, "theme" text, "artist" text, "mintage" text, "issue_price" real, "special_notes" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the mintage of the coin with a Toronto Maple Leafs theme and an issue price below 24.95?`: ```sql
SELECT "away_team_score" FROM "round_17" WHERE "away_team"='collingwood';
## Task Generate a SQL query to answer the following question: `What was Collingwood's score in their away game?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "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 Collingwood's score in their away game?`: ```sql
SELECT "venue" FROM "round_17" WHERE "away_team"='geelong';
## Task Generate a SQL query to answer the following question: `Where did Geelong play as the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_17" ( "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 `Where did Geelong play as the away team?`: ```sql
SELECT "date" FROM "east_german_championship" WHERE "race_name"='i dessau autobahnspinne';
## Task Generate a SQL query to answer the following question: `On what date was the I Dessau Autobahnspinne race?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "east_german_championship" ( "race_name" text, "circuit" text, "date" text, "winning_driver" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `On what date was the I Dessau Autobahnspinne race?`: ```sql
SELECT "winning_driver" FROM "east_german_championship" WHERE "circuit"='sachsenring';
## Task Generate a SQL query to answer the following question: `Who was the winning driver in the Sachsenring circuit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "east_german_championship" ( "race_name" text, "circuit" text, "date" text, "winning_driver" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the winning driver in the Sachsenring circuit?`: ```sql
SELECT "hometown" FROM "1986_boys_team" WHERE "player"='terry mills';
## Task Generate a SQL query to answer the following question: `Where is Terry Mills from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1986_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `Where is Terry Mills from?`: ```sql
SELECT "date" FROM "season_review" WHERE "race"='mexican grand prix';
## Task Generate a SQL query to answer the following question: `When is the Mexican grand prix?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "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 `When is the Mexican grand prix?`: ```sql
SELECT "school" FROM "2011_boys_team" WHERE "height"='6-8';
## Task Generate a SQL query to answer the following question: `The person with a Height of 6-8 went to which School?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `The person with a Height of 6-8 went to which School?`: ```sql
SELECT "college" FROM "2011_boys_team" WHERE "player"='dorian finney-smith';
## Task Generate a SQL query to answer the following question: `What College did Player Dorian Finney-Smith play for?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `What College did Player Dorian Finney-Smith play for?`: ```sql
SELECT "player" FROM "2011_boys_team" WHERE "height"='6-10' AND "college"='lsu';
## Task Generate a SQL query to answer the following question: `Which Player has a height of 6-10, and went to College at LSU?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Player has a height of 6-10, and went to College at LSU?`: ```sql
SELECT "school" FROM "2011_boys_team" WHERE "player"='tyrone johnson';
## Task Generate a SQL query to answer the following question: `Which School did Player Tyrone Johnson attend?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `Which School did Player Tyrone Johnson attend?`: ```sql
SELECT "school" FROM "2011_boys_team" WHERE "player"='tyrone johnson';
## Task Generate a SQL query to answer the following question: `Which School did Player Tyrone Johnson attend?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2011_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `Which School did Player Tyrone Johnson attend?`: ```sql
SELECT "rider" FROM "ultra_lightweight_manx_grand_prix_revise" WHERE "time"='1:23.32.41';
## Task Generate a SQL query to answer the following question: `Who had the time of 1:23.32.41?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ultra_lightweight_manx_grand_prix_revise" ( "rank" real, "rider" text, "team" text, "speed" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `Who had the time of 1:23.32.41?`: ```sql
SELECT "time" FROM "ultra_lightweight_manx_grand_prix_revise" WHERE "rank"<8 AND "speed"='104.567mph';
## Task Generate a SQL query to answer the following question: `What is the time of the rider who has a rank smaller than 8 and speed of 104.567mph?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ultra_lightweight_manx_grand_prix_revise" ( "rank" real, "rider" text, "team" text, "speed" text, "time" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the time of the rider who has a rank smaller than 8 and speed of 104.567mph?`: ```sql
SELECT "home_team" FROM "round_21" WHERE "venue"='junction oval';
## Task Generate a SQL query to answer the following question: `What is the home team at the Junction Oval venue?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_21" ( "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 at the Junction Oval venue?`: ```sql
SELECT "date" FROM "round_21" WHERE "away_team"='richmond';
## Task Generate a SQL query to answer the following question: `What is the date where the away team is Richmond?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_21" ( "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 date where the away team is Richmond?`: ```sql
SELECT MAX("crowd") FROM "round_21" WHERE "home_team_score"='17.13 (115)';
## Task Generate a SQL query to answer the following question: `What is the largest crowd where the home team scored 17.13 (115)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_21" ( "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 largest crowd where the home team scored 17.13 (115)?`: ```sql
SELECT "date" FROM "round_21" WHERE "away_team_score"='10.16 (76)';
## Task Generate a SQL query to answer the following question: `What day did the away team score 10.16 (76)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_21" ( "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 day did the away team score 10.16 (76)?`: ```sql
SELECT "circuit" FROM "season_review" WHERE "fastest_lap"='john surtees' AND "winning_driver"='john surtees';
## Task Generate a SQL query to answer the following question: `Name the circuit when the fastest lap was john surtees and the winning driver was john surtees.` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "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 `Name the circuit when the fastest lap was john surtees and the winning driver was john surtees.`: ```sql
SELECT "winning_driver" FROM "season_review" WHERE "circuit"='monza';
## Task Generate a SQL query to answer the following question: `Name the winning driver with circuit of monza` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "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 `Name the winning driver with circuit of monza`: ```sql
SELECT "pole_position" FROM "season_review" WHERE "date"='8 september';
## Task Generate a SQL query to answer the following question: `Name the pole position for 8 september` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "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 `Name the pole position for 8 september`: ```sql
SELECT "winning_driver" FROM "season_review" WHERE "race"='belgian grand prix';
## Task Generate a SQL query to answer the following question: `Name the winning driver for belgian grand prix` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "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 `Name the winning driver for belgian grand prix`: ```sql
SELECT "circuit" FROM "season_review" WHERE "race"='italian grand prix';
## Task Generate a SQL query to answer the following question: `Name the circuit for italian grand prix` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "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 `Name the circuit for italian grand prix`: ```sql
SELECT COUNT("grid") FROM "race" WHERE "driver"='giancarlo fisichella';
## Task Generate a SQL query to answer the following question: `How many grid numbers were there for the driver Giancarlo Fisichella?` ### 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 `How many grid numbers were there for the driver Giancarlo Fisichella?`: ```sql
SELECT AVG("laps") FROM "race" WHERE "constructor"='ferrari' AND "time_retired"='fuel pressure';
## Task Generate a SQL query to answer the following question: `What is the mean number of laps for the constructor Ferrari when the time/retired was fuel pressure?` ### 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 mean number of laps for the constructor Ferrari when the time/retired was fuel pressure?`: ```sql
SELECT "grid" FROM "race" WHERE "driver"='michael schumacher';
## Task Generate a SQL query to answer the following question: `What is the grid when the driver was Michael Schumacher?` ### 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 grid when the driver was Michael Schumacher?`: ```sql
SELECT SUM("laps") FROM "race" WHERE "grid"=7;
## Task Generate a SQL query to answer the following question: `How many laps had a grid number of 7?` ### 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 `How many laps had a grid number of 7?`: ```sql
SELECT COUNT("laps") FROM "race" WHERE "grid"<17 AND "driver"='giancarlo fisichella';
## Task Generate a SQL query to answer the following question: `Which lap number had a grid number of less than 17 when the driver was Giancarlo Fisichella?` ### 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 `Which lap number had a grid number of less than 17 when the driver was Giancarlo Fisichella?`: ```sql
SELECT "winning_driver" FROM "championship_review" WHERE "circuit"='monza';
## Task Generate a SQL query to answer the following question: `Name the winning driver for circuit of monza` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "championship_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 `Name the winning driver for circuit of monza`: ```sql
SELECT "date" FROM "championship_review" WHERE "fastest_lap"='jody scheckter' AND "race"='french grand prix';
## Task Generate a SQL query to answer the following question: `Tell me the date for jody scheckter being the fastest lap at the french grand prix` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "championship_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 `Tell me the date for jody scheckter being the fastest lap at the french grand prix`: ```sql