output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "home_team_score" FROM "round_8" WHERE "away_team"='north melbourne';
## Task Generate a SQL query to answer the following question: `What was Collingwood's score when they played against North Melbourne at home?` ### 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 was Collingwood's score when they played against North Melbourne at home?`: ```sql
SELECT "home_team_score" FROM "round_8" WHERE "away_team"='melbourne';
## Task Generate a SQL query to answer the following question: `What was the home team score at Melbourne's away match?` ### 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 was the home team score at Melbourne's away match?`: ```sql
SELECT MIN("crowd") FROM "round_8" WHERE "home_team"='hawthorn';
## Task Generate a SQL query to answer the following question: `How many people were in attendance at Hawthorn's home match?` ### 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 `How many people were in attendance at Hawthorn's home match?`: ```sql
SELECT "capital" FROM "polish_voivodeships_1919_1939" WHERE "voivodeship_separate_city"='białostockie';
## Task Generate a SQL query to answer the following question: `what is the capital with the Voivodeship Separate city of białostockie?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "polish_voivodeships_1919_1939" ( "car_plates_since_1937" text, "voivodeship_separate_city" text, "capital" text, "area_in_1000km_1930" text, "population_in_1000_1931" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the capital with the Voivodeship Separate city of białostockie?`: ```sql
SELECT "population_in_1000_1931" FROM "polish_voivodeships_1919_1939" WHERE "car_plates_since_1937"='80-84';
## Task Generate a SQL query to answer the following question: `between car plates of 80-84 what is the population in 1000 in year 1931?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "polish_voivodeships_1919_1939" ( "car_plates_since_1937" text, "voivodeship_separate_city" text, "capital" text, "area_in_1000km_1930" text, "population_in_1000_1931" text ); ### SQL Given the database schema, here is the SQL query that answers `between car plates of 80-84 what is the population in 1000 in year 1931?`: ```sql
SELECT "population_in_1000_1931" FROM "polish_voivodeships_1919_1939" WHERE "car_plates_since_1937"='35-39';
## Task Generate a SQL query to answer the following question: `tell me the population in 1000(1931) that has car plates since 1937 of 35-39.` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "polish_voivodeships_1919_1939" ( "car_plates_since_1937" text, "voivodeship_separate_city" text, "capital" text, "area_in_1000km_1930" text, "population_in_1000_1931" text ); ### SQL Given the database schema, here is the SQL query that answers `tell me the population in 1000(1931) that has car plates since 1937 of 35-39.`: ```sql
SELECT "capital" FROM "polish_voivodeships_1919_1939" WHERE "area_in_1000km_1930"='20,4';
## Task Generate a SQL query to answer the following question: `tell me the name of the capital with an area of 20,4.` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "polish_voivodeships_1919_1939" ( "car_plates_since_1937" text, "voivodeship_separate_city" text, "capital" text, "area_in_1000km_1930" text, "population_in_1000_1931" text ); ### SQL Given the database schema, here is the SQL query that answers `tell me the name of the capital with an area of 20,4.`: ```sql
SELECT "date" FROM "international_tries" WHERE "opponent"='wales';
## Task Generate a SQL query to answer the following question: `When did they play against Wales?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_tries" ( "date" text, "venue" text, "opponent" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `When did they play against Wales?`: ```sql
SELECT "result" FROM "international_tries" WHERE "date"='29/09/07';
## Task Generate a SQL query to answer the following question: `What was the result on 29/09/07?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_tries" ( "date" text, "venue" text, "opponent" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the result on 29/09/07?`: ```sql
SELECT "competition" FROM "international_tries" WHERE "date"='25/08/07';
## Task Generate a SQL query to answer the following question: `What was the competition on 25/08/07?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "international_tries" ( "date" text, "venue" text, "opponent" text, "result" text, "competition" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the competition on 25/08/07?`: ```sql
SELECT AVG("pos") FROM "race_2" WHERE "time"='20:39.171';
## Task Generate a SQL query to answer the following question: `What position is associated with a Time of 20:39.171?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_2" ( "pos" real, "driver" text, "time" text, "best_time" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `What position is associated with a Time of 20:39.171?`: ```sql
SELECT AVG("points") FROM "race_2" WHERE "best_time"='01:46.367';
## Task Generate a SQL query to answer the following question: `How many points associated with a Best time of 01:46.367?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "race_2" ( "pos" real, "driver" text, "time" text, "best_time" text, "points" real ); ### SQL Given the database schema, here is the SQL query that answers `How many points associated with a Best time of 01:46.367?`: ```sql
SELECT COUNT("reg_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "rd_num"=7 AND "player"='ilya krikunov' AND "pick_num">223;
## Task Generate a SQL query to answer the following question: `What is the total reg gp of Ilya Krikunov, who has a round of 7 and a pick number larger than 223?` ### 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 total reg gp of Ilya Krikunov, who has a round of 7 and a pick number larger than 223?`: ```sql
SELECT COUNT("pl_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "pick_num"=49 AND "reg_gp"<0;
## Task Generate a SQL query to answer the following question: `What is the total PI GP of the player with a pick number 49 and a reg gp less 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 total PI GP of the player with a pick number 49 and a reg gp less than 0?`: ```sql
SELECT SUM("pick_num") FROM "list_of_vancouver_canucks_draft_picks" WHERE "pl_gp"<0;
## Task Generate a SQL query to answer the following question: `What is the pick # of the player with a PI GP less 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 pick # of the player with a PI GP less than 0?`: ```sql
SELECT SUM("reg_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "rd_num"<2;
## Task Generate a SQL query to answer the following question: `What is the reg gp of the player with a round number less than 2?` ### 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 reg gp of the player with a round number less than 2?`: ```sql
SELECT AVG("pl_gp") FROM "list_of_vancouver_canucks_draft_picks" WHERE "rd_num"=5 AND "pick_num">151;
## Task Generate a SQL query to answer the following question: `What is the average PI GP of the player from round 5 with a pick # larger than 151?` ### 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 average PI GP of the player from round 5 with a pick # larger than 151?`: ```sql
SELECT "constellation" FROM "5801_5900" WHERE "declination_j2000"='°32′39″';
## Task Generate a SQL query to answer the following question: `What constellation has a Declination ( J2000 ) of °32′39″?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "5801_5900" ( "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 constellation has a Declination ( J2000 ) of °32′39″?`: ```sql
SELECT MIN("pick_num") FROM "round_five" WHERE "league_from"='elitserien (sweden)';
## Task Generate a SQL query to answer the following question: `What is the lowest pick from Elitserien (Sweden)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_five" ( "pick_num" real, "player" text, "nationality" text, "position" text, "team_from" text, "league_from" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the lowest pick from Elitserien (Sweden)?`: ```sql
SELECT "venue" FROM "round_7" WHERE "home_team_score"='10.12 (72)';
## Task Generate a SQL query to answer the following question: `Where was the game played when the home team scored 10.12 (72)?` ### 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 `Where was the game played when the home team scored 10.12 (72)?`: ```sql
SELECT SUM("crowd") FROM "round_7" WHERE "away_team"='richmond';
## Task Generate a SQL query to answer the following question: `How many spectators were at the game where Richmond was the away 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 `How many spectators were at the game where Richmond was the away team?`: ```sql
SELECT "location" FROM "tamil_nadu_government_allopathic_western" WHERE "college_name"='kanyakumari government medical college';
## Task Generate a SQL query to answer the following question: `What is the location of the kanyakumari government medical college?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tamil_nadu_government_allopathic_western" ( "college_name" text, "location" text, "district" text, "affiliation" text, "estd" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the location of the kanyakumari government medical college?`: ```sql
SELECT "affiliation" FROM "tamil_nadu_government_allopathic_western" WHERE "estd"='1982' AND "location"='coimbatore';
## Task Generate a SQL query to answer the following question: `Where is the coimbatore affilation that was established in 1982?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tamil_nadu_government_allopathic_western" ( "college_name" text, "location" text, "district" text, "affiliation" text, "estd" text ); ### SQL Given the database schema, here is the SQL query that answers `Where is the coimbatore affilation that was established in 1982?`: ```sql
SELECT "location" FROM "tamil_nadu_government_allopathic_western" WHERE "district"='salem district';
## Task Generate a SQL query to answer the following question: `What is the location of the salem district?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tamil_nadu_government_allopathic_western" ( "college_name" text, "location" text, "district" text, "affiliation" text, "estd" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the location of the salem district?`: ```sql
SELECT "location" FROM "tamil_nadu_government_allopathic_western" WHERE "district"='tiruchirappalli district';
## Task Generate a SQL query to answer the following question: `What is the location of the tiruchirappalli district?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tamil_nadu_government_allopathic_western" ( "college_name" text, "location" text, "district" text, "affiliation" text, "estd" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the location of the tiruchirappalli district?`: ```sql
SELECT "district" FROM "tamil_nadu_government_allopathic_western" WHERE "college_name"='thanjavur medical college';
## Task Generate a SQL query to answer the following question: `What is the district where the thanjavur medical college is located?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tamil_nadu_government_allopathic_western" ( "college_name" text, "location" text, "district" text, "affiliation" text, "estd" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the district where the thanjavur medical college is located?`: ```sql
SELECT "location" FROM "tamil_nadu_government_allopathic_western" WHERE "college_name"='coimbatore medical college';
## Task Generate a SQL query to answer the following question: `Where is the location of the coimbatore medical college?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "tamil_nadu_government_allopathic_western" ( "college_name" text, "location" text, "district" text, "affiliation" text, "estd" text ); ### SQL Given the database schema, here is the SQL query that answers `Where is the location of the coimbatore medical college?`: ```sql
SELECT "time_retired" FROM "classification" WHERE "grid">9 AND "driver"='rolf stommelen';
## Task Generate a SQL query to answer the following question: `What is the Time/Retired when the grid is larger than 9 and Rolf Stommelen is the driver?` ### 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 Time/Retired when the grid is larger than 9 and Rolf Stommelen is the driver?`: ```sql
SELECT MAX("laps") FROM "classification" WHERE "time_retired"='differential';
## Task Generate a SQL query to answer the following question: `What is the highest number of laps when the Time/Retired is differential?` ### 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 highest number of laps when the Time/Retired is differential?`: ```sql
SELECT "driver" FROM "classification" WHERE "laps"<14 AND "grid"<16 AND "time_retired"='not classified';
## Task Generate a SQL query to answer the following question: `Who is the driver when the laps are smaller than 14, the grid is smaller than 16, and the Time/retired is not classified?` ### 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 `Who is the driver when the laps are smaller than 14, the grid is smaller than 16, and the Time/retired is not classified?`: ```sql
SELECT AVG("grid") FROM "classification" WHERE "laps"<14 AND "driver"='reine wisell';
## Task Generate a SQL query to answer the following question: `What is the average grid when the laps are smaller than 14 and Reine Wisell is the driver?` ### 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 when the laps are smaller than 14 and Reine Wisell is the driver?`: ```sql
SELECT "entrant" FROM "teams_and_drivers" WHERE "engine"='renault rs8 3.0 v10' AND "driver"='damon hill';
## Task Generate a SQL query to answer the following question: `Who is the entrant with a driver Damon Hill and a Renault RS8 3.0 V10 engine?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "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 is the entrant with a driver Damon Hill and a Renault RS8 3.0 V10 engine?`: ```sql
SELECT "constructor" FROM "teams_and_drivers" WHERE "rounds"='all' AND "engine"='peugeot a12 ev5 3.0 v10';
## Task Generate a SQL query to answer the following question: `Who is the constructor of the car with a Peugeot A12 EV5 3.0 V10 engine that competed in all rounds?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "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 is the constructor of the car with a Peugeot A12 EV5 3.0 V10 engine that competed in all rounds?`: ```sql
SELECT "engine" FROM "teams_and_drivers" WHERE "rounds"='all' AND "entrant"='scuderia ferrari';
## Task Generate a SQL query to answer the following question: `What kind of engine is in the car for Scuderia Ferrari that went all rounds?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "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 kind of engine is in the car for Scuderia Ferrari that went all rounds?`: ```sql
SELECT "constructor" FROM "teams_and_drivers" WHERE "chassis"='196';
## Task Generate a SQL query to answer the following question: `Who is the constructor of the 196 chassis?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "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 is the constructor of the 196 chassis?`: ```sql
SELECT "home" FROM "december" WHERE "visitor"='kings';
## Task Generate a SQL query to answer the following question: `Name the home with visitor of kings` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "december" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the home with visitor of kings`: ```sql
SELECT COUNT("attendance") FROM "december" WHERE "visitor"='cavaliers';
## Task Generate a SQL query to answer the following question: `Name the total number of attendance when the cavaliers visited` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "december" ( "date" text, "visitor" text, "score" text, "home" text, "leading_scorer" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number of attendance when the cavaliers visited`: ```sql
SELECT "women_s_doubles" FROM "21st_century" WHERE "men_s_singles"='ville lång';
## Task Generate a SQL query to answer the following question: `Which women's doubles had the accompanying Men's singles player Ville Lång?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "21st_century" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Which women's doubles had the accompanying Men's singles player Ville Lång?`: ```sql
SELECT "mixed_doubles" FROM "21st_century" WHERE "year"=2006;
## Task Generate a SQL query to answer the following question: `Which mixed doubles was featured in 2006?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "21st_century" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Which mixed doubles was featured in 2006?`: ```sql
SELECT "women_s_doubles" FROM "21st_century" WHERE "men_s_singles"='kenichi tago';
## Task Generate a SQL query to answer the following question: `Which women's doubles had the men's singles player Kenichi Tago?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "21st_century" ( "year" real, "men_s_singles" text, "women_s_singles" text, "men_s_doubles" text, "women_s_doubles" text, "mixed_doubles" text ); ### SQL Given the database schema, here is the SQL query that answers `Which women's doubles had the men's singles player Kenichi Tago?`: ```sql
SELECT MAX("crowd") FROM "round_17" WHERE "venue"='corio oval';
## Task Generate a SQL query to answer the following question: `In the games at corio oval, what was the highest crowd?` ### 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 `In the games at corio oval, what was the highest crowd?`: ```sql
SELECT "away_team" FROM "round_17" WHERE "venue"='corio oval';
## Task Generate a SQL query to answer the following question: `In the match as corio oval, who was 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 `In the match as corio oval, who was the away team?`: ```sql
SELECT AVG("communes") FROM "complete_list" WHERE "cantons">10 AND "area_square_km"='1,589';
## Task Generate a SQL query to answer the following question: `How many communes associated with over 10 cantons and an area (Square km) of 1,589?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "complete_list" ( "dep" text, "chief_town" text, "arrondissement" text, "population_1999" text, "area_square_km" real, "pop_density" real, "cantons" real, "communes" real ); ### SQL Given the database schema, here is the SQL query that answers `How many communes associated with over 10 cantons and an area (Square km) of 1,589?`: ```sql
SELECT "decision" FROM "january" WHERE "date"='january 12';
## Task Generate a SQL query to answer the following question: `Which team won the game on January 12?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "january" ( "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 `Which team won the game on January 12?`: ```sql
SELECT "home_team_score" FROM "round_13" WHERE "away_team"='geelong';
## Task Generate a SQL query to answer the following question: `Who was the home team against Geelong?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_13" ( "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 the home team against Geelong?`: ```sql
SELECT COUNT("crowd") FROM "round_13" WHERE "venue"='mcg';
## Task Generate a SQL query to answer the following question: `What was the attendance when the VFL played MCG?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_13" ( "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 when the VFL played MCG?`: ```sql
SELECT "security_forces" FROM "casualties" WHERE "civilians"='67';
## Task Generate a SQL query to answer the following question: `Name the security forces with civilians of 67` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "casualties" ( "year" text, "security_forces" text, "insurgents" text, "civilians" text, "total" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the security forces with civilians of 67`: ```sql
SELECT "insurgents" FROM "casualties" WHERE "civilians"='49';
## Task Generate a SQL query to answer the following question: `Name the insurgents for civilians being 49` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "casualties" ( "year" text, "security_forces" text, "insurgents" text, "civilians" text, "total" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the insurgents for civilians being 49`: ```sql
SELECT "security_forces" FROM "casualties" WHERE "civilians"='67';
## Task Generate a SQL query to answer the following question: `Name the security forces with civilians being 67` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "casualties" ( "year" text, "security_forces" text, "insurgents" text, "civilians" text, "total" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the security forces with civilians being 67`: ```sql
SELECT "security_forces" FROM "casualties" WHERE "year"='2009';
## Task Generate a SQL query to answer the following question: `Name the security forces for 2009` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "casualties" ( "year" text, "security_forces" text, "insurgents" text, "civilians" text, "total" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the security forces for 2009`: ```sql
SELECT "security_forces" FROM "casualties" WHERE "total"='849';
## Task Generate a SQL query to answer the following question: `Tell me the security forces for 849 total` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "casualties" ( "year" text, "security_forces" text, "insurgents" text, "civilians" text, "total" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the security forces for 849 total`: ```sql
SELECT "tyre" FROM "teams_and_drivers" WHERE "chassis"='p57 p61';
## Task Generate a SQL query to answer the following question: `What tyre has a chassis of p57 p61?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "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 tyre has a chassis of p57 p61?`: ```sql
SELECT MAX("laps") FROM "classification" WHERE "grid"=1;
## Task Generate a SQL query to answer the following question: `what is the highest laps when the grid is 1?` ### 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 highest laps when the grid is 1?`: ```sql
SELECT COUNT("total") FROM "results" WHERE "swimming_time_pts"='2:20.93 (1232)';
## Task Generate a SQL query to answer the following question: `How many athletes had a Swimming Time (pts) of 2:20.93 (1232)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "athlete" text, "shooting_score_pts" text, "fencing_victories_pts" text, "swimming_time_pts" text, "riding_penalties_pts" text, "running_time_pts" text, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `How many athletes had a Swimming Time (pts) of 2:20.93 (1232)?`: ```sql
SELECT "riding_penalties_pts" FROM "results" WHERE "swimming_time_pts"='2:18.16 (1264)';
## Task Generate a SQL query to answer the following question: `What is the riding penaltie (pts) for the athlete that has a Swimming Time (pts) of 2:18.16 (1264)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "results" ( "athlete" text, "shooting_score_pts" text, "fencing_victories_pts" text, "swimming_time_pts" text, "riding_penalties_pts" text, "running_time_pts" text, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the riding penaltie (pts) for the athlete that has a Swimming Time (pts) of 2:18.16 (1264)?`: ```sql
SELECT "owner_s" FROM "list_of_great_central_railway_locomotive" WHERE "date"=1956 AND "description"='mark 1 pos';
## Task Generate a SQL query to answer the following question: `Which owner has a description of Mark 1 pos and is dated 1956?` ### 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" real ); ### SQL Given the database schema, here is the SQL query that answers `Which owner has a description of Mark 1 pos and is dated 1956?`: ```sql
SELECT "owner_s" FROM "list_of_great_central_railway_locomotive" WHERE "date"=1953 AND "description"='mark 1 ck';
## Task Generate a SQL query to answer the following question: `Which owner has a description of Mark 1 CK and is dated 1953?` ### 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" real ); ### SQL Given the database schema, here is the SQL query that answers `Which owner has a description of Mark 1 CK and is dated 1953?`: ```sql
SELECT "name_athlete" FROM "final_classification" WHERE "semi"='1:43.79';
## Task Generate a SQL query to answer the following question: `Who was the athlete who had SEMI of 1:43.79?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_classification" ( "name_athlete" text, "final" text, "lane" real, "semi" text, "heat" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the athlete who had SEMI of 1:43.79?`: ```sql
SELECT "final" FROM "final_classification" WHERE "lane"=4;
## Task Generate a SQL query to answer the following question: `What were the final time for the swimmer on lane 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "final_classification" ( "name_athlete" text, "final" text, "lane" real, "semi" text, "heat" text ); ### SQL Given the database schema, here is the SQL query that answers `What were the final time for the swimmer on lane 4?`: ```sql
SELECT "final_score" FROM "2007" WHERE "stadium"='lambeau field';
## Task Generate a SQL query to answer the following question: `What is the final score of the game at lambeau field?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2007" ( "date" text, "visiting_team" text, "final_score" text, "host_team" text, "stadium" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the final score of the game at lambeau field?`: ```sql
SELECT MIN("rank") FROM "unsuccessful_candidates" WHERE "candidate_name"='aliyya qadi' AND "votes"<1421;
## Task Generate a SQL query to answer the following question: `What rank is aliyya qadi with less than 1421 votes?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "unsuccessful_candidates" ( "rank" real, "list" text, "candidate_name" text, "gender" text, "religion" text, "votes" real ); ### SQL Given the database schema, here is the SQL query that answers `What rank is aliyya qadi with less than 1421 votes?`: ```sql
SELECT "candidate_name" FROM "unsuccessful_candidates" WHERE "votes">279 AND "rank"<50 AND "gender"='♀' AND "list"='al-ahd';
## Task Generate a SQL query to answer the following question: `Which candidate has more than 279 votes, rank less than 50, is ♀ and al-ahd?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "unsuccessful_candidates" ( "rank" real, "list" text, "candidate_name" text, "gender" text, "religion" text, "votes" real ); ### SQL Given the database schema, here is the SQL query that answers `Which candidate has more than 279 votes, rank less than 50, is ♀ and al-ahd?`: ```sql
SELECT MIN("year") FROM "original_broadway_production" WHERE "category"='favorite male replacement' AND "nominee"='ben vereen';
## Task Generate a SQL query to answer the following question: `What is the first year that the Favorite Male Replacement category had Ben Vereen as a nominee?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "original_broadway_production" ( "year" real, "award_ceremony" text, "category" text, "nominee" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the first year that the Favorite Male Replacement category had Ben Vereen as a nominee?`: ```sql
SELECT "award_ceremony" FROM "original_broadway_production" WHERE "category"='outstanding actress in a musical' AND "nominee"='kristin chenoweth';
## Task Generate a SQL query to answer the following question: `What year was Kristin Chenoweth nominated in the category of outstanding actress in a musical?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "original_broadway_production" ( "year" real, "award_ceremony" text, "category" text, "nominee" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What year was Kristin Chenoweth nominated in the category of outstanding actress in a musical?`: ```sql
SELECT AVG("year") FROM "original_broadway_production" WHERE "result"='nominated' AND "category"='favorite male replacement' AND "nominee"='aaron tveit';
## Task Generate a SQL query to answer the following question: `What year was Aaron Tveit nominated in the Favorite Male Replacement category?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "original_broadway_production" ( "year" real, "award_ceremony" text, "category" text, "nominee" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `What year was Aaron Tveit nominated in the Favorite Male Replacement category?`: ```sql
SELECT "date" FROM "round_17" WHERE "away_team_score"='6.16 (52)';
## Task Generate a SQL query to answer the following question: `What is the date an away ream scored 6.16 (52)?` ### 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 is the date an away ream scored 6.16 (52)?`: ```sql
SELECT "away_team" FROM "round_17" WHERE "home_team_score"='10.17 (77)';
## Task Generate a SQL query to answer the following question: `What is the away team that played when the home team scored 10.17 (77)?` ### 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 is the away team that played when the home team scored 10.17 (77)?`: ```sql
SELECT SUM("rank") FROM "pairs" WHERE "placings"=58;
## Task Generate a SQL query to answer the following question: `Tell me the sum of rank for placings of 58` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "pairs" ( "rank" real, "name" text, "nation" text, "points" real, "placings" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the sum of rank for placings of 58`: ```sql
SELECT MIN("placings") FROM "pairs" WHERE "nation"='united kingdom' AND "rank"<13;
## Task Generate a SQL query to answer the following question: `Tell me the lowest placings for United Kingdom and rank less than 13` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "pairs" ( "rank" real, "name" text, "nation" text, "points" real, "placings" real ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the lowest placings for United Kingdom and rank less than 13`: ```sql
SELECT MAX("rank") FROM "pairs" WHERE "placings">123 AND "points">88.06;
## Task Generate a SQL query to answer the following question: `I want to know the highest rank with placings more than 123 and points greater than 88.06` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "pairs" ( "rank" real, "name" text, "nation" text, "points" real, "placings" real ); ### SQL Given the database schema, here is the SQL query that answers `I want to know the highest rank with placings more than 123 and points greater than 88.06`: ```sql
SELECT "driver" FROM "teams_and_drivers" WHERE "entrant"='scuderia ambrosiana';
## Task Generate a SQL query to answer the following question: `Who is the drive for an Entrant of Scuderia Ambrosiana?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "entrant" text, "constructor" text, "chassis" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the drive for an Entrant of Scuderia Ambrosiana?`: ```sql
SELECT "rounds" FROM "teams_and_drivers" WHERE "entrant"='automobiles talbot-darracq' AND "driver"='pierre levegh';
## Task Generate a SQL query to answer the following question: `Which of the Rounds has an Entrant of automobiles Talbot-Darracq, and Pierre Levegh as the driver?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "entrant" text, "constructor" text, "chassis" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `Which of the Rounds has an Entrant of automobiles Talbot-Darracq, and Pierre Levegh as the driver?`: ```sql
SELECT "driver" FROM "teams_and_drivers" WHERE "entrant"='enrico platé';
## Task Generate a SQL query to answer the following question: `Who is the driver for the Entract of Enrico Platé?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "entrant" text, "constructor" text, "chassis" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the driver for the Entract of Enrico Platé?`: ```sql
SELECT "entrant" FROM "teams_and_drivers" WHERE "driver"='luigi fagioli';
## Task Generate a SQL query to answer the following question: `Which of the entrants had Luigi Fagioli as a driver?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "entrant" text, "constructor" text, "chassis" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `Which of the entrants had Luigi Fagioli as a driver?`: ```sql
SELECT "driver" FROM "teams_and_drivers" WHERE "constructor"='era' AND "entrant"='t.a.s.o. mathieson';
## Task Generate a SQL query to answer the following question: `Who is the driver whose Constructor was Era, and whose entrant was T.A.S.O. Mathieson?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "entrant" text, "constructor" text, "chassis" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the driver whose Constructor was Era, and whose entrant was T.A.S.O. Mathieson?`: ```sql
SELECT "chassis" FROM "teams_and_drivers" WHERE "rounds"='7' AND "entrant"='ecurie rosier';
## Task Generate a SQL query to answer the following question: `Which chassis had Rounds of 7, and an Entrant of Ecurie Rosier?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "teams_and_drivers" ( "entrant" text, "constructor" text, "chassis" text, "driver" text, "rounds" text ); ### SQL Given the database schema, here is the SQL query that answers `Which chassis had Rounds of 7, and an Entrant of Ecurie Rosier?`: ```sql
SELECT "winning_constructor" FROM "grands_prix" WHERE "winning_driver"='riccardo patrese';
## Task Generate a SQL query to answer the following question: `Who is the winner constructor with driver riccardo patrese?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "round" real, "grand_prix" text, "date" text, "location" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the winner constructor with driver riccardo patrese?`: ```sql
SELECT MAX("round") FROM "grands_prix" WHERE "date"='5 april';
## Task Generate a SQL query to answer the following question: `What is the highest round on 5 april?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "round" real, "grand_prix" text, "date" text, "location" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest round on 5 april?`: ```sql
SELECT "date" FROM "grands_prix" WHERE "location"='hermanos rodríguez';
## Task Generate a SQL query to answer the following question: `Which date was hermanos rodríguez the location?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "grands_prix" ( "round" real, "grand_prix" text, "date" text, "location" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "winning_constructor" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Which date was hermanos rodríguez the location?`: ```sql
SELECT "record" FROM "game_log" WHERE "date"='may 3';
## Task Generate a SQL query to answer the following question: `Name the record for may 3` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the record for may 3`: ```sql
SELECT COUNT("attendance") FROM "game_log" WHERE "date"='may 1';
## Task Generate a SQL query to answer the following question: `Name the total number in attendance for may 1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the total number in attendance for may 1`: ```sql
SELECT "loss" FROM "game_log" WHERE "date"='may 29';
## Task Generate a SQL query to answer the following question: `Name the loss on may 29` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the loss on may 29`: ```sql
SELECT SUM("cuts_made") FROM "summary" WHERE "wins"<1 AND "top_5"=1 AND "top_10">4;
## Task Generate a SQL query to answer the following question: `How many cuts were made when there weren't any wins but had a top-5 of 1 and a top 10 larger than 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "summary" ( "tournament" text, "wins" real, "top_5" real, "top_10" real, "top_25" real, "events" real, "cuts_made" real ); ### SQL Given the database schema, here is the SQL query that answers `How many cuts were made when there weren't any wins but had a top-5 of 1 and a top 10 larger than 4?`: ```sql
SELECT "college" FROM "2012_boys_team" WHERE "player"='shabazz muhammad';
## Task Generate a SQL query to answer the following question: `Which college has a Player of shabazz muhammad?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Which college has a Player of shabazz muhammad?`: ```sql
SELECT "height" FROM "2012_boys_team" WHERE "player"='nerlens noel';
## Task Generate a SQL query to answer the following question: `How tall is nerlens noel?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `How tall is nerlens noel?`: ```sql
SELECT "player" FROM "2012_boys_team" WHERE "hometown"='flower mound, tx';
## Task Generate a SQL query to answer the following question: `Who is from flower mound, tx?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is from flower mound, tx?`: ```sql
SELECT "hometown" FROM "2012_boys_team" WHERE "player"='shabazz muhammad';
## Task Generate a SQL query to answer the following question: `Where is shabazz muhammad from?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2012_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Where is shabazz muhammad from?`: ```sql
SELECT "opponent" FROM "game_log" WHERE "date"='july 21';
## Task Generate a SQL query to answer the following question: `What was the opponent for july 21?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the opponent for july 21?`: ```sql
SELECT "record" FROM "game_log" WHERE "date"='july 24';
## Task Generate a SQL query to answer the following question: `What was the record on july 24?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "game_log" ( "date" text, "opponent" text, "score" text, "loss" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the record on july 24?`: ```sql
SELECT "constructor" FROM "race" WHERE "grid"<15 AND "laps"=77 AND "time_retired"='+ 0.771';
## Task Generate a SQL query to answer the following question: `Who constructed the car with a grid under 15, 77 laps, and a Time/Retired of + 0.771?` ### 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 constructed the car with a grid under 15, 77 laps, and a Time/Retired of + 0.771?`: ```sql
SELECT AVG("grid") FROM "race" WHERE "laps">74 AND "driver"='damon hill';
## Task Generate a SQL query to answer the following question: `What is the average grid for damon hill with over 74 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 average grid for damon hill with over 74 laps?`: ```sql
SELECT "pos" FROM "draft" WHERE "school_club_team"='jacksonville';
## Task Generate a SQL query to answer the following question: `Which position has a School/club team of jacksonville?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "draft" ( "round" real, "pick" real, "player" text, "pos" text, "nationality" text, "team" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which position has a School/club team of jacksonville?`: ```sql
SELECT SUM("round") FROM "draft" WHERE "pick"=13;
## Task Generate a SQL query to answer the following question: `How many rounds have a Pick of 13?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "draft" ( "round" real, "pick" real, "player" text, "pos" text, "nationality" text, "team" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `How many rounds have a Pick of 13?`: ```sql
SELECT SUM("round") FROM "draft" WHERE "school_club_team"='pan american';
## Task Generate a SQL query to answer the following question: `How many rounds have School/club team of pan american?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "draft" ( "round" real, "pick" real, "player" text, "pos" text, "nationality" text, "team" text, "school_club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `How many rounds have School/club team of pan american?`: ```sql
SELECT MIN("year") FROM "complete_formula_one_world_championship_" WHERE "chassis"='ferrari 312t' AND "points"='31';
## Task Generate a SQL query to answer the following question: `What is the earliest year a chassis of ferrari 312t and results of 31 points occurred?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the earliest year a chassis of ferrari 312t and results of 31 points occurred?`: ```sql
SELECT "chassis" FROM "complete_formula_one_world_championship_" WHERE "points"='25';
## Task Generate a SQL query to answer the following question: `What is the chassis when there is 25 points?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the chassis when there is 25 points?`: ```sql
SELECT "points" FROM "complete_formula_one_world_championship_" WHERE "year"<1979 AND "chassis"='ferrari 312b2';
## Task Generate a SQL query to answer the following question: `How many points were there before 1979 with a ferrari 312b2 chassis?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `How many points were there before 1979 with a ferrari 312b2 chassis?`: ```sql
SELECT "year" FROM "complete_formula_one_world_championship_" WHERE "points"='29 (32)';
## Task Generate a SQL query to answer the following question: `What year were there 29 (32) points?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "complete_formula_one_world_championship_" ( "year" real, "entrant" text, "chassis" text, "engine" text, "points" text ); ### SQL Given the database schema, here is the SQL query that answers `What year were there 29 (32) points?`: ```sql
SELECT "result" FROM "2004_05_middlesbrough_f_c_season" WHERE "round"='4 leg 2';
## Task Generate a SQL query to answer the following question: `What result occurs when the round is 4 leg 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2004_05_middlesbrough_f_c_season" ( "round" text, "date" text, "opponent" text, "venue" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What result occurs when the round is 4 leg 2?`: ```sql
SELECT "result" FROM "2004_05_middlesbrough_f_c_season" WHERE "attendance">'20,371' AND "round"='4 leg 2';
## Task Generate a SQL query to answer the following question: `What was the result for the round of 4 leg 2 when the attendance was less than 20,371?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "2004_05_middlesbrough_f_c_season" ( "round" text, "date" text, "opponent" text, "venue" text, "result" text, "attendance" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the result for the round of 4 leg 2 when the attendance was less than 20,371?`: ```sql