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 \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: Which language do 1% of males speak?" }, { "role": "assistant", "content": "SELECT \"percentage_pct\" FROM \"language\" WHERE \"males\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: Which language do 87.5% of males speak?" }, { "role": "assistant", "content": "SELECT \"males\" FROM \"language\" WHERE \"percentage_pct\"='87.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: Which language do 706 females speak?" }, { "role": "assistant", "content": "SELECT \"females\" FROM \"language\" WHERE \"number\"='706';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"language\" (\n \"language\" text,\n \"number\" text,\n \"percentage_pct\" text,\n \"males\" text,\n \"females\" text\n);\n\nQuestion: How many females speak Ukrainian?" }, { "role": "assistant", "content": "SELECT \"females\" FROM \"language\" WHERE \"language\"='ukrainian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What were the names of the mixed doubles pair for the year that Ralph Nichols played in the men's singles match?" }, { "role": "assistant", "content": "SELECT \"mixed_doubles\" FROM \"winners\" WHERE \"men_s_singles\"='ralph nichols';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who were the women's doubles pair in 1952?" }, { "role": "assistant", "content": "SELECT \"women_s_doubles\" FROM \"winners\" WHERE \"year\"='1952';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What was the position of the team that had a goal difference of less than -11 and played less than 38 games?" }, { "role": "assistant", "content": "SELECT SUM(\"position\") FROM \"final_table\" WHERE \"goal_difference\"<-11 AND \"played\"<38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: Which position had a goal difference of less than 27, lost more than 13 games, scored less than 42 goals and drew 6 games?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"final_table\" WHERE \"goal_difference\"<27 AND \"losses\">13 AND \"goals_for\"<42 AND \"draws\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What was the number of wins with goals against of less than 32?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"final_table\" WHERE \"goals_against\"<32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"aircraft_inventory\" (\n \"aircraft\" text,\n \"origin\" text,\n \"type\" text,\n \"versions\" text,\n \"in_service\" real\n);\n\nQuestion: How many Antonov An-2 Colt aircraft are in service?" }, { "role": "assistant", "content": "SELECT AVG(\"in_service\") FROM \"aircraft_inventory\" WHERE \"aircraft\"='antonov an-2 colt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text\n);\n\nQuestion: What 7:30 has 8:00 risk takers?" }, { "role": "assistant", "content": "SELECT \"7_30\" FROM \"saturday\" WHERE \"8_00\"='risk takers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text\n);\n\nQuestion: What 7:00 has 7:30 movies?" }, { "role": "assistant", "content": "SELECT \"7_00\" FROM \"saturday\" WHERE \"7_30\"='movies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text\n);\n\nQuestion: What 7:00 has 8:00 risk takers?" }, { "role": "assistant", "content": "SELECT \"7_00\" FROM \"saturday\" WHERE \"8_00\"='risk takers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text\n);\n\nQuestion: What 7:00 has 7:30 movies?" }, { "role": "assistant", "content": "SELECT \"7_00\" FROM \"saturday\" WHERE \"7_30\"='movies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text\n);\n\nQuestion: What 7:00 has a 7:30 of w-five?" }, { "role": "assistant", "content": "SELECT \"7_00\" FROM \"saturday\" WHERE \"7_30\"='w-five';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saturday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"10_00\" text\n);\n\nQuestion: What 7:00 has 7:30 movies?" }, { "role": "assistant", "content": "SELECT \"7_00\" FROM \"saturday\" WHERE \"7_30\"='movies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"injured_players\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"class\" text,\n \"injury_status\" text,\n \"last_update\" text\n);\n\nQuestion: for the position of rb what is the name?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"injured_players\" WHERE \"position\"='rb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"injured_players\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"class\" text,\n \"injury_status\" text,\n \"last_update\" text\n);\n\nQuestion: for the name of joe surratt what is the last update?" }, { "role": "assistant", "content": "SELECT \"last_update\" FROM \"injured_players\" WHERE \"name\"='joe surratt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"injured_players\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"class\" text,\n \"injury_status\" text,\n \"last_update\" text\n);\n\nQuestion: for the name of jamar jackson what is the last update?" }, { "role": "assistant", "content": "SELECT \"last_update\" FROM \"injured_players\" WHERE \"name\"='jamar jackson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"injured_players\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"class\" text,\n \"injury_status\" text,\n \"last_update\" text\n);\n\nQuestion: for the name of jamar jackson what is the class?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"injured_players\" WHERE \"name\"='jamar jackson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"injured_players\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"class\" text,\n \"injury_status\" text,\n \"last_update\" text\n);\n\nQuestion: for the name of jamar jackson what is the total of Number?" }, { "role": "assistant", "content": "SELECT COUNT(\"number\") FROM \"injured_players\" WHERE \"name\"='jamar jackson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: What term did Stewart Mcarthur from Vic serve in office?" }, { "role": "assistant", "content": "SELECT \"term_in_office\" FROM \"see_also\" WHERE \"state\"='vic' AND \"member\"='stewart mcarthur';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: What is Hon Paul Keating's Party?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"see_also\" WHERE \"member\"='hon paul keating';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: What member is in the liberal party and has an electorate of bruce?" }, { "role": "assistant", "content": "SELECT \"member\" FROM \"see_also\" WHERE \"party\"='liberal' AND \"electorate\"='bruce';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: Which Electorate is from vic, a labor party, and is David Charles a member of?" }, { "role": "assistant", "content": "SELECT \"electorate\" FROM \"see_also\" WHERE \"state\"='vic' AND \"party\"='labor' AND \"member\"='david charles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Name the format on july 27, 1994 for alfa records" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"label\"='alfa records' AND \"date\"='july 27, 1994';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Name the region for cd with catalog of alca-9203" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"format\"='cd' AND \"catalog\"='alca-9203';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Name the date for alfa records and catalog of alr-28045" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='alfa records' AND \"catalog\"='alr-28045';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Name the region for cd format on february 22, 1984" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"format\"='cd' AND \"date\"='february 22, 1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Name the region for february 14, 2002" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"date\"='february 14, 2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rugby_japan_internationals_1991\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: What First game has a Lost greater than 16?" }, { "role": "assistant", "content": "SELECT AVG(\"first_game\") FROM \"rugby_japan_internationals_1991\" WHERE \"lost\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rugby_japan_internationals_1991\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: What Percentage did the First game of 1998 have?" }, { "role": "assistant", "content": "SELECT \"percentage\" FROM \"rugby_japan_internationals_1991\" WHERE \"first_game\"=1998;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_in_an_innings\" (\n \"rank\" text,\n \"bowling\" text,\n \"player\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What bowler has a record of 4-15?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"best_in_an_innings\" WHERE \"bowling\"='4-15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_in_an_innings\" (\n \"rank\" text,\n \"bowling\" text,\n \"player\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What ranking is james franklin?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"best_in_an_innings\" WHERE \"player\"='james franklin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"best_in_an_innings\" (\n \"rank\" text,\n \"bowling\" text,\n \"player\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: what venue does tim southee bowl at?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"best_in_an_innings\" WHERE \"player\"='tim southee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" text,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What was the regular season for 2012?" }, { "role": "assistant", "content": "SELECT \"regular_season\" FROM \"year_by_year\" WHERE \"year\"='2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" text,\n \"division\" real,\n \"league\" text,\n \"regular_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What is the lowest division in the playoffs and did not qualify for the Open Cup in 2002?" }, { "role": "assistant", "content": "SELECT MIN(\"division\") FROM \"year_by_year\" WHERE \"playoffs\"='did not qualify' AND \"open_cup\"='did not qualify' AND \"year\"='2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What chassis has more than 0 points?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"points\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: How many points were there before 1955?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\"<1955;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the lowest amount of points held by the Epperly Indy roadster in 1959?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='epperly indy roadster' AND \"year\"=1959;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What Chassis has more than 0 points?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"points\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What is the date that 4,286 attended?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"2007_game_log\" WHERE \"attendance\"='4,286';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Where does CF Pachuca play?" }, { "role": "assistant", "content": "SELECT \"game_site\" FROM \"2007_game_log\" WHERE \"opponent\"='cf pachuca';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance of the Cup Quarterfinals game?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"2007_game_log\" WHERE \"game_site\"='cup quarterfinals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_appearances\" (\n \"2000\" text,\n \"2004\" text,\n \"2009\" text,\n \"2013\" text,\n \"total\" real\n);\n\nQuestion: What shows for 2000 when 2013 shows 3rd?" }, { "role": "assistant", "content": "SELECT \"2000\" FROM \"team_appearances\" WHERE \"2013\"='3rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_appearances\" (\n \"2000\" text,\n \"2004\" text,\n \"2009\" text,\n \"2013\" text,\n \"total\" real\n);\n\nQuestion: What is the 2004 when 2013 is 3rd?" }, { "role": "assistant", "content": "SELECT \"2004\" FROM \"team_appearances\" WHERE \"2013\"='3rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_appearances\" (\n \"2000\" text,\n \"2004\" text,\n \"2009\" text,\n \"2013\" text,\n \"total\" real\n);\n\nQuestion: What is the 2009 when the 2013 is 4th?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"team_appearances\" WHERE \"2013\"='4th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_appearances\" (\n \"2000\" text,\n \"2004\" text,\n \"2009\" text,\n \"2013\" text,\n \"total\" real\n);\n\nQuestion: What shows for 209 when the 2000 is \u2013, and a Total of 3, and a 2004 of 9th?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"team_appearances\" WHERE \"2000\"='\u2013' AND \"total\"=3 AND \"2004\"='9th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_18\" (\n \"year\" text,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text\n);\n\nQuestion: What was the winning score in the PGA Championship?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"wins_18\" WHERE \"championship\"='pga championship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"captains\" (\n \"name\" text,\n \"first_captaincy\" text,\n \"games_as_captain\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real\n);\n\nQuestion: How many draws with 1 loss?" }, { "role": "assistant", "content": "SELECT SUM(\"draws\") FROM \"captains\" WHERE \"losses\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"captains\" (\n \"name\" text,\n \"first_captaincy\" text,\n \"games_as_captain\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real\n);\n\nQuestion: How many losses does Alex Wilkinson have?" }, { "role": "assistant", "content": "SELECT COUNT(\"losses\") FROM \"captains\" WHERE \"name\"='alex wilkinson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subsidiaries_and_associates\" (\n \"company\" text,\n \"type\" text,\n \"principal_activities\" text,\n \"incorporated_in\" text,\n \"group_s_equity_shareholding_10_march_2010\" text\n);\n\nQuestion: Name the incorporated for Group's equity shareholding 10 march 2010 of 25% and principal activities of cargo loading" }, { "role": "assistant", "content": "SELECT \"incorporated_in\" FROM \"subsidiaries_and_associates\" WHERE \"group_s_equity_shareholding_10_march_2010\"='25%' AND \"principal_activities\"='cargo loading';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subsidiaries_and_associates\" (\n \"company\" text,\n \"type\" text,\n \"principal_activities\" text,\n \"incorporated_in\" text,\n \"group_s_equity_shareholding_10_march_2010\" text\n);\n\nQuestion: Name the group's equity shareholding for company of yangtze river express." }, { "role": "assistant", "content": "SELECT \"group_s_equity_shareholding_10_march_2010\" FROM \"subsidiaries_and_associates\" WHERE \"company\"='yangtze river express';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subsidiaries_and_associates\" (\n \"company\" text,\n \"type\" text,\n \"principal_activities\" text,\n \"incorporated_in\" text,\n \"group_s_equity_shareholding_10_march_2010\" text\n);\n\nQuestion: Name the type for headquarters principal activites." }, { "role": "assistant", "content": "SELECT \"type\" FROM \"subsidiaries_and_associates\" WHERE \"principal_activities\"='headquarters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"subsidiaries_and_associates\" (\n \"company\" text,\n \"type\" text,\n \"principal_activities\" text,\n \"incorporated_in\" text,\n \"group_s_equity_shareholding_10_march_2010\" text\n);\n\nQuestion: Name the incorporated for principal activites of travel agency" }, { "role": "assistant", "content": "SELECT \"incorporated_in\" FROM \"subsidiaries_and_associates\" WHERE \"principal_activities\"='travel agency';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the title with presentation of credentials of april 24, 1884" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"notes\" WHERE \"presentation_of_credentials\"='april 24, 1884';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the presentation of credentials for appointed by of grover cleveland and representative of charles w. buck" }, { "role": "assistant", "content": "SELECT \"presentation_of_credentials\" FROM \"notes\" WHERE \"appointed_by\"='grover cleveland' AND \"representative\"='charles w. buck';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the title with presentation of credentials of april 10, 1907" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"notes\" WHERE \"presentation_of_credentials\"='april 10, 1907';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the title with termination of mission of february 24, 1828" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"notes\" WHERE \"termination_of_mission\"='february 24, 1828';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the title with termination of mission of april 10, 1939" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"notes\" WHERE \"termination_of_mission\"='april 10, 1939';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Name the termination of mission for woodrow wilson appointed by and representative of benton mcmillin" }, { "role": "assistant", "content": "SELECT \"termination_of_mission\" FROM \"notes\" WHERE \"appointed_by\"='woodrow wilson' AND \"representative\"='benton mcmillin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"head_to_head\" (\n \"team\" text,\n \"miles_one_way\" real,\n \"home_result\" text,\n \"fans_brought\" text,\n \"away_result\" text,\n \"fans_took\" text,\n \"points_gained\" real\n);\n\nQuestion: What is the highest points gained of the match where fans took 907 and there were more than 44.9 miles one way?" }, { "role": "assistant", "content": "SELECT MAX(\"points_gained\") FROM \"head_to_head\" WHERE \"fans_took\"='907' AND \"miles_one_way\">44.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"head_to_head\" (\n \"team\" text,\n \"miles_one_way\" real,\n \"home_result\" text,\n \"fans_brought\" text,\n \"away_result\" text,\n \"fans_took\" text,\n \"points_gained\" real\n);\n\nQuestion: What is the points gained of the match where fans took 403 [sunday]?" }, { "role": "assistant", "content": "SELECT SUM(\"points_gained\") FROM \"head_to_head\" WHERE \"fans_took\"='403 [sunday]';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"head_to_head\" (\n \"team\" text,\n \"miles_one_way\" real,\n \"home_result\" text,\n \"fans_brought\" text,\n \"away_result\" text,\n \"fans_took\" text,\n \"points_gained\" real\n);\n\nQuestion: Which team had fans took of 288?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"head_to_head\" WHERE \"fans_took\"='288';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers_in_loi\" (\n \"ranking\" real,\n \"nationality\" text,\n \"name\" text,\n \"years\" text,\n \"goals\" real\n);\n\nQuestion: What years had a ranking of 1?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"top_scorers_in_loi\" WHERE \"ranking\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers_in_loi\" (\n \"ranking\" real,\n \"nationality\" text,\n \"name\" text,\n \"years\" text,\n \"goals\" real\n);\n\nQuestion: What is the nationality of the person with 50 goals and rank 3?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"top_scorers_in_loi\" WHERE \"goals\"=50 AND \"ranking\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"season\" real,\n \"year\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"regular_season_standing\" text,\n \"final_standing\" text\n);\n\nQuestion: How many losses occurred with regular season standing of 17th from 20 later than 1996?" }, { "role": "assistant", "content": "SELECT COUNT(\"losses\") FROM \"references\" WHERE \"regular_season_standing\"='17th from 20' AND \"year\">1996;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"season\" real,\n \"year\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"regular_season_standing\" text,\n \"final_standing\" text\n);\n\nQuestion: What is the earliest season with a regular season standing of 11th from 15 and more than 10 wins?" }, { "role": "assistant", "content": "SELECT MIN(\"season\") FROM \"references\" WHERE \"regular_season_standing\"='11th from 15' AND \"wins\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: What was the status of joon-hyung park \ubc15\uc900\ud615?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"billy_elliot\" WHERE \"name\"='joon-hyung park \ubc15\uc900\ud615';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: Who had a ballet style with original cast?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"billy_elliot\" WHERE \"style\"='ballet' AND \"status\"='original cast';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"billy_elliot\" (\n \"status\" text,\n \"name\" text,\n \"first_performance\" text,\n \"last_performance\" text,\n \"style\" text\n);\n\nQuestion: When was the first performance with a replacement cast?" }, { "role": "assistant", "content": "SELECT \"first_performance\" FROM \"billy_elliot\" WHERE \"status\"='replacement cast';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the latest year for the Tyrrell 018 Chassis that has less than 3 points?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='tyrrell 018' AND \"points\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Which entrant has a Honda V6 engine and a Lotus 99t chassis?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"complete_formula_one_results\" WHERE \"engine\"='honda v6' AND \"chassis\"='lotus 99t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_wickets_in_a_season\" (\n \"matches\" real,\n \"wickets\" real,\n \"runs\" real,\n \"10_wm\" real,\n \"best\" text\n);\n\nQuestion: Name the least wickets when matches are more than 10 and 10 WM is more than 1" }, { "role": "assistant", "content": "SELECT MIN(\"wickets\") FROM \"most_wickets_in_a_season\" WHERE \"matches\">10 AND \"10_wm\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_wickets_in_a_season\" (\n \"matches\" real,\n \"wickets\" real,\n \"runs\" real,\n \"10_wm\" real,\n \"best\" text\n);\n\nQuestion: Name the best when runs of 1088 and matches more than 11" }, { "role": "assistant", "content": "SELECT \"best\" FROM \"most_wickets_in_a_season\" WHERE \"matches\">11 AND \"runs\"=1088;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"most_wickets_in_a_season\" (\n \"matches\" real,\n \"wickets\" real,\n \"runs\" real,\n \"10_wm\" real,\n \"best\" text\n);\n\nQuestion: Name the most runs for wickets of 66 and matches less than 13" }, { "role": "assistant", "content": "SELECT MAX(\"runs\") FROM \"most_wickets_in_a_season\" WHERE \"wickets\"=66 AND \"matches\"<13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the score of the game with the San Diego Padres as the opponent and a record of 11-23?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='san diego padres' AND \"record\"='11-23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the date of the game with a record of 14-31?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='14-31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the date of the game with a 17-31 record?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='17-31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record of the game on 13 May?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='13 may';" } ]
[ { "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 \"attendance\" real\n);\n\nQuestion: What was average attendance during week 15?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"week\"=15;" } ]
[ { "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 \"attendance\" real\n);\n\nQuestion: What's the smallest week that had a result of t 17\u201317?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"result\"='t 17\u201317';" } ]
[ { "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 \"attendance\" real\n);\n\nQuestion: Who was the opponent in week 12?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: What is the current club of the Forward who was born after 1983 and who has a height under 2.12?" }, { "role": "assistant", "content": "SELECT \"current_club\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"year_born\">1983 AND \"height\"<2.12 AND \"position\"='forward';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: What is the position of the player who is taller than 2.12?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"fiba_euro_basket_2007_squads\" WHERE \"height\">2.12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"states_that_have_voted_on_amendments\" (\n \"state\" text,\n \"date\" text,\n \"yes_vote\" text,\n \"no_vote\" text,\n \"vote_outcome\" text\n);\n\nQuestion: How many no votes did North Dakota have?" }, { "role": "assistant", "content": "SELECT \"no_vote\" FROM \"states_that_have_voted_on_amendments\" WHERE \"state\"='north dakota';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"states_that_have_voted_on_amendments\" (\n \"state\" text,\n \"date\" text,\n \"yes_vote\" text,\n \"no_vote\" text,\n \"vote_outcome\" text\n);\n\nQuestion: What was the date for Colorado?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"states_that_have_voted_on_amendments\" WHERE \"state\"='colorado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"states_that_have_voted_on_amendments\" (\n \"state\" text,\n \"date\" text,\n \"yes_vote\" text,\n \"no_vote\" text,\n \"vote_outcome\" text\n);\n\nQuestion: How many no votes from Alaska in 1998?" }, { "role": "assistant", "content": "SELECT \"no_vote\" FROM \"states_that_have_voted_on_amendments\" WHERE \"date\"='1998' AND \"state\"='alaska';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"states_that_have_voted_on_amendments\" (\n \"state\" text,\n \"date\" text,\n \"yes_vote\" text,\n \"no_vote\" text,\n \"vote_outcome\" text\n);\n\nQuestion: How many positive votes for Tennessee in 2006?" }, { "role": "assistant", "content": "SELECT \"yes_vote\" FROM \"states_that_have_voted_on_amendments\" WHERE \"date\"='2006' AND \"state\"='tennessee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"songs\" (\n \"number\" real,\n \"name_of_the_song\" text,\n \"singer\" text,\n \"drama\" text,\n \"kind_of_the_song\" text\n);\n\nQuestion: What is the name of the song that is part of the opening theme and has a drama of the revolving doors of vengeance?" }, { "role": "assistant", "content": "SELECT \"name_of_the_song\" FROM \"songs\" WHERE \"kind_of_the_song\"='opening theme' AND \"drama\"='revolving doors of vengeance';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_completed_buildings\" (\n \"rank\" text,\n \"building_name\" text,\n \"street_address\" text,\n \"height_feet_meters\" text,\n \"floors\" real,\n \"completed\" real\n);\n\nQuestion: How many floors are there at 32 n. main street?" }, { "role": "assistant", "content": "SELECT SUM(\"floors\") FROM \"tallest_completed_buildings\" WHERE \"street_address\"='32 n. main street';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_completed_buildings\" (\n \"rank\" text,\n \"building_name\" text,\n \"street_address\" text,\n \"height_feet_meters\" text,\n \"floors\" real,\n \"completed\" real\n);\n\nQuestion: When did the rank 9 building got completed?" }, { "role": "assistant", "content": "SELECT \"completed\" FROM \"tallest_completed_buildings\" WHERE \"rank\"='9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deputy_ministers\" (\n \"minister\" text,\n \"party\" text,\n \"governments\" text,\n \"term_start\" text,\n \"term_end\" text\n);\n\nQuestion: Which party has 24 governments?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"deputy_ministers\" WHERE \"governments\"='24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deputy_ministers\" (\n \"minister\" text,\n \"party\" text,\n \"governments\" text,\n \"term_start\" text,\n \"term_end\" text\n);\n\nQuestion: What governments did the minister with a term start on 24 September 1984 have?" }, { "role": "assistant", "content": "SELECT \"governments\" FROM \"deputy_ministers\" WHERE \"term_start\"='24 september 1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deputy_ministers\" (\n \"minister\" text,\n \"party\" text,\n \"governments\" text,\n \"term_start\" text,\n \"term_end\" text\n);\n\nQuestion: When is the term end of Shlomo-Yisrael Ben-Meir of the National Religious Party?" }, { "role": "assistant", "content": "SELECT \"term_end\" FROM \"deputy_ministers\" WHERE \"party\"='national religious party' AND \"minister\"='shlomo-yisrael ben-meir';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"deputy_ministers\" (\n \"minister\" text,\n \"party\" text,\n \"governments\" text,\n \"term_start\" text,\n \"term_end\" text\n);\n\nQuestion: Who is the minister with a term end on 10 March 1974?" }, { "role": "assistant", "content": "SELECT \"minister\" FROM \"deputy_ministers\" WHERE \"term_end\"='10 march 1974';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the points classification for predictor-lotto and stage 1" }, { "role": "assistant", "content": "SELECT \"points_classification\" FROM \"jersey_progress\" WHERE \"team_classification\"='predictor-lotto' AND \"stage\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the points classification for quick step-innergetic with stage 7" }, { "role": "assistant", "content": "SELECT \"points_classification\" FROM \"jersey_progress\" WHERE \"team_classification\"='quick step-innergetic' AND \"stage\"='7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the stgae with winner of robbie mcewen" }, { "role": "assistant", "content": "SELECT \"stage\" FROM \"jersey_progress\" WHERE \"winner\"='robbie mcewen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Name the winner for nick nuyens for general classification and stage of 2" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"jersey_progress\" WHERE \"general_classification\"='nick nuyens' AND \"stage\"='2';" } ]