output
stringlengths
27
479
instruction
stringlengths
407
1.39k
SELECT "winning_driver" FROM "season_review" WHERE "race"='dutch grand prix';
## Task Generate a SQL query to answer the following question: `Who was the winning driver for the Dutch Grand Prix?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_review" ( "race" text, "circuit" text, "date" text, "pole_position" text, "fastest_lap" text, "winning_driver" text, "constructor" text, "tyre" text, "report" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the winning driver for the Dutch Grand Prix?`: ```sql
SELECT "song" FROM "songs_by_tanvi" WHERE "year"<2013 AND "music_director"='yuvan shankar raja' AND "film"='billa ii';
## Task Generate a SQL query to answer the following question: `Tell me the song with year before 2013 and music director of yuvan shankar raja and film of billa ii` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "songs_by_tanvi" ( "film" text, "song" text, "year" real, "music_director" text, "language" text ); ### SQL Given the database schema, here is the SQL query that answers `Tell me the song with year before 2013 and music director of yuvan shankar raja and film of billa ii`: ```sql
SELECT "title" FROM "season_4_1998" WHERE "original_air_date"='march 19, 1998';
## Task Generate a SQL query to answer the following question: `What title aired on March 19, 1998?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_4_1998" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "original_air_date" text, "production_code" text ); ### SQL Given the database schema, here is the SQL query that answers `What title aired on March 19, 1998?`: ```sql
SELECT "directed_by" FROM "season_4_1998" WHERE "production_code"='k2708';
## Task Generate a SQL query to answer the following question: `Who directed the show with the production code k2708?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_4_1998" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "original_air_date" text, "production_code" text ); ### SQL Given the database schema, here is the SQL query that answers `Who directed the show with the production code k2708?`: ```sql
SELECT "season_num" FROM "season_4_1998" WHERE "series_num"=81;
## Task Generate a SQL query to answer the following question: `What is the season for series 81?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "season_4_1998" ( "series_num" real, "season_num" real, "title" text, "directed_by" text, "original_air_date" text, "production_code" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the season for series 81?`: ```sql
SELECT "date" FROM "round_8" WHERE "venue"='lake oval';
## Task Generate a SQL query to answer the following question: `On what date was a match played at Lake 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 `On what date was a match played at Lake Oval?`: ```sql
SELECT "away_team_score" FROM "round_8" WHERE "home_team"='collingwood';
## Task Generate a SQL query to answer the following question: `At the home game in Collingwood, how much did the away team score?` ### 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 `At the home game in Collingwood, how much did the away team score?`: ```sql
SELECT SUM("crowd") FROM "round_8" WHERE "venue"='victoria park';
## Task Generate a SQL query to answer the following question: `In the game at Victoria Park, what was the number of people in the crowd?` ### 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 `In the game at Victoria Park, what was the number of people in the crowd?`: ```sql
SELECT "tournament" FROM "achievements" WHERE "year"=1974 AND "venue"='gothenburg , sweden';
## Task Generate a SQL query to answer the following question: `What was the tournament that happened in 1974 in gothenburg , sweden?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "achievements" ( "year" real, "tournament" text, "venue" text, "result" text, "extra" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the tournament that happened in 1974 in gothenburg , sweden?`: ```sql
SELECT "division" FROM "table_key" WHERE "wins"='76';
## Task Generate a SQL query to answer the following question: `Which MLB division has a win record of 76?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table_key" ( "mlb_season" text, "team_season" text, "league" text, "division" text, "finish" text, "wins" text, "losses" text, "win_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `Which MLB division has a win record of 76?`: ```sql
SELECT "finish" FROM "table_key" WHERE "team_season"='1980';
## Task Generate a SQL query to answer the following question: `What was the final rank of the Brewers in 1980?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table_key" ( "mlb_season" text, "team_season" text, "league" text, "division" text, "finish" text, "wins" text, "losses" text, "win_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the final rank of the Brewers in 1980?`: ```sql
SELECT "finish" FROM "table_key" WHERE "win_pct"='.585';
## Task Generate a SQL query to answer the following question: `What was the final rank of the Brewers when they achieved a win percentage of .585?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table_key" ( "mlb_season" text, "team_season" text, "league" text, "division" text, "finish" text, "wins" text, "losses" text, "win_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the final rank of the Brewers when they achieved a win percentage of .585?`: ```sql
SELECT "division" FROM "table_key" WHERE "team_season"='1987';
## Task Generate a SQL query to answer the following question: `Which division were the Brewers a part of in the 1987 season?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table_key" ( "mlb_season" text, "team_season" text, "league" text, "division" text, "finish" text, "wins" text, "losses" text, "win_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `Which division were the Brewers a part of in the 1987 season?`: ```sql
SELECT "division" FROM "table_key" WHERE "finish"='5th' AND "losses"='87';
## Task Generate a SQL query to answer the following question: `Which division of the Brewers had a 5th place ranking and a loss record of 87?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "table_key" ( "mlb_season" text, "team_season" text, "league" text, "division" text, "finish" text, "wins" text, "losses" text, "win_pct" text ); ### SQL Given the database schema, here is the SQL query that answers `Which division of the Brewers had a 5th place ranking and a loss record of 87?`: ```sql
SELECT "game_site" FROM "schedule" WHERE "opponent"='san diego chargers';
## Task Generate a SQL query to answer the following question: `where was the game site when the opponent was san diego chargers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" text, "date" text, "opponent" text, "result" text, "game_site" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `where was the game site when the opponent was san diego chargers?`: ```sql
SELECT "opponent" FROM "schedule" WHERE "week"='9';
## Task Generate a SQL query to answer the following question: `who was the opponent when the week was 9?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" text, "date" text, "opponent" text, "result" text, "game_site" text, "attendance" text ); ### SQL Given the database schema, here is the SQL query that answers `who was the opponent when the week was 9?`: ```sql
SELECT "venue" FROM "round_16" WHERE "away_team"='geelong';
## Task Generate a SQL query to answer the following question: `What venue features geelong as the away side?` ### 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 venue features geelong as the away side?`: ```sql
SELECT "venue" FROM "round_16" WHERE "home_team"='essendon';
## Task Generate a SQL query to answer the following question: `What venue features essendon at home?` ### 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 venue features essendon at home?`: ```sql
SELECT "home_team_score" FROM "round_16" WHERE "venue"='princes park';
## Task Generate a SQL query to answer the following question: `What is the home team score at princes park?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_16" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the home team score at princes park?`: ```sql
SELECT "home_team" FROM "round_16" WHERE "venue"='vfl park' AND "home_team_score"='10.24 (84)';
## Task Generate a SQL query to answer the following question: `What home team scored 10.24 (84) at vfl park?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_16" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What home team scored 10.24 (84) at vfl park?`: ```sql
SELECT "nominee" FROM "awards" WHERE "category"='best director';
## Task Generate a SQL query to answer the following question: `Who is the nominee for best director?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "awards" ( "ceremony" text, "award" text, "category" text, "nominee" text, "outcome" text ); ### SQL Given the database schema, here is the SQL query that answers `Who is the nominee for best director?`: ```sql
SELECT "ceremony" FROM "awards" WHERE "outcome"='nominated' AND "nominee"='leela chitnis';
## Task Generate a SQL query to answer the following question: `What ceremony was leela chitnis nominated at?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "awards" ( "ceremony" text, "award" text, "category" text, "nominee" text, "outcome" text ); ### SQL Given the database schema, here is the SQL query that answers `What ceremony was leela chitnis nominated at?`: ```sql
SELECT MAX("pick_num") FROM "round_five" WHERE "cfl_team"='winnipeg blue bombers';
## Task Generate a SQL query to answer the following question: `what is the highest pick number of the CFL team, the winnipeg blue bombers?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_five" ( "pick_num" real, "cfl_team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the highest pick number of the CFL team, the winnipeg blue bombers?`: ```sql
SELECT "college" FROM "round_five" WHERE "pick_num"=41;
## Task Generate a SQL query to answer the following question: `Which college has 41 picks?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_five" ( "pick_num" real, "cfl_team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Which college has 41 picks?`: ```sql
SELECT "player" FROM "round_five" WHERE "college"='manitoba';
## Task Generate a SQL query to answer the following question: `Which player plays for the college of manitoba?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_five" ( "pick_num" real, "cfl_team" text, "player" text, "position" text, "college" text ); ### SQL Given the database schema, here is the SQL query that answers `Which player plays for the college of manitoba?`: ```sql
SELECT "unami_delaware" FROM "pidgin_delaware_numbers_from_one_to_ten" WHERE "thomas_1698"='nacha';
## Task Generate a SQL query to answer the following question: `What is the Unami Delaware value for a Thomas value of nacha?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "pidgin_delaware_numbers_from_one_to_ten" ( "munsee_delaware" text, "unami_delaware" text, "de_laet_1633" text, "campanius_ca_1645" text, "interpreter_1684" text, "thomas_1698" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Unami Delaware value for a Thomas value of nacha?`: ```sql
SELECT "interpreter_1684" FROM "pidgin_delaware_numbers_from_one_to_ten" WHERE "unami_delaware"='palé·naxk';
## Task Generate a SQL query to answer the following question: `What is the Interpreter value for an Unami Delaware value of palé·naxk?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "pidgin_delaware_numbers_from_one_to_ten" ( "munsee_delaware" text, "unami_delaware" text, "de_laet_1633" text, "campanius_ca_1645" text, "interpreter_1684" text, "thomas_1698" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Interpreter value for an Unami Delaware value of palé·naxk?`: ```sql
SELECT "munsee_delaware" FROM "pidgin_delaware_numbers_from_one_to_ten" WHERE "interpreter_1684"='palenah';
## Task Generate a SQL query to answer the following question: `What is the Munsee Delaware value for an Interpreter value of palenah?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "pidgin_delaware_numbers_from_one_to_ten" ( "munsee_delaware" text, "unami_delaware" text, "de_laet_1633" text, "campanius_ca_1645" text, "interpreter_1684" text, "thomas_1698" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Munsee Delaware value for an Interpreter value of palenah?`: ```sql
SELECT "campanius_ca_1645" FROM "pidgin_delaware_numbers_from_one_to_ten" WHERE "unami_delaware"='palé·naxk';
## Task Generate a SQL query to answer the following question: `What is the Campanius term for an Unami Delaware term of palé·naxk?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "pidgin_delaware_numbers_from_one_to_ten" ( "munsee_delaware" text, "unami_delaware" text, "de_laet_1633" text, "campanius_ca_1645" text, "interpreter_1684" text, "thomas_1698" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Campanius term for an Unami Delaware term of palé·naxk?`: ```sql
SELECT "interpreter_1684" FROM "pidgin_delaware_numbers_from_one_to_ten" WHERE "munsee_delaware"='(n)xá·š';
## Task Generate a SQL query to answer the following question: `What is the Interpreter term for a Munsee Delaware term of (n)xá·š?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "pidgin_delaware_numbers_from_one_to_ten" ( "munsee_delaware" text, "unami_delaware" text, "de_laet_1633" text, "campanius_ca_1645" text, "interpreter_1684" text, "thomas_1698" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the Interpreter term for a Munsee Delaware term of (n)xá·š?`: ```sql
SELECT "de_laet_1633" FROM "pidgin_delaware_numbers_from_one_to_ten" WHERE "munsee_delaware"='ní·ša';
## Task Generate a SQL query to answer the following question: `What is the De Laet term for a Munsee Delaware term of ní·ša?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "pidgin_delaware_numbers_from_one_to_ten" ( "munsee_delaware" text, "unami_delaware" text, "de_laet_1633" text, "campanius_ca_1645" text, "interpreter_1684" text, "thomas_1698" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the De Laet term for a Munsee Delaware term of ní·ša?`: ```sql
SELECT "player" FROM "1993_draft_picks" WHERE "round"<2;
## Task Generate a SQL query to answer the following question: `What is the name of the player picked before round 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1993_draft_picks" ( "round" real, "overall" real, "player" text, "nationality" text, "club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the player picked before round 2?`: ```sql
SELECT "player" FROM "1993_draft_picks" WHERE "overall"<209 AND "club_team"='victoriaville tigres (qmjhl)' AND "round"=1;
## Task Generate a SQL query to answer the following question: `What is the name of the player with an overall less than 209 for the Victoriaville tigres (qmjhl), and a Round of 1?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1993_draft_picks" ( "round" real, "overall" real, "player" text, "nationality" text, "club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the player with an overall less than 209 for the Victoriaville tigres (qmjhl), and a Round of 1?`: ```sql
SELECT "player" FROM "1993_draft_picks" WHERE "overall">227;
## Task Generate a SQL query to answer the following question: `What is the name of the player with an Overall larger than 227?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1993_draft_picks" ( "round" real, "overall" real, "player" text, "nationality" text, "club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the player with an Overall larger than 227?`: ```sql
SELECT MAX("overall") FROM "1993_draft_picks" WHERE "round">8 AND "player"='pavol demitra';
## Task Generate a SQL query to answer the following question: `What is the highest overall for a round larger than 8 for pavol demitra?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1993_draft_picks" ( "round" real, "overall" real, "player" text, "nationality" text, "club_team" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest overall for a round larger than 8 for pavol demitra?`: ```sql
SELECT "description" FROM "heritage_diesels" WHERE "livery"='ews';
## Task Generate a SQL query to answer the following question: `What description does Livery of ews have?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "heritage_diesels" ( "number_name" text, "description" text, "current_status" text, "livery" text, "date" real ); ### SQL Given the database schema, here is the SQL query that answers `What description does Livery of ews have?`: ```sql
SELECT "position" FROM "p_premiers_r_runner_ups_m_minor_premiers" WHERE "competition"='super league 1';
## Task Generate a SQL query to answer the following question: `What Position has a Super League 1 Competition?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "p_premiers_r_runner_ups_m_minor_premiers" ( "competition" text, "played" real, "drawn" real, "lost" real, "position" text, "coach" text, "captain" text, "main_article" text ); ### SQL Given the database schema, here is the SQL query that answers `What Position has a Super League 1 Competition?`: ```sql
SELECT "competition" FROM "p_premiers_r_runner_ups_m_minor_premiers" WHERE "captain"='robbie paul' AND "lost"<5 AND "main_article"='bradford bulls 1997';
## Task Generate a SQL query to answer the following question: `What Competition in Main Article of Bradford Bulls 1997 have Robbie Paul as Captain with less than 5 Lost?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "p_premiers_r_runner_ups_m_minor_premiers" ( "competition" text, "played" real, "drawn" real, "lost" real, "position" text, "coach" text, "captain" text, "main_article" text ); ### SQL Given the database schema, here is the SQL query that answers `What Competition in Main Article of Bradford Bulls 1997 have Robbie Paul as Captain with less than 5 Lost?`: ```sql
SELECT "captain" FROM "p_premiers_r_runner_ups_m_minor_premiers" WHERE "lost"=13;
## Task Generate a SQL query to answer the following question: `What Captain has Lost 13?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "p_premiers_r_runner_ups_m_minor_premiers" ( "competition" text, "played" real, "drawn" real, "lost" real, "position" text, "coach" text, "captain" text, "main_article" text ); ### SQL Given the database schema, here is the SQL query that answers `What Captain has Lost 13?`: ```sql
SELECT SUM("drawn") FROM "p_premiers_r_runner_ups_m_minor_premiers" WHERE "lost"<4 AND "coach"='francis cummins';
## Task Generate a SQL query to answer the following question: `How many Drawn did Coach Francis Cummins have with less than 4 Lost?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "p_premiers_r_runner_ups_m_minor_premiers" ( "competition" text, "played" real, "drawn" real, "lost" real, "position" text, "coach" text, "captain" text, "main_article" text ); ### SQL Given the database schema, here is the SQL query that answers `How many Drawn did Coach Francis Cummins have with less than 4 Lost?`: ```sql
SELECT "horse" FROM "b" WHERE "faults"='did not start' AND "total">16.16;
## Task Generate a SQL query to answer the following question: `What horse did not start and had a total of over 16.16?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "b" ( "rider" text, "horse" text, "faults" text, "round_1_2_a_2_b_3_a_points" text, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What horse did not start and had a total of over 16.16?`: ```sql
SELECT MIN("total") FROM "b" WHERE "rider"='christina liebherr';
## Task Generate a SQL query to answer the following question: `What was the total for christina liebherr?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "b" ( "rider" text, "horse" text, "faults" text, "round_1_2_a_2_b_3_a_points" text, "total" real ); ### SQL Given the database schema, here is the SQL query that answers `What was the total for christina liebherr?`: ```sql
SELECT "population" FROM "demographics" WHERE "germans"='87.5%';
## Task Generate a SQL query to answer the following question: `What is the population of the year featuring an 87.5% German population?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "demographics" ( "year" text, "population" text, "romanians" text, "hungarians" text, "germans" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the population of the year featuring an 87.5% German population?`: ```sql
SELECT "height" FROM "1987_boys_team" WHERE "hometown"='chicago, il';
## Task Generate a SQL query to answer the following question: `How tall is the player from Chicago, IL?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1987_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `How tall is the player from Chicago, IL?`: ```sql
SELECT "college" FROM "1987_boys_team" WHERE "player"='dennis scott';
## Task Generate a SQL query to answer the following question: `What college does Dennis Scott attend?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1987_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `What college does Dennis Scott attend?`: ```sql
SELECT "player" FROM "1987_boys_team" WHERE "hometown"='bay city, tx';
## Task Generate a SQL query to answer the following question: `Who's from Bay City, TX?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1987_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `Who's from Bay City, TX?`: ```sql
SELECT "nba_draft" FROM "1987_boys_team" WHERE "player"='labradford smith';
## Task Generate a SQL query to answer the following question: `Which NBA Draft had Labradford Smith?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "1987_boys_team" ( "player" text, "height" text, "school" text, "hometown" text, "college" text, "nba_draft" text ); ### SQL Given the database schema, here is the SQL query that answers `Which NBA Draft had Labradford Smith?`: ```sql
SELECT MIN("crowd") FROM "round_2" WHERE "venue"='windy hill';
## Task Generate a SQL query to answer the following question: `What was the lowest attendance at Windy Hill?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_2" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the lowest attendance at Windy Hill?`: ```sql
SELECT "home_team_score" FROM "round_2" WHERE "venue"='princes park';
## Task Generate a SQL query to answer the following question: `What was the home team's score at Princes Park?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_2" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the home team's score at Princes Park?`: ```sql
SELECT "home_team_score" FROM "round_2" WHERE "home_team"='geelong';
## Task Generate a SQL query to answer the following question: `How much did the home team Geelong score?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_2" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `How much did the home team Geelong score?`: ```sql
SELECT "home_team" FROM "round_2" WHERE "away_team"='carlton';
## Task Generate a SQL query to answer the following question: `What is the name of the home team that played Carlton?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_2" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the name of the home team that played Carlton?`: ```sql
SELECT "status" FROM "steam_locomotives" WHERE "builder"='orenstein and koppel';
## Task Generate a SQL query to answer the following question: `Name the status with builder of orenstein and koppel` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "steam_locomotives" ( "name_number" text, "builder" text, "type" text, "status" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the status with builder of orenstein and koppel`: ```sql
SELECT "builder" FROM "steam_locomotives" WHERE "name_number"='joffre';
## Task Generate a SQL query to answer the following question: `Who was the builder for joffre` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "steam_locomotives" ( "name_number" text, "builder" text, "type" text, "status" text, "notes" text ); ### SQL Given the database schema, here is the SQL query that answers `Who was the builder for joffre`: ```sql
SELECT "venue" FROM "round_11" WHERE "home_team"='carlton';
## Task Generate a SQL query to answer the following question: `Where did Carlton play as the home team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_11" ( "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 Carlton play as the home team?`: ```sql
SELECT "away_team" FROM "round_11" WHERE "home_team_score"='12.13 (85)';
## Task Generate a SQL query to answer the following question: `Who was the away team when the home team scored 12.13 (85)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_11" ( "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 away team when the home team scored 12.13 (85)?`: ```sql
SELECT "venue" FROM "round_11" WHERE "home_team_score"='18.17 (125)';
## Task Generate a SQL query to answer the following question: `Where was the game held when the home team scored 18.17 (125)?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_11" ( "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 held when the home team scored 18.17 (125)?`: ```sql
SELECT "home_team" FROM "round_11" WHERE "away_team"='melbourne';
## Task Generate a SQL query to answer the following question: `Who was the home team when Melbourne was the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_11" ( "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 when Melbourne was the away team?`: ```sql
SELECT "away_team_score" FROM "round_11" WHERE "crowd">'15,000' AND "venue"='lake oval';
## Task Generate a SQL query to answer the following question: `What was the away team's score at the game played at Lake Oval that had a crowd of over 15,000?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_11" ( "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 away team's score at the game played at Lake Oval that had a crowd of over 15,000?`: ```sql
SELECT "result" FROM "schedule" WHERE "date"='november 20, 1988';
## Task Generate a SQL query to answer the following question: `What was the result on November 20, 1988?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" text, "date" text, "opponent" text, "result" text, "kickoff_a" text, "game_site" text, "attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the result on November 20, 1988?`: ```sql
SELECT "kickoff_a" FROM "schedule" WHERE "week"='5';
## Task Generate a SQL query to answer the following question: `What time was the kickoff on week 5?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" text, "date" text, "opponent" text, "result" text, "kickoff_a" text, "game_site" text, "attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What time was the kickoff on week 5?`: ```sql
SELECT "game_site" FROM "schedule" WHERE "attendance"='39,889';
## Task Generate a SQL query to answer the following question: `Where was the game that had an attendance of 39,889?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" text, "date" text, "opponent" text, "result" text, "kickoff_a" text, "game_site" text, "attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `Where was the game that had an attendance of 39,889?`: ```sql
SELECT "record" FROM "schedule" WHERE "attendance"='43,502';
## Task Generate a SQL query to answer the following question: `What was the record when the attendance was 43,502?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "week" text, "date" text, "opponent" text, "result" text, "kickoff_a" text, "game_site" text, "attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the record when the attendance was 43,502?`: ```sql
SELECT "label" FROM "release_history" WHERE "date"='1988' AND "format"='cd';
## Task Generate a SQL query to answer the following question: `What label released a CD in 1988?` ### 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 label released a CD in 1988?`: ```sql
SELECT "date" FROM "release_history" WHERE "region"='united kingdom' AND "catalog"='ft 507';
## Task Generate a SQL query to answer the following question: `On what date did the United Kingdom have a catalog of FT 507?` ### 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 `On what date did the United Kingdom have a catalog of FT 507?`: ```sql
SELECT "date" FROM "release_history" WHERE "catalog"='ft 507';
## Task Generate a SQL query to answer the following question: `On what date was the Catalog FT 507?` ### 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 `On what date was the Catalog FT 507?`: ```sql
SELECT "label" FROM "release_history" WHERE "date"='1988' AND "catalog"='54513';
## Task Generate a SQL query to answer the following question: `Which label had a catalog of 54513 in 1988?` ### 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 label had a catalog of 54513 in 1988?`: ```sql
SELECT "date" FROM "release_history" WHERE "label"='fantasy records' AND "format"='cd' AND "catalog"='fcd-4513-2';
## Task Generate a SQL query to answer the following question: `On what date did Fantasy Records release a CD format of catalog FCD-4513-2?` ### 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 `On what date did Fantasy Records release a CD format of catalog FCD-4513-2?`: ```sql
SELECT COUNT("laps") FROM "classification" WHERE "driver"='john watson' AND "grid"<7;
## Task Generate a SQL query to answer the following question: `What was John Watson's total laps with a grid of less than 7?` ### 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 was John Watson's total laps with a grid of less than 7?`: ```sql
SELECT COUNT("laps") FROM "classification" WHERE "grid"=9;
## Task Generate a SQL query to answer the following question: `How many laps were there with #9 grid?` ### 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 were there with #9 grid?`: ```sql
SELECT "time_retired" FROM "classification" WHERE "laps"<33 AND "grid"=14;
## Task Generate a SQL query to answer the following question: `What was the time/retired with laps less than 33 and a grid of 14?` ### 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 was the time/retired with laps less than 33 and a grid of 14?`: ```sql
SELECT "time_retired" FROM "classification" WHERE "driver"='john watson';
## Task Generate a SQL query to answer the following question: `What was John Watson's time/retired?` ### 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 was John Watson's time/retired?`: ```sql
SELECT "player" FROM "n" WHERE "no_s"='14';
## Task Generate a SQL query to answer the following question: `What is the player with the no. 14?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "n" ( "player" text, "no_s" text, "height_in_ft" text, "position" text, "years_for_rockets" text, "school_club_team_country" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the player with the no. 14?`: ```sql
SELECT "height_in_ft" FROM "n" WHERE "school_club_team_country"='benetton treviso, italy';
## Task Generate a SQL query to answer the following question: `What is the height of the player from Benetton Treviso, Italy?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "n" ( "player" text, "no_s" text, "height_in_ft" text, "position" text, "years_for_rockets" text, "school_club_team_country" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the height of the player from Benetton Treviso, Italy?`: ```sql
SELECT "pens" FROM "most_points_in_a_match" WHERE "conv"='6';
## Task Generate a SQL query to answer the following question: `I want to know the pens with conv of 6` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "most_points_in_a_match" ( "player" text, "tries" text, "conv" text, "pens" text, "drop" text, "venue" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `I want to know the pens with conv of 6`: ```sql
SELECT "player" FROM "most_points_in_a_match" WHERE "drop"='0' AND "tries"='2';
## Task Generate a SQL query to answer the following question: `Which player has 2 tries and 0 drops?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "most_points_in_a_match" ( "player" text, "tries" text, "conv" text, "pens" text, "drop" text, "venue" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Which player has 2 tries and 0 drops?`: ```sql
SELECT "pens" FROM "most_points_in_a_match" WHERE "tries"='1' AND "player"='matt alexander' AND "conv"='4';
## Task Generate a SQL query to answer the following question: `Which pens has 1 tries and matt alexander as a player with conv of 4?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "most_points_in_a_match" ( "player" text, "tries" text, "conv" text, "pens" text, "drop" text, "venue" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Which pens has 1 tries and matt alexander as a player with conv of 4?`: ```sql
SELECT "venue" FROM "most_points_in_a_match" WHERE "conv"='5 players on 20 points';
## Task Generate a SQL query to answer the following question: `Name the venue that has conv of 5 players on 20 points` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "most_points_in_a_match" ( "player" text, "tries" text, "conv" text, "pens" text, "drop" text, "venue" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the venue that has conv of 5 players on 20 points`: ```sql
SELECT "name" FROM "coaches" WHERE "wins"<3 AND "matches"<15;
## Task Generate a SQL query to answer the following question: `What are the names of those who made less than 3 wins in 15 matches?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "coaches" ( "name" text, "period" text, "matches" real, "wins" real, "draws" real, "losses" real ); ### SQL Given the database schema, here is the SQL query that answers `What are the names of those who made less than 3 wins in 15 matches?`: ```sql
SELECT "high_points" FROM "playoffs" WHERE "game"<2;
## Task Generate a SQL query to answer the following question: `What is the highest amount of points when the game is less than 2?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest amount of points when the game is less than 2?`: ```sql
SELECT "score" FROM "playoffs" WHERE "date"='april 20';
## Task Generate a SQL query to answer the following question: `What was the score on April 20?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "playoffs" ( "game" real, "date" text, "team" text, "score" text, "high_points" text, "high_rebounds" text, "high_assists" text, "location_attendance" text, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score on April 20?`: ```sql
SELECT "surface" FROM "singles_6" WHERE "date"='june 11, 1995';
## Task Generate a SQL query to answer the following question: `Name the surface on june 11, 1995` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the surface on june 11, 1995`: ```sql
SELECT "score" FROM "singles_6" WHERE "date"='september 12, 1993';
## Task Generate a SQL query to answer the following question: `Name the score for september 12, 1993` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the score for september 12, 1993`: ```sql
SELECT "surface" FROM "singles_6" WHERE "score"='7–6(4), 6–1';
## Task Generate a SQL query to answer the following question: `Name the surface for score of 7–6(4), 6–1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the surface for score of 7–6(4), 6–1`: ```sql
SELECT "date" FROM "singles_6" WHERE "score"='7–6(4), 6–1';
## Task Generate a SQL query to answer the following question: `Name the date that had a score of 7–6(4), 6–1` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "singles_6" ( "date" text, "tournament" text, "surface" text, "opponent_in_the_final" text, "score" text ); ### SQL Given the database schema, here is the SQL query that answers `Name the date that had a score of 7–6(4), 6–1`: ```sql
SELECT "result" FROM "longest_winning_streak" WHERE "year">1997 AND "competition"='world group, semifinals';
## Task Generate a SQL query to answer the following question: `what is the result for the world group, semifinals after the year 1997?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "longest_winning_streak" ( "year" real, "competition" text, "date" text, "location" text, "score" text, "result" text ); ### SQL Given the database schema, here is the SQL query that answers `what is the result for the world group, semifinals after the year 1997?`: ```sql
SELECT "home_team" FROM "round_10" WHERE "away_team"='south melbourne';
## Task Generate a SQL query to answer the following question: `What home team played against south Melbourne?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What home team played against south Melbourne?`: ```sql
SELECT AVG("crowd") FROM "round_10" WHERE "home_team"='essendon';
## Task Generate a SQL query to answer the following question: `What is the average crowd size for the home team essendon?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the average crowd size for the home team essendon?`: ```sql
SELECT "home_team_score" FROM "round_10" WHERE "away_team"='north melbourne';
## Task Generate a SQL query to answer the following question: `What is the home team score when north Melbourne was the away team?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "round_10" ( "home_team" text, "home_team_score" text, "away_team" text, "away_team_score" text, "venue" text, "crowd" real, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the home team score when north Melbourne was the away team?`: ```sql
SELECT AVG("grid") FROM "classification" WHERE "constructor"='brm' AND "laps"<63;
## Task Generate a SQL query to answer the following question: `What is the average grid with brm and under 63 laps?` ### 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 with brm and under 63 laps?`: ```sql
SELECT "circuit" FROM "schedule" WHERE "date"='may 27' AND "class"='gts-2';
## Task Generate a SQL query to answer the following question: `On what circuit is there a class gts-2 race that takes place on May 27?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "race" text, "length" text, "class" text, "circuit" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `On what circuit is there a class gts-2 race that takes place on May 27?`: ```sql
SELECT "circuit" FROM "schedule" WHERE "length"='2 hours';
## Task Generate a SQL query to answer the following question: `On what circuit is there a race that lasts 2 hours?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "race" text, "length" text, "class" text, "circuit" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `On what circuit is there a race that lasts 2 hours?`: ```sql
SELECT "class" FROM "schedule" WHERE "race"='the dodge dealers grand prix';
## Task Generate a SQL query to answer the following question: `What class is the dodge dealers grand prix?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "race" text, "length" text, "class" text, "circuit" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What class is the dodge dealers grand prix?`: ```sql
SELECT "length" FROM "schedule" WHERE "race"='first union six hours at the glen';
## Task Generate a SQL query to answer the following question: `What is the length of the First Union six hours at the Glen?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "race" text, "length" text, "class" text, "circuit" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the length of the First Union six hours at the Glen?`: ```sql
SELECT "class" FROM "schedule" WHERE "date"='august 25';
## Task Generate a SQL query to answer the following question: `What is the class of the race that takes place on August 25?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "schedule" ( "race" text, "length" text, "class" text, "circuit" text, "date" text ); ### SQL Given the database schema, here is the SQL query that answers `What is the class of the race that takes place on August 25?`: ```sql
SELECT "score" FROM "november" WHERE "home"='montreal';
## Task Generate a SQL query to answer the following question: `What was the score when Montreal was home?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "november" ( "date" text, "visitor" text, "score" text, "home" text, "decision" text, "attendance" real, "record" text ); ### SQL Given the database schema, here is the SQL query that answers `What was the score when Montreal was home?`: ```sql
SELECT "score" FROM "challenge_cup" WHERE "result"='w' AND "date"='9/3/97';
## Task Generate a SQL query to answer the following question: `On 9/3/97, what was the score that resulted in a w?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "challenge_cup" ( "date" text, "competition" text, "venue" text, "result" text, "score" text, "goals" text ); ### SQL Given the database schema, here is the SQL query that answers `On 9/3/97, what was the score that resulted in a w?`: ```sql
SELECT "name" FROM "devonport_takapuna_local_board" WHERE "roll"=422;
## Task Generate a SQL query to answer the following question: `Who has a roll value of 422?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "devonport_takapuna_local_board" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); ### SQL Given the database schema, here is the SQL query that answers `Who has a roll value of 422?`: ```sql
SELECT "area" FROM "devonport_takapuna_local_board" WHERE "decile"=10;
## Task Generate a SQL query to answer the following question: `In what area is the decile value 10?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "devonport_takapuna_local_board" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); ### SQL Given the database schema, here is the SQL query that answers `In what area is the decile value 10?`: ```sql
SELECT MAX("decile") FROM "devonport_takapuna_local_board" WHERE "roll">301 AND "area"='hauraki';
## Task Generate a SQL query to answer the following question: `What is the highest decile value with a roll greater than 301 in Hauraki?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "devonport_takapuna_local_board" ( "name" text, "years" text, "gender" text, "area" text, "authority" text, "decile" real, "roll" real ); ### SQL Given the database schema, here is the SQL query that answers `What is the highest decile value with a roll greater than 301 in Hauraki?`: ```sql
SELECT "points_classification" FROM "classification_leadership_by_stage" WHERE "trofeo_fast_team"='metauro mobili-pinarello' AND "stage"='6';
## Task Generate a SQL query to answer the following question: `Which Points classification has a Trofeo Fast Team of metauro mobili-pinarello, and a Stage of 6?` ### Database Schema This query will run on a database whose schema is represented in this string: CREATE TABLE "classification_leadership_by_stage" ( "stage" text, "winner" text, "general_classification" text, "points_classification" text, "trofeo_fast_team" text ); ### SQL Given the database schema, here is the SQL query that answers `Which Points classification has a Trofeo Fast Team of metauro mobili-pinarello, and a Stage of 6?`: ```sql