text
stringlengths
310
1.28k
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: What was the losing bonus that had 53 points? <|assistant|> SELECT "losing_bonus" FROM "league_table" WHERE "points"='53';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: List all points against with a 0 try bonus and points for of 150. <|assistant|> SELECT "points_against" FROM "league_table" WHERE "try_bonus"='0' AND "points_for"='150';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: Name the tries against when tries for is 30 <|assistant|> SELECT "tries_against" FROM "league_table" WHERE "tries_for"='30';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: Name the points when tries for is 49 <|assistant|> SELECT "points" FROM "league_table" WHERE "tries_for"='49';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "league_table" ( "club" text, "played" text, "won" text, "drawn" text, "lost" text, "points_for" text, "points_against" text, "tries_for" text, "tries_against" text, "try_bonus" text, "losing_bonus" text, "points" text ); Question: Name the try bonus for lost being 11 and losing bonus is 6 <|assistant|> SELECT "try_bonus" FROM "league_table" WHERE "lost"='11' AND "losing_bonus"='6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "knockout_stages" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: What is the aggregate when the second leg is 1-3? <|assistant|> SELECT "aggregate" FROM "knockout_stages" WHERE "2nd_leg"='1-3';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "knockout_stages" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: For home of River Plate, what is the first leg listed? <|assistant|> SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='River Plate';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "knockout_stages" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: With an aggregate of 0-2, what is listed for home? <|assistant|> SELECT "home_2nd_leg" FROM "knockout_stages" WHERE "aggregate"='0-2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "knockout_stages" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: If the home is Atlético Tucumán, what is the name of the first leg? <|assistant|> SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='Atlético Tucumán';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "knockout_stages" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: If second leg is Newell's Old Boys, what name is first leg? <|assistant|> SELECT "1st_leg" FROM "knockout_stages" WHERE "home_2nd_leg"='Newell''s Old Boys';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "political_assistants" ( "romanised_name" text, "chinese_name" text, "age_at_appointment" real, "foreign_nationality" text, "portfolio_attachment" text, "prior_occupation" text, "govt_salary" text ); Question: What is the chinese name for whom chan chi-yuen, paul is listed as the romanised name? <|assistant|> SELECT "chinese_name" FROM "political_assistants" WHERE "romanised_name"='Chan Chi-yuen, Paul';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "political_assistants" ( "romanised_name" text, "chinese_name" text, "age_at_appointment" real, "foreign_nationality" text, "portfolio_attachment" text, "prior_occupation" text, "govt_salary" text ); Question: The name cheung, raymond man-to is listed as a romanised name is cheung, raymond man-to? <|assistant|> SELECT "foreign_nationality" FROM "political_assistants" WHERE "romanised_name"='Cheung, Raymond Man-to';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "political_assistants" ( "romanised_name" text, "chinese_name" text, "age_at_appointment" real, "foreign_nationality" text, "portfolio_attachment" text, "prior_occupation" text, "govt_salary" text ); Question: For the chinese name 盧奕基 how many in total is the govt salary? <|assistant|> SELECT COUNT("govt_salary") FROM "political_assistants" WHERE "chinese_name"='盧奕基';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "political_assistants" ( "romanised_name" text, "chinese_name" text, "age_at_appointment" real, "foreign_nationality" text, "portfolio_attachment" text, "prior_occupation" text, "govt_salary" text ); Question: For the name romanised name is lo yik-kee, victor what is the total number foreign nationality that is listed? <|assistant|> SELECT COUNT("foreign_nationality") FROM "political_assistants" WHERE "romanised_name"='Lo Yik-kee, Victor';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "political_assistants" ( "romanised_name" text, "chinese_name" text, "age_at_appointment" real, "foreign_nationality" text, "portfolio_attachment" text, "prior_occupation" text, "govt_salary" text ); Question: For the prior occupation listed as assistant police commissioner (ret'd) what are the entire list of romanised name. <|assistant|> SELECT "romanised_name" FROM "political_assistants" WHERE "prior_occupation"='Assistant Police Commissioner (ret''d)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "relegation" ( "team" text, "average" text, "points" real, "played" real, "1991_92" text, "1992_93" text, "1993_94" real ); Question: Name the most played when points is 105 <|assistant|> SELECT MAX("played") FROM "relegation" WHERE "points"=105;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "relegation" ( "team" text, "average" text, "points" real, "played" real, "1991_92" text, "1992_93" text, "1993_94" real ); Question: Name the total number of points for newell's old boys <|assistant|> SELECT COUNT("points") FROM "relegation" WHERE "team"='Newell''s Old Boys';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "relegation" ( "team" text, "average" text, "points" real, "played" real, "1991_92" text, "1992_93" text, "1993_94" real ); Question: Name the points for 1992-93 for 42 <|assistant|> SELECT "points" FROM "relegation" WHERE "1992_93"='42';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "losers_knockout" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: If the aggregate is 3-4, what is the first leg? <|assistant|> SELECT "home_1st_leg" FROM "losers_knockout" WHERE "aggregate"='3-4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "losers_knockout" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: If the second leg is Instituto, what is the total number of aggregate? <|assistant|> SELECT COUNT("aggregate") FROM "losers_knockout" WHERE "home_2nd_leg"='Instituto';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "losers_knockout" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: If the second leg is 1-1, what is the first leg? <|assistant|> SELECT "home_1st_leg" FROM "losers_knockout" WHERE "2nd_leg"='1-1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "losers_knockout" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: If the second leg is 3-2, what is the first leg? <|assistant|> SELECT "home_1st_leg" FROM "losers_knockout" WHERE "2nd_leg"='3-2';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "losers_knockout" ( "home_1st_leg" text, "home_2nd_leg" text, "1st_leg" text, "2nd_leg" text, "aggregate" text ); Question: If the second leg is 1-1, what is the first leg? <|assistant|> SELECT "1st_leg" FROM "losers_knockout" WHERE "2nd_leg"='1-1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "relegation" ( "team" text, "average" text, "points" real, "played" real, "1988_89" text, "1989_90" text, "1990_1991" real ); Question: How many games were played by the Vélez Sársfield team from 1989-90? <|assistant|> SELECT "1989_90" FROM "relegation" WHERE "team"='Vélez Sársfield';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "relegation" ( "team" text, "average" text, "points" real, "played" real, "1988_89" text, "1989_90" text, "1990_1991" real ); Question: What was the average of the team if they played 31 games from 1990-1991? <|assistant|> SELECT "average" FROM "relegation" WHERE "1990_1991"=31;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "relegation" ( "team" text, "average" text, "points" real, "played" real, "1988_89" text, "1989_90" text, "1990_1991" real ); Question: What was the team that scored 122 points? <|assistant|> SELECT "team" FROM "relegation" WHERE "points"=122;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "relegation" ( "team" text, "average" text, "points" real, "played" real, "1988_89" text, "1989_90" text, "1990_1991" real ); Question: What was the average if the game played during 1990-91 is 40 and the points are less than 121.0? <|assistant|> SELECT "average" FROM "relegation" WHERE "1990_1991"=40 AND "points"<121.0;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); Question: What is the opponent played on October 4? <|assistant|> SELECT "opponent" FROM "schedule" WHERE "date"='October 4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); Question: Where is riverfront stadium the game site for the week? <|assistant|> SELECT MIN("week") FROM "schedule" WHERE "game_site"='Riverfront Stadium';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_17978052_2" ( "num_s_dam_and_gnis_query_link" real, "num_s_lake_and_gnis_query_link" real, "num_s_reservoir_and_gnis_query_link" real, "borough_or_census_area" text, "comment" text ); Question: How many number of lakes are there in the Valdez-Cordova (CA) area? <|assistant|> SELECT MIN("num_s_lake_and_gnis_query_link") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Valdez-Cordova (CA)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_17978052_2" ( "num_s_dam_and_gnis_query_link" real, "num_s_lake_and_gnis_query_link" real, "num_s_reservoir_and_gnis_query_link" real, "borough_or_census_area" text, "comment" text ); Question: What was the comment on the Denali area? <|assistant|> SELECT "comment" FROM "table1_17978052_2" WHERE "borough_or_census_area"='Denali';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_17978052_2" ( "num_s_dam_and_gnis_query_link" real, "num_s_lake_and_gnis_query_link" real, "num_s_reservoir_and_gnis_query_link" real, "borough_or_census_area" text, "comment" text ); Question: How many dams are there in the Lake and Peninsula area? <|assistant|> SELECT MAX("num_s_dam_and_gnis_query_link") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Lake and Peninsula';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_17978052_2" ( "num_s_dam_and_gnis_query_link" real, "num_s_lake_and_gnis_query_link" real, "num_s_reservoir_and_gnis_query_link" real, "borough_or_census_area" text, "comment" text ); Question: How many dams are there in the Nome (CA) area? <|assistant|> SELECT MIN("num_s_dam_and_gnis_query_link") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Nome (CA)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_17978052_2" ( "num_s_dam_and_gnis_query_link" real, "num_s_lake_and_gnis_query_link" real, "num_s_reservoir_and_gnis_query_link" real, "borough_or_census_area" text, "comment" text ); Question: How many comments are there in the Bethel (CA) Borough area? <|assistant|> SELECT COUNT("comment") FROM "table1_17978052_2" WHERE "borough_or_census_area"='Bethel (CA)';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); Question: How many total numbers of attendance are there during the game in October 27? <|assistant|> SELECT COUNT("attendance") FROM "schedule" WHERE "date"='October 27';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); Question: What was the game record when the opponent was 'at Los Angeles Raiders'? <|assistant|> SELECT "record" FROM "schedule" WHERE "opponent"='at Los Angeles Raiders';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); Question: When was the game played when the opponent was 'at Los Angeles Rams'? <|assistant|> SELECT "date" FROM "schedule" WHERE "opponent"='at Los Angeles Rams';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); Question: How many total number of attendance were there when the game was held in Anaheim Stadium? <|assistant|> SELECT COUNT("attendance") FROM "schedule" WHERE "game_site"='Anaheim Stadium';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule" ( "week" real, "date" text, "opponent" text, "result" text, "game_site" text, "record" text, "attendance" real ); Question: How many were in attendance when the game was held in Arrowhead Stadium? <|assistant|> SELECT MIN("attendance") FROM "schedule" WHERE "game_site"='Arrowhead Stadium';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "a_lyga" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: What is the highest position a team with 7 draws earned? <|assistant|> SELECT MAX("position") FROM "a_lyga" WHERE "draws"=7;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18012738_1" ( "story_no" text, "episode" real, "title" text, "directed_by" text, "written_by" text, "uk_viewers_million" text, "ai_pct" real, "original_air_date" text, "production_code" text ); Question: Name the original air date for ai% for 83 <|assistant|> SELECT "original_air_date" FROM "table1_18012738_1" WHERE "ai_pct"=83;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18012738_1" ( "story_no" text, "episode" real, "title" text, "directed_by" text, "written_by" text, "uk_viewers_million" text, "ai_pct" real, "original_air_date" text, "production_code" text ); Question: Name the story number for paul cornell <|assistant|> SELECT "story_no" FROM "table1_18012738_1" WHERE "written_by"='Paul Cornell';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18012738_1" ( "story_no" text, "episode" real, "title" text, "directed_by" text, "written_by" text, "uk_viewers_million" text, "ai_pct" real, "original_air_date" text, "production_code" text ); Question: Name the total number directed by for uk viewers being 6.86 <|assistant|> SELECT COUNT("directed_by") FROM "table1_18012738_1" WHERE "uk_viewers_million"='6.86';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18012738_1" ( "story_no" text, "episode" real, "title" text, "directed_by" text, "written_by" text, "uk_viewers_million" text, "ai_pct" real, "original_air_date" text, "production_code" text ); Question: Name the least ai % <|assistant|> SELECT MIN("ai_pct") FROM "table1_18012738_1";<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2_lyga_zone_south" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: What is the highest number of games played? <|assistant|> SELECT MAX("games_played") FROM "2_lyga_zone_south";<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2_lyga_zone_south" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: In the game with 31 points, how many goals were conceded? <|assistant|> SELECT COUNT("goals_conceded") FROM "2_lyga_zone_south" WHERE "points"=31;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2_lyga_zone_south" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: How many games had 22 points? <|assistant|> SELECT COUNT("games_played") FROM "2_lyga_zone_south" WHERE "points"=22;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "farm_team_league" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: How many wins had 58 goals scored? <|assistant|> SELECT "wins" FROM "farm_team_league" WHERE "goals_scored"=58;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "farm_team_league" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: How many clubs had 29 points? <|assistant|> SELECT COUNT("club") FROM "farm_team_league" WHERE "points"=29;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "farm_team_league" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: Which clubs had draws of 9? <|assistant|> SELECT "club" FROM "farm_team_league" WHERE "draws"=9;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "farm_team_league" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: How many draws were there when the conceded goals was numbered at 45? <|assistant|> SELECT COUNT("draws") FROM "farm_team_league" WHERE "goals_conceded"=45;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "farm_team_league" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: What is the least amount of games played with 21 losses? <|assistant|> SELECT MIN("games_played") FROM "farm_team_league" WHERE "loses"=21;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2_lyga_zone_east" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: How many games did each team played? <|assistant|> SELECT MIN("games_played") FROM "2_lyga_zone_east";<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2_lyga_zone_east" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: HOw many points where there when the number of goals scored was 47? <|assistant|> SELECT MAX("points") FROM "2_lyga_zone_east" WHERE "goals_scored"=47;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2_lyga_zone_east" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: How many goals were scored by club team fm (losc) vilnius <|assistant|> SELECT "goals_scored" FROM "2_lyga_zone_east" WHERE "club"='FM (LOSC) Vilnius';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2_lyga_zone_east" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: How many losses occurred when the club team was ekranas-2 panevėžys <|assistant|> SELECT MAX("loses") FROM "2_lyga_zone_east" WHERE "club"='Ekranas-2 Panevėžys';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "2_lyga_zone_east" ( "position" real, "club" text, "games_played" real, "wins" real, "draws" real, "loses" real, "goals_scored" real, "goals_conceded" real, "points" real ); Question: What was the highest number of wins for any team? <|assistant|> SELECT MAX("wins") FROM "2_lyga_zone_east";<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_results" ( "num" real, "date" text, "opponent" text, "score" text, "site_stadium" text, "win" text, "loss" text, "save" text, "attendance" real, "overall_record" text, "ncaat_record" text ); Question: What is the June 22 ncaat baseball record for Fresno State Bulldogs? <|assistant|> SELECT "ncaat_record" FROM "schedule_results" WHERE "date"='June 22';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_results" ( "num" real, "date" text, "opponent" text, "score" text, "site_stadium" text, "win" text, "loss" text, "save" text, "attendance" real, "overall_record" text, "ncaat_record" text ); Question: How many saves were in the Georgia game, versus the Bulldogs, with a score of 7-6? <|assistant|> SELECT "save" FROM "schedule_results" WHERE "score"='7-6';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "schedule_results" ( "num" real, "date" text, "opponent" text, "score" text, "site_stadium" text, "win" text, "loss" text, "save" text, "attendance" real, "overall_record" text, "ncaat_record" text ); Question: What is the June 21 ncaat baseball record for Fresno State Bulldogs? <|assistant|> SELECT "ncaat_record" FROM "schedule_results" WHERE "date"='June 21';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "actual_examples" ( "birth_name" text, "birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" text, "papal_name" text, "papal_name_as_announced_in_latin" text, "latin_declension_of_papal_name" text, "numeral_in_papal_name" text ); Question: What is the Papal name of the Pope announced as Ioannis Pauli Primi? <|assistant|> SELECT "papal_name" FROM "actual_examples" WHERE "papal_name_as_announced_in_latin"='Ioannis Pauli primi';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "actual_examples" ( "birth_name" text, "birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" text, "papal_name" text, "papal_name_as_announced_in_latin" text, "latin_declension_of_papal_name" text, "numeral_in_papal_name" text ); Question: What is the announced birth name of the pope whose numeral is not given and whose latin declension is genitive? <|assistant|> SELECT "birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" FROM "actual_examples" WHERE "numeral_in_papal_name"='not given' AND "latin_declension_of_papal_name"='genitive';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "actual_examples" ( "birth_name" text, "birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" text, "papal_name" text, "papal_name_as_announced_in_latin" text, "latin_declension_of_papal_name" text, "numeral_in_papal_name" text ); Question: What pope was announced in latin as Pium? <|assistant|> SELECT "papal_name" FROM "actual_examples" WHERE "papal_name_as_announced_in_latin"='Pium';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "actual_examples" ( "birth_name" text, "birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" text, "papal_name" text, "papal_name_as_announced_in_latin" text, "latin_declension_of_papal_name" text, "numeral_in_papal_name" text ); Question: What is the latin birth name of the pope announced as Ioannis Pauli Primi? <|assistant|> SELECT "birth_name_as_announced_in_latin_accusative_case_forename_undeclined_surname" FROM "actual_examples" WHERE "papal_name_as_announced_in_latin"='Ioannis Pauli primi';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18027411_1" ( "team_competition" text, "2008_suruga_bank_championship" text, "2008_recopa_sudamericana" text, "2008_copa_sudamericana" text, "2009_copa_libertadores" text ); Question: how many times did estudiantes de la plata participate in 2008 suruga bank championship <|assistant|> SELECT COUNT("2008_suruga_bank_championship") FROM "table1_18027411_1" WHERE "team_competition"='Estudiantes de La Plata';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18027411_1" ( "team_competition" text, "2008_suruga_bank_championship" text, "2008_recopa_sudamericana" text, "2008_copa_sudamericana" text, "2009_copa_libertadores" text ); Question: How did the team which was first round eliminated by estudiantes do in 2008 recopa sudamericana <|assistant|> SELECT "2008_recopa_sudamericana" FROM "table1_18027411_1" WHERE "2008_copa_sudamericana"='First Round eliminated by Estudiantes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18027411_1" ( "team_competition" text, "2008_suruga_bank_championship" text, "2008_recopa_sudamericana" text, "2008_copa_sudamericana" text, "2009_copa_libertadores" text ); Question: how many teams were first round eliminated by estudiantes in 2008 copa sudamericana <|assistant|> SELECT COUNT("2008_suruga_bank_championship") FROM "table1_18027411_1" WHERE "2008_copa_sudamericana"='First Round eliminated by Estudiantes';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_17" ( "edition" text, "round" text, "date" text, "partnering" text, "against" text, "surface" text, "opponents" text, "w_l" text, "result" text ); Question: What date was the match against Morocco played? <|assistant|> SELECT "date" FROM "doubles_17" WHERE "against"='Morocco';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_17" ( "edition" text, "round" text, "date" text, "partnering" text, "against" text, "surface" text, "opponents" text, "w_l" text, "result" text ); Question: What country did Gil play against on 21–23 september 2007? <|assistant|> SELECT "against" FROM "doubles_17" WHERE "date"='21–23 September 2007';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "doubles_17" ( "edition" text, "round" text, "date" text, "partnering" text, "against" text, "surface" text, "opponents" text, "w_l" text, "result" text ); Question: Who was Gil's partner on 10–12 july 2009 <|assistant|> SELECT "partnering" FROM "doubles_17" WHERE "date"='10–12 July 2009';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_1802760_3" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); Question: Where was the successor formally installed on December 3, 1858? <|assistant|> SELECT "state_class" FROM "table1_1802760_3" WHERE "date_of_successors_formal_installation"='December 3, 1858';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_1802760_3" ( "state_class" text, "vacator" text, "reason_for_change" text, "successor" text, "date_of_successors_formal_installation" text ); Question: Why did the change happen in the state where the formal installation happen on February 14, 1859? <|assistant|> SELECT "reason_for_change" FROM "table1_1802760_3" WHERE "date_of_successors_formal_installation"='February 14, 1859';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_1802522_4" ( "district" text, "vacator" text, "reason_for_change" text, "successor" text, "date_successor_seated" text ); Question: Name the vacator for tennessee 1st <|assistant|> SELECT "vacator" FROM "table1_1802522_4" WHERE "district"='Tennessee 1st';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18047346_4" ( "rank" real, "airport_name" text, "location" text, "iata_code" text, "passengers" text, "pct_chg_2009_10" text ); Question: If the passengers are 15,505,566, what is the iata code? <|assistant|> SELECT "iata_code" FROM "table1_18047346_4" WHERE "passengers"='15,505,566';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18047346_4" ( "rank" real, "airport_name" text, "location" text, "iata_code" text, "passengers" text, "pct_chg_2009_10" text ); Question: If the location is Chicago, Illinois, what is the airport name? <|assistant|> SELECT "airport_name" FROM "table1_18047346_4" WHERE "location"='Chicago, Illinois';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18047346_4" ( "rank" real, "airport_name" text, "location" text, "iata_code" text, "passengers" text, "pct_chg_2009_10" text ); Question: If the amount of passengers is 15,505,566, what is the %/chg. for 2009/10? <|assistant|> SELECT "pct_chg_2009_10" FROM "table1_18047346_4" WHERE "passengers"='15,505,566';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18042409_1" ( "player" text, "alma_mater" text, "national_lacrosse_league" text, "major_league_lacrosse" text, "international_competition" text ); Question: What university did Steve Hoar attend. <|assistant|> SELECT "alma_mater" FROM "table1_18042409_1" WHERE "player"='Steve Hoar';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18042409_1" ( "player" text, "alma_mater" text, "national_lacrosse_league" text, "major_league_lacrosse" text, "international_competition" text ); Question: List the plats that attended Wilfrid Laurier University. <|assistant|> SELECT "player" FROM "table1_18042409_1" WHERE "alma_mater"='Wilfrid Laurier University';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18042409_1" ( "player" text, "alma_mater" text, "national_lacrosse_league" text, "major_league_lacrosse" text, "international_competition" text ); Question: List all the international lacrosse league competitions for Toronto Rock. <|assistant|> SELECT "international_competition" FROM "table1_18042409_1" WHERE "national_lacrosse_league"='Toronto Rock';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18042409_1" ( "player" text, "alma_mater" text, "national_lacrosse_league" text, "major_league_lacrosse" text, "international_competition" text ); Question: List all of the NLL Toronto Rock players. <|assistant|> SELECT "player" FROM "table1_18042409_1" WHERE "national_lacrosse_league"='Toronto Rock';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18047346_5" ( "rank" real, "airport_name" text, "location" text, "iata_code" text, "tonnes" text, "pct_chg_2010_11" text ); Question: What rank is the airport whose IATA Code is JFK? <|assistant|> SELECT "rank" FROM "table1_18047346_5" WHERE "iata_code"='JFK';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18047346_5" ( "rank" real, "airport_name" text, "location" text, "iata_code" text, "tonnes" text, "pct_chg_2010_11" text ); Question: Which airport has an IATA Code of ORD? <|assistant|> SELECT "airport_name" FROM "table1_18047346_5" WHERE "iata_code"='ORD';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18047346_5" ( "rank" real, "airport_name" text, "location" text, "iata_code" text, "tonnes" text, "pct_chg_2010_11" text ); Question: Louisville International Airport had how many tonnes of cargo in 2011? <|assistant|> SELECT "tonnes" FROM "table1_18047346_5" WHERE "airport_name"='Louisville International Airport';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18047346_5" ( "rank" real, "airport_name" text, "location" text, "iata_code" text, "tonnes" text, "pct_chg_2010_11" text ); Question: How many tonnes of cargo did the airport have with the IATA Code IND? <|assistant|> SELECT "tonnes" FROM "table1_18047346_5" WHERE "iata_code"='IND';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_1805191_10" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: Who is the incumbent democratic party in district florida 11? <|assistant|> SELECT "incumbent" FROM "table1_1805191_10" WHERE "party"='Democratic' AND "district"='Florida 11';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_1805191_10" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: In which district is the first elected 2000? <|assistant|> SELECT "district" FROM "table1_1805191_10" WHERE "first_elected"=2000;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_1805191_10" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: When is the first elected in the Florida 19 district? <|assistant|> SELECT "first_elected" FROM "table1_1805191_10" WHERE "district"='Florida 19';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_1805191_10" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: What are the results of incumbent dave weldon? <|assistant|> SELECT COUNT("results") FROM "table1_1805191_10" WHERE "incumbent"='Dave Weldon';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "new_york" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: How many districts have the incumbent, Charles Rangel? <|assistant|> SELECT COUNT("district") FROM "new_york" WHERE "incumbent"='Charles Rangel';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "new_york" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: What is the party affiliation of New York 26? <|assistant|> SELECT "party" FROM "new_york" WHERE "district"='New York 26';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "pennsylvania" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: In the district of Pennsylvania 1, what is the total number of political parties? <|assistant|> SELECT COUNT("party") FROM "pennsylvania" WHERE "district"='Pennsylvania 1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "pennsylvania" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: What year was Tim Holden first elected? <|assistant|> SELECT MIN("first_elected") FROM "pennsylvania" WHERE "incumbent"='Tim Holden';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "pennsylvania" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: How many parties were first elected in 1994? <|assistant|> SELECT COUNT("party") FROM "pennsylvania" WHERE "first_elected"=1994;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "pennsylvania" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: In district Pennsylvania 11, what was the total numbers of results? <|assistant|> SELECT COUNT("results") FROM "pennsylvania" WHERE "district"='Pennsylvania 11';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "alabama" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: During what year was Representative Spencer Bachus first elected? <|assistant|> SELECT COUNT("first_elected") FROM "alabama" WHERE "incumbent"='Spencer Bachus';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "alabama" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: What is the party affiliation of the incumbent Robert Cramer? <|assistant|> SELECT "party" FROM "alabama" WHERE "incumbent"='Robert Cramer';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "washington" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: Who is the incumbent in the Washington 1 district? <|assistant|> SELECT "incumbent" FROM "washington" WHERE "district"='Washington 1';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "washington" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: How many categories of first elected are in Washington 4 district? <|assistant|> SELECT COUNT("first_elected") FROM "washington" WHERE "district"='Washington 4';<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "washington" ( "district" text, "incumbent" text, "party" text, "first_elected" real, "results" text, "candidates" text ); Question: What was the result in the election where the date of first elected was 2000? <|assistant|> SELECT "results" FROM "washington" WHERE "first_elected"=2000;<|endoftext|>
<|system|> You are an expert SQL query generator. Only output valid SQL. <|user|> ### Database Schema CREATE TABLE "table1_18054886_1" ( "no_in_series" real, "title" text, "directed_by" text, "written_by" text, "original_air_date" text, "prod_code" real, "viewers_millions" text ); Question: Who directed the episode titled "Smells Like Teen Sellout"? <|assistant|> SELECT "directed_by" FROM "table1_18054886_1" WHERE "title"='\"Smells Like Teen Sellout\"';<|endoftext|>