output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "ship" FROM "g_class" WHERE "pennant_number"='h05';
## Task Generate a SQL query to answer the following question: `What ship has a pennant number h05?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "g_class" ( "ship" text, "pennant_number" text, "laid_down" text, "launched" text, "completed" text ); ### SQL Given the database schema, here is the SQL query that answers `What ship has a pennant number h05?`: ```sql
SELECT "launched" FROM "g_class" WHERE "completed"='25 february 1936';
## Task Generate a SQL query to answer the following question: `What is the launched date of the destroyer completed 25 February 1936?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "g_class" ( "ship" text, "pennant_number" text, "laid_down" text, "launched" text, "completed" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the launched date of the destroyer completed 25 February 1936?`: ```sql
SELECT "launched" FROM "g_class" WHERE "completed"='1 july 1936';
## Task Generate a SQL query to answer the following question: `What is the launched date of the destroyer completed 1 July 1936?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "g_class" ( "ship" text, "pennant_number" text, "laid_down" text, "launched" text, "completed" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the launched date of the destroyer completed 1 July 1936?`: ```sql
SELECT "home_team_score" FROM "round_19" WHERE "venue"='western oval';
## Task Generate a SQL query to answer the following question: `What was the home team score when the VFL played at Western Oval?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_19" ( "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 home team score when the VFL played at Western Oval?`: ```sql
SELECT "home_team" FROM "round_19" WHERE "away_team"='north melbourne';
## Task Generate a SQL query to answer the following question: `Who was North Melbourne's home opponent?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_19" ( "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 was North Melbourne's home opponent?`: ```sql
SELECT "home_team_score" FROM "round_19" WHERE "venue"='princes park';
## Task Generate a SQL query to answer the following question: `What was the home team score when the VFL played at Princes Park?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_19" ( "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 home team score when the VFL played at Princes Park?`: ```sql
SELECT SUM("ave_no") FROM "alpine_club_classification" WHERE "name"='albula alps' AND "height_m">3418;
## Task Generate a SQL query to answer the following question: `Which sum of AVE-No has a Name of albula alps, and a Height (m) larger than 3418?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "alpine_club_classification" ( "ave_no" real, "name" text, "country" text, "highest_mountain" text, "height_m" real ); ### SQL Given the database schema, here is the SQL query that answers `Which sum of AVE-No has a Name of albula alps, and a Height (m) larger than 3418?`: ```sql
SELECT MIN("height_m") FROM "alpine_club_classification" WHERE "name"='plessur alps' AND "ave_no">63;
## Task Generate a SQL query to answer the following question: `Which Height (m) has a Name of plessur alps, and a AVE-No larger than 63?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "alpine_club_classification" ( "ave_no" real, "name" text, "country" text, "highest_mountain" text, "height_m" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Height (m) has a Name of plessur alps, and a AVE-No larger than 63?`: ```sql
SELECT "name" FROM "alpine_club_classification" WHERE "height_m"=2980;
## Task Generate a SQL query to answer the following question: `Which Name has a Height (m) of 2980?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "alpine_club_classification" ( "ave_no" real, "name" text, "country" text, "highest_mountain" text, "height_m" real ); ### SQL Given the database schema, here is the SQL query that answers `Which Name has a Height (m) of 2980?`: ```sql
SELECT MIN("ave_no") FROM "alpine_club_classification" WHERE "name"='livigno alps';
## Task Generate a SQL query to answer the following question: `Which AVE-No has a Name of livigno alps?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "alpine_club_classification" ( "ave_no" real, "name" text, "country" text, "highest_mountain" text, "height_m" real ); ### SQL Given the database schema, here is the SQL query that answers `Which AVE-No has a Name of livigno alps?`: ```sql
SELECT "winning_driver" FROM "grands_prix" WHERE "fastest_lap"='michael schumacher' AND "constructor"='ferrari' AND "pole_position"='jenson button';
## Task Generate a SQL query to answer the following question: `Who was the winning driver when pole position was jenson button, the fastest lap was michael schumacher and the car was ferrari?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "grand_prix" text, "pole_position" text, "fastest_lap" 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 when pole position was jenson button, the fastest lap was michael schumacher and the car was ferrari?`: ```sql
SELECT "pole_position" FROM "grands_prix" WHERE "winning_driver"='michael schumacher' AND "grand_prix"='san marino grand prix';
## Task Generate a SQL query to answer the following question: `What was the pole position at the san marino grand prix with michael schumacher as winning driver?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "grand_prix" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the pole position at the san marino grand prix with michael schumacher as winning driver?`: ```sql
SELECT "grand_prix" FROM "grands_prix" WHERE "pole_position"='kimi räikkönen';
## Task Generate a SQL query to answer the following question: `Name the Grand Prix for pole position of kimi räikkönen` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "grand_prix" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the Grand Prix for pole position of kimi räikkönen`: ```sql
SELECT COUNT("established") FROM "annual_events" WHERE "sub_category"='multicultural';
## Task Generate a SQL query to answer the following question: `How many Established groups have a multicultural sub category?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "annual_events" ( "event_name" text, "established" real, "category" text, "sub_category" text, "main_venue" text ); ### SQL Given the database schema, here is the SQL query that answers `How many Established groups have a multicultural sub category?`: ```sql
SELECT "category" FROM "annual_events" WHERE "established"=1990;
## Task Generate a SQL query to answer the following question: `Which is the category of the group was establishe in 1990?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "annual_events" ( "event_name" text, "established" real, "category" text, "sub_category" text, "main_venue" text ); ### SQL Given the database schema, here is the SQL query that answers `Which is the category of the group was establishe in 1990?`: ```sql
SELECT "category" FROM "annual_events" WHERE "event_name"='touchdown atlantic';
## Task Generate a SQL query to answer the following question: `What is the category of the touchdown atlantic?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "annual_events" ( "event_name" text, "established" real, "category" text, "sub_category" text, "main_venue" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the category of the touchdown atlantic?`: ```sql
SELECT "result" FROM "international_goals" WHERE "date"='13 october 2004';
## Task Generate a SQL query to answer the following question: `Name the result for 13 october 2004` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the result for 13 october 2004`: ```sql
SELECT "date" FROM "international_goals" WHERE "competition"='friendly' AND "venue"='rheinpark stadion, vaduz';
## Task Generate a SQL query to answer the following question: `Name the date that has a friendly competition at rheinpark stadion, vaduz` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the date that has a friendly competition at rheinpark stadion, vaduz`: ```sql
SELECT "constructor" FROM "non_championship_race_results" WHERE "circuit"='oulton park' AND "winning_driver"='john surtees';
## Task Generate a SQL query to answer the following question: `Who is the constructor of John Surtees's Oulton Park circuit car?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_race_results" ( "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 is the constructor of John Surtees's Oulton Park circuit car?`: ```sql
SELECT "race_name" FROM "non_championship_race_results" WHERE "constructor"='matra';
## Task Generate a SQL query to answer the following question: `Which race was Matra the constructor?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_race_results" ( "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 `Which race was Matra the constructor?`: ```sql
SELECT "race_name" FROM "non_championship_race_results" WHERE "circuit"='hockenheim';
## Task Generate a SQL query to answer the following question: `Which race was at Hockenheim circuit?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_race_results" ( "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 `Which race was at Hockenheim circuit?`: ```sql
SELECT "winning_driver" FROM "non_championship_race_results" WHERE "constructor"='brm' AND "race_name"='xii spring trophy';
## Task Generate a SQL query to answer the following question: `Who was the winner of the XII Spring Trophy race with BRM as the constructor?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "non_championship_race_results" ( "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 winner of the XII Spring Trophy race with BRM as the constructor?`: ```sql
SELECT "away_team" FROM "round_8" WHERE "venue"='victoria park';
## Task Generate a SQL query to answer the following question: `What is the away team at victoria park?` ### 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 `What is the away team at victoria park?`: ```sql
SELECT "venue" FROM "round_8" WHERE "away_team_score"='17.14 (116)';
## Task Generate a SQL query to answer the following question: `Which venue has an Away team score of 17.14 (116)?` ### 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 venue has an Away team score of 17.14 (116)?`: ```sql
SELECT "away_team" FROM "round_8" WHERE "venue"='junction oval';
## Task Generate a SQL query to answer the following question: `Which away team is from junction oval?` ### 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 away team is from junction oval?`: ```sql
SELECT "away_team_score" FROM "round_8" WHERE "home_team_score"='13.12 (90)';
## Task Generate a SQL query to answer the following question: `Which Away team score has Home team score of 13.12 (90)?` ### 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 Away team score has Home team score of 13.12 (90)?`: ```sql
SELECT "term_in_office" FROM "notes" WHERE "member"='hon peter morris';
## Task Generate a SQL query to answer the following question: `What was the term of Hon Peter Morris?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "notes" ( "member" text, "party" text, "electorate" text, "state" text, "term_in_office" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the term of Hon Peter Morris?`: ```sql
SELECT "party" FROM "notes" WHERE "electorate"='lindsay';
## Task Generate a SQL query to answer the following question: `What party is the member that has an electorate of Lindsay?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "notes" ( "member" text, "party" text, "electorate" text, "state" text, "term_in_office" text ); ### SQL Given the database schema, here is the SQL query that answers `What party is the member that has an electorate of Lindsay?`: ```sql
SELECT MIN("laps") FROM "race" WHERE "grid"<4 AND "driver"='juan pablo montoya';
## Task Generate a SQL query to answer the following question: `What is the low lap total for the under 4 grid car driven by juan pablo montoya?` ### 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 low lap total for the under 4 grid car driven by juan pablo montoya?`: ```sql
SELECT "driver" FROM "race" WHERE "grid"=11;
## Task Generate a SQL query to answer the following question: `Who drove the grid 11 car?` ### 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 `Who drove the grid 11 car?`: ```sql
SELECT COUNT("grid") FROM "race" WHERE "laps">69;
## Task Generate a SQL query to answer the following question: `What is the grid total for cars with over 69 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 grid total for cars with over 69 laps?`: ```sql
SELECT "time_retired" FROM "125cc_classification" WHERE "laps"=22 AND "grid"=29;
## Task Generate a SQL query to answer the following question: `What is the time/retired with 22 laps and a grid of 29?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "125cc_classification" ( "rider" text, "manufacturer" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the time/retired with 22 laps and a grid of 29?`: ```sql
SELECT MAX("laps") FROM "125cc_classification" WHERE "time_retired"='+6.643' AND "grid"<2;
## Task Generate a SQL query to answer the following question: `What is the highest number of laps with a time of +6.643 and grid less than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "125cc_classification" ( "rider" text, "manufacturer" text, "laps" real, "time_retired" text, "grid" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest number of laps with a time of +6.643 and grid less than 2?`: ```sql
SELECT "dates_active" FROM "season_effects" WHERE "deaths"='204';
## Task Generate a SQL query to answer the following question: `When was there 204 deaths?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_effects" ( "name" text, "dates_active" text, "windspeeds" text, "pressure" text, "deaths" text ); ### SQL Given the database schema, here is the SQL query that answers `When was there 204 deaths?`: ```sql
SELECT "date_of_birth" FROM "west_indies" WHERE "bowling_style"='right arm fast';
## Task Generate a SQL query to answer the following question: `When is the birth date of player with right arm fast style?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "west_indies" ( "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 `When is the birth date of player with right arm fast style?`: ```sql
SELECT "batting_style" FROM "west_indies" WHERE "bowling_style"='right arm medium' AND "player"='stuart williams';
## Task Generate a SQL query to answer the following question: `What batting style corresponds to a bowling style of right arm medium for Stuart Williams?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "west_indies" ( "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 batting style corresponds to a bowling style of right arm medium for Stuart Williams?`: ```sql
SELECT "date_of_birth" FROM "west_indies" WHERE "player"='mervyn dillon';
## Task Generate a SQL query to answer the following question: `What is the birth date for Mervyn Dillon?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "west_indies" ( "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 birth date for Mervyn Dillon?`: ```sql
SELECT "position" FROM "r" WHERE "player"='michael ruffin';
## Task Generate a SQL query to answer the following question: `What position does Michael Ruffin play?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "r" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position does Michael Ruffin play?`: ```sql
SELECT "nationality" FROM "r" WHERE "position"='center';
## Task Generate a SQL query to answer the following question: `What is the nationality of the center?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "r" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality of the center?`: ```sql
SELECT "nationality" FROM "r" WHERE "years_for_jazz"='1977-79';
## Task Generate a SQL query to answer the following question: `What is the nationality of the Jazz player 1977-79?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "r" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the nationality of the Jazz player 1977-79?`: ```sql
SELECT "school_club_team" FROM "r" WHERE "nationality"='united states' AND "position"='guard';
## Task Generate a SQL query to answer the following question: `Tell me the School/Club team of the player from the United States that play'de guard?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "r" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the School/Club team of the player from the United States that play'de guard?`: ```sql
SELECT "nationality" FROM "r" WHERE "player"='bill robinzine';
## Task Generate a SQL query to answer the following question: `What nationality is Bill Robinzine?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "r" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What nationality is Bill Robinzine?`: ```sql
SELECT AVG("season") FROM "season_to_season" WHERE "position"='10th';
## Task Generate a SQL query to answer the following question: `What is the average of seasons for 10th place finishes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_to_season" ( "season" real, "level" text, "division" text, "administration" text, "position" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average of seasons for 10th place finishes?`: ```sql
SELECT "season" FROM "season_to_season" WHERE "position"='2nd';
## Task Generate a SQL query to answer the following question: `What season was there a 2nd place finish?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_to_season" ( "season" real, "level" text, "division" text, "administration" text, "position" text ); ### SQL Given the database schema, here is the SQL query that answers `What season was there a 2nd place finish?`: ```sql
SELECT "level" FROM "season_to_season" WHERE "season">2003 AND "division"='kakkonen (second division)' AND "position"='12th';
## Task Generate a SQL query to answer the following question: `What level for seasons after 2003, a Division of kakkonen (second division), and a Position of 12th?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_to_season" ( "season" real, "level" text, "division" text, "administration" text, "position" text ); ### SQL Given the database schema, here is the SQL query that answers `What level for seasons after 2003, a Division of kakkonen (second division), and a Position of 12th?`: ```sql
SELECT "streak" FROM "april" WHERE "date"='april 2';
## Task Generate a SQL query to answer the following question: `What was the streak on April 2?` ### 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" text, "record" text, "streak" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the streak on April 2?`: ```sql
SELECT "visitor" FROM "april" WHERE "leading_scorer"='jones : 20';
## Task Generate a SQL query to answer the following question: `Who was the visiting team when the leading scorer was Jones : 20?` ### 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" text, "record" text, "streak" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the visiting team when the leading scorer was Jones : 20?`: ```sql
SELECT "viewers_in_millions" FROM "american_television_ratings" WHERE "season"='1';
## Task Generate a SQL query to answer the following question: `How many people watched season 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "american_television_ratings" ( "season" text, "season_premiere" text, "season_finale" text, "tv_season" text, "ranking" text, "viewers_in_millions" real ); ### SQL Given the database schema, here is the SQL query that answers `How many people watched season 1?`: ```sql
SELECT "ranking" FROM "american_television_ratings" WHERE "season_finale"='may 15, 2011';
## Task Generate a SQL query to answer the following question: `What was the ranking of the season whose finale aired on May 15, 2011?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "american_television_ratings" ( "season" text, "season_premiere" text, "season_finale" text, "tv_season" text, "ranking" text, "viewers_in_millions" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the ranking of the season whose finale aired on May 15, 2011?`: ```sql
SELECT "season" FROM "american_television_ratings" WHERE "season_premiere"='november 27, 2012';
## Task Generate a SQL query to answer the following question: `Which season premiered on November 27, 2012?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "american_television_ratings" ( "season" text, "season_premiere" text, "season_finale" text, "tv_season" text, "ranking" text, "viewers_in_millions" real ); ### SQL Given the database schema, here is the SQL query that answers `Which season premiered on November 27, 2012?`: ```sql
SELECT SUM("pl_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "pick_num"<122 AND "player"='rob flockhart' AND "rd_num"<3;
## Task Generate a SQL query to answer the following question: `What is the PI GP of Rob Flockhart, who has a pick # less than 122 and a round # less than 3?` ### 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 `What is the PI GP of Rob Flockhart, who has a pick # less than 122 and a round # less than 3?`: ```sql
SELECT MIN("reg_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "rd_num">2 AND "pick_num"=80 AND "pl_gp">0;
## Task Generate a SQL query to answer the following question: `What is the lowest reg gp of the player with a round # more than 2, a pick # of 80, and a PI GP larger 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 `What is the lowest reg gp of the player with a round # more than 2, a pick # of 80, and a PI GP larger than 0?`: ```sql
SELECT MAX("fips_code") FROM "census_designated_places_in_new_york" WHERE "coordinates"='41.827547, -74.118478' AND "land_sq_mi"<1.196;
## Task Generate a SQL query to answer the following question: `Name the highest FIPS code for coordinates of 41.827547, -74.118478 and land less than 1.196` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "census_designated_places_in_new_york" ( "cdp_name" text, "county" text, "pop_2010" real, "land_sq_mi" real, "water_sq_mi" real, "coordinates" text, "fips_code" real, "ansi_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the highest FIPS code for coordinates of 41.827547, -74.118478 and land less than 1.196`: ```sql
SELECT "cdp_name" FROM "census_designated_places_in_new_york" WHERE "fips_code"=3659708;
## Task Generate a SQL query to answer the following question: `Name the CDP name for FIPS code of 3659708` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "census_designated_places_in_new_york" ( "cdp_name" text, "county" text, "pop_2010" real, "land_sq_mi" real, "water_sq_mi" real, "coordinates" text, "fips_code" real, "ansi_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the CDP name for FIPS code of 3659708`: ```sql
SELECT "fips_code" FROM "census_designated_places_in_new_york" WHERE "county"='wyoming' AND "cdp_name"='pike';
## Task Generate a SQL query to answer the following question: `Name the FIPS code for county of wyoming and CDP name of pike` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "census_designated_places_in_new_york" ( "cdp_name" text, "county" text, "pop_2010" real, "land_sq_mi" real, "water_sq_mi" real, "coordinates" text, "fips_code" real, "ansi_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the FIPS code for county of wyoming and CDP name of pike`: ```sql
SELECT SUM("land_sq_mi") FROM "census_designated_places_in_new_york" WHERE "ansi_code"=2390496 AND "pop_2010"<'7,284';
## Task Generate a SQL query to answer the following question: `Name the sum of land for ANSI code of 2390496 and population less than 7,284` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "census_designated_places_in_new_york" ( "cdp_name" text, "county" text, "pop_2010" real, "land_sq_mi" real, "water_sq_mi" real, "coordinates" text, "fips_code" real, "ansi_code" real ); ### SQL Given the database schema, here is the SQL query that answers `Name the sum of land for ANSI code of 2390496 and population less than 7,284`: ```sql
SELECT MIN("solo") FROM "defense" WHERE "td_s">0 AND "sack">0;
## Task Generate a SQL query to answer the following question: `How many solo tackles for the player with over 0 TDs and over 0 sacks?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "defense" ( "player" text, "tackles" real, "solo" real, "assisted" real, "sack" real, "yards" real, "td_s" real ); ### SQL Given the database schema, here is the SQL query that answers `How many solo tackles for the player with over 0 TDs and over 0 sacks?`: ```sql
SELECT COUNT("sack") FROM "defense" WHERE "tackles">1 AND "assisted"<3 AND "yards">0;
## Task Generate a SQL query to answer the following question: `How many sacks for the player with over 1 tackle, under 3 assisted tackles, and over 0 yards?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "defense" ( "player" text, "tackles" real, "solo" real, "assisted" real, "sack" real, "yards" real, "td_s" real ); ### SQL Given the database schema, here is the SQL query that answers `How many sacks for the player with over 1 tackle, under 3 assisted tackles, and over 0 yards?`: ```sql
SELECT "design" FROM "2009" WHERE "denomination"='$1.18';
## Task Generate a SQL query to answer the following question: `What stamp design has a denomination of $1.18?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009" ( "date_of_issue" text, "denomination" text, "design" text, "paper_type" text, "first_day_cover_cancellation" text ); ### SQL Given the database schema, here is the SQL query that answers `What stamp design has a denomination of $1.18?`: ```sql
SELECT "denomination" FROM "2009" WHERE "date_of_issue"='8 january 2009';
## Task Generate a SQL query to answer the following question: `What is the denomination for the stamp issued 8 January 2009?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009" ( "date_of_issue" text, "denomination" text, "design" text, "paper_type" text, "first_day_cover_cancellation" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the denomination for the stamp issued 8 January 2009?`: ```sql
SELECT "date_of_issue" FROM "2009" WHERE "design"='john belisle, kosta tsetsekas';
## Task Generate a SQL query to answer the following question: `What date was the John Belisle, Kosta Tsetsekas stamp issued?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009" ( "date_of_issue" text, "denomination" text, "design" text, "paper_type" text, "first_day_cover_cancellation" text ); ### SQL Given the database schema, here is the SQL query that answers `What date was the John Belisle, Kosta Tsetsekas stamp issued?`: ```sql
SELECT "first_day_cover_cancellation" FROM "2009" WHERE "design"='karen smith design';
## Task Generate a SQL query to answer the following question: `What is the first day cover cancellation for the Karen Smith Design stamp?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2009" ( "date_of_issue" text, "denomination" text, "design" text, "paper_type" text, "first_day_cover_cancellation" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the first day cover cancellation for the Karen Smith Design stamp?`: ```sql
SELECT "date" FROM "international_goals" WHERE "competition"='2008 africa cup of nations';
## Task Generate a SQL query to answer the following question: `What is the date of Competition of 2008 africa cup of nations?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of Competition of 2008 africa cup of nations?`: ```sql
SELECT "score" FROM "international_goals" WHERE "date"='22 january 2008';
## Task Generate a SQL query to answer the following question: `What is the score on 22 january 2008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the score on 22 january 2008?`: ```sql
SELECT "venue" FROM "international_goals" WHERE "date"='22 january 2008';
## Task Generate a SQL query to answer the following question: `Which venue was used 22 january 2008?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `Which venue was used 22 january 2008?`: ```sql
SELECT "result" FROM "international_goals" WHERE "score"='1–0' AND "competition"='2014 fifa world cup qualification';
## Task Generate a SQL query to answer the following question: `What result has a Score of 1–0, and a Competition of 2014 fifa world cup qualification?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What result has a Score of 1–0, and a Competition of 2014 fifa world cup qualification?`: ```sql
SELECT "date" FROM "international_goals" WHERE "competition"='2014 fifa world cup qualification' AND "score"='1–0';
## Task Generate a SQL query to answer the following question: `What date was the Competition of 2014 fifa world cup qualification, with a Score of 1–0?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_goals" ( "date" text, "venue" text, "score" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What date was the Competition of 2014 fifa world cup qualification, with a Score of 1–0?`: ```sql
SELECT "object_type" FROM "3501_3600" WHERE "right_ascension_j2000"='11h10m42.8s';
## Task Generate a SQL query to answer the following question: `what is the object type when the right ascension (j2000) is 11h10m42.8s?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "3501_3600" ( "ngc_number" real, "object_type" text, "constellation" text, "right_ascension_j2000" text, "declination_j2000" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the object type when the right ascension (j2000) is 11h10m42.8s?`: ```sql
SELECT "declination_j2000" FROM "3501_3600" WHERE "ngc_number">3593;
## Task Generate a SQL query to answer the following question: `what is the declination (j2000) when the ngc number is higher than 3593?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "3501_3600" ( "ngc_number" real, "object_type" text, "constellation" text, "right_ascension_j2000" text, "declination_j2000" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the declination (j2000) when the ngc number is higher than 3593?`: ```sql
SELECT "constellation" FROM "3501_3600" WHERE "object_type"='spiral galaxy' AND "ngc_number"<3593 AND "right_ascension_j2000"='11h05m48.9s';
## Task Generate a SQL query to answer the following question: `what is the constellation when the object type is spiral galaxy, the ngc number is less than 3593 and the right ascension (j2000) is 11h05m48.9s?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "3501_3600" ( "ngc_number" real, "object_type" text, "constellation" text, "right_ascension_j2000" text, "declination_j2000" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the constellation when the object type is spiral galaxy, the ngc number is less than 3593 and the right ascension (j2000) is 11h05m48.9s?`: ```sql
SELECT "right_ascension_j2000" FROM "3501_3600" WHERE "ngc_number"=3576;
## Task Generate a SQL query to answer the following question: `what is the right ascension (j2000) when the ngc number is 3576?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "3501_3600" ( "ngc_number" real, "object_type" text, "constellation" text, "right_ascension_j2000" text, "declination_j2000" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the right ascension (j2000) when the ngc number is 3576?`: ```sql
SELECT "driver" FROM "race" WHERE "grid"='18';
## Task Generate a SQL query to answer the following question: `Who is the driver when the grid is 18?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" text, "time_retired" text, "grid" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the driver when the grid is 18?`: ```sql
SELECT "time_retired" FROM "race" WHERE "grid"='19';
## Task Generate a SQL query to answer the following question: `What is the time/retired when the grid is 19?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race" ( "driver" text, "constructor" text, "laps" text, "time_retired" text, "grid" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the time/retired when the grid is 19?`: ```sql
SELECT "home_team_score" FROM "round_16" WHERE "away_team"='st kilda';
## Task Generate a SQL query to answer the following question: `What was St Kilda's home team opponents score?` ### 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 was St Kilda's home team opponents score?`: ```sql
SELECT "home_team_score" FROM "round_14" WHERE "away_team"='carlton';
## Task Generate a SQL query to answer the following question: `What was the home team score at Carlton's away match?` ### 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 home team score at Carlton's away match?`: ```sql
SELECT "date" FROM "round_14" WHERE "home_team"='hawthorn';
## Task Generate a SQL query to answer the following question: `When did Hawthorn play at home?` ### 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 `When did Hawthorn play at home?`: ```sql
SELECT "crowd" FROM "round_14" WHERE "away_team"='st kilda';
## Task Generate a SQL query to answer the following question: `How many people were in attendance at St Kilda's away match?` ### 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 `How many people were in attendance at St Kilda's away match?`: ```sql
SELECT "venue" FROM "round_14" WHERE "home_team_score"='8.9 (57)';
## Task Generate a SQL query to answer the following question: `Where did the home team score 8.9 (57)?` ### 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 `Where did the home team score 8.9 (57)?`: ```sql
SELECT "date" FROM "round_14" WHERE "away_team_score"='7.16 (58)';
## Task Generate a SQL query to answer the following question: `When did the away team score 7.16 (58)?` ### 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 `When did the away team score 7.16 (58)?`: ```sql
SELECT "date" FROM "list_of_great_central_railway_locomotive" WHERE "description"='british rail class 111 tslrb';
## Task Generate a SQL query to answer the following question: `What is the date of the British Rail class 111 tslrb description?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_great_central_railway_locomotive" ( "number_name" text, "description" text, "livery" text, "owner_s" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of the British Rail class 111 tslrb description?`: ```sql
SELECT "number_name" FROM "list_of_great_central_railway_locomotive" WHERE "date"='undergoing overhaul, restoration or repairs';
## Task Generate a SQL query to answer the following question: `What is the number & name with an Undergoing overhaul, restoration or repairs date?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_great_central_railway_locomotive" ( "number_name" text, "description" text, "livery" text, "owner_s" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the number & name with an Undergoing overhaul, restoration or repairs date?`: ```sql
SELECT "number_name" FROM "list_of_great_central_railway_locomotive" WHERE "date"='1958';
## Task Generate a SQL query to answer the following question: `What is the number & name of the livery in 1958?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "list_of_great_central_railway_locomotive" ( "number_name" text, "description" text, "livery" text, "owner_s" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the number & name of the livery in 1958?`: ```sql
SELECT MIN("rank") FROM "medal_count" WHERE "silver">5 AND "total"=29 AND "bronze"<16;
## Task Generate a SQL query to answer the following question: `What is the lowest rank for a nation with 29 total medals, over 5 silvers, and under 16 bronze?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_count" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest rank for a nation with 29 total medals, over 5 silvers, and under 16 bronze?`: ```sql
SELECT MAX("rank") FROM "medal_count" WHERE "gold"=26 AND "silver">17;
## Task Generate a SQL query to answer the following question: `What is the highest rank for a nation with 26 golds and over 17 silvers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "medal_count" ( "rank" real, "nation" text, "gold" real, "silver" real, "bronze" real, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest rank for a nation with 26 golds and over 17 silvers?`: ```sql
SELECT "catalog" FROM "release_history" WHERE "date"='november 16, 2004';
## Task Generate a SQL query to answer the following question: `What is the catalog number with the date November 16, 2004?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalog" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the catalog number with the date November 16, 2004?`: ```sql
SELECT "date" FROM "release_history" WHERE "label"='sony bmg, epic' AND "catalog"='5187482';
## Task Generate a SQL query to answer the following question: `What is the date of the item with a label of Sony BMG, Epic and a Catalog number 5187482?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalog" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date of the item with a label of Sony BMG, Epic and a Catalog number 5187482?`: ```sql
SELECT "catalog" FROM "release_history" WHERE "region"='canada' AND "format"='cd/dvd';
## Task Generate a SQL query to answer the following question: `Which Catalog has a Region of Canada and a Format of cd/dvd?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalog" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Catalog has a Region of Canada and a Format of cd/dvd?`: ```sql
SELECT "date" FROM "release_history" WHERE "region"='europe' AND "format"='cd';
## Task Generate a SQL query to answer the following question: `What is the date for a CD format with a Region of Europe?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "release_history" ( "region" text, "date" text, "label" text, "format" text, "catalog" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the date for a CD format with a Region of Europe?`: ```sql
SELECT "nationality" FROM "l" WHERE "school_club_team"='la salle';
## Task Generate a SQL query to answer the following question: `What nationality is the la salle team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "l" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What nationality is the la salle team?`: ```sql
SELECT "nationality" FROM "l" WHERE "player"='jim les';
## Task Generate a SQL query to answer the following question: `What's the nationality of jim les?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "l" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What's the nationality of jim les?`: ```sql
SELECT "player" FROM "l" WHERE "nationality"='spain';
## Task Generate a SQL query to answer the following question: `Which player has a nationality of spain?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "l" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which player has a nationality of spain?`: ```sql
SELECT "position" FROM "l" WHERE "school_club_team"='nebraska';
## Task Generate a SQL query to answer the following question: `What position is listed for the nebraska team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "l" ( "player" text, "nationality" text, "position" text, "years_for_jazz" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What position is listed for the nebraska team?`: ```sql
SELECT "home" FROM "october" WHERE "decision"='ward' AND "date"='october 24';
## Task Generate a SQL query to answer the following question: `On October 24, who played at home when there was a decision of Ward?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "october" ( "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 `On October 24, who played at home when there was a decision of Ward?`: ```sql
SELECT "laps" FROM "classification" WHERE "grid"=8;
## Task Generate a SQL query to answer the following question: `How many laps are there for grid 8?` ### 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 are there for grid 8?`: ```sql
SELECT "driver" FROM "classification" WHERE "grid"=8;
## Task Generate a SQL query to answer the following question: `What is the driver for Grid 8?` ### 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 `What is the driver for Grid 8?`: ```sql
SELECT AVG("grid") FROM "classification" WHERE "driver"='clay regazzoni';
## Task Generate a SQL query to answer the following question: `What is the average grid for Clay Regazzoni?` ### 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 `What is the average grid for Clay Regazzoni?`: ```sql
SELECT AVG("laps") FROM "classification" WHERE "grid"<21 AND "driver"='renzo zorzi';
## Task Generate a SQL query to answer the following question: `What is the average laps for the grid smaller than 21 for Renzo Zorzi?` ### 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 `What is the average laps for the grid smaller than 21 for Renzo Zorzi?`: ```sql
SELECT AVG("laps") FROM "classification" WHERE "grid"=9;
## Task Generate a SQL query to answer the following question: `What is the average laps for Grid 9?` ### 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 `What is the average laps for Grid 9?`: ```sql
SELECT "constituted" FROM "ministries" WHERE "party"='labor' AND "name"='scullin ministry';
## Task Generate a SQL query to answer the following question: `Name the constituted for labor and scullin ministry` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "ministries" ( "order" real, "name" text, "party" text, "constituted" text, "concluded" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the constituted for labor and scullin ministry`: ```sql
SELECT "location" FROM "tournament_results" WHERE "1st_prize">'202,500' AND "score"='274 (-14)';
## Task Generate a SQL query to answer the following question: `What location is the tournament with a 1st Prize larger than $202,500, and a Score of 274 (-14)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tournament_results" ( "date" text, "tournament" text, "location" text, "purse" real, "winner" text, "score" text, "1st_prize" real ); ### SQL Given the database schema, here is the SQL query that answers `What location is the tournament with a 1st Prize larger than $202,500, and a Score of 274 (-14)?`: ```sql