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