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 \"table1_228973_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: when was the premiere of the episode called \"force recon\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_228973_3\" WHERE \"title\"='\\\"Force Recon\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_228973_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: which is the number of the season episode whose premiere was in january 3, 1997?" }, { "role": "assistant", "content": "SELECT COUNT(\"no_in_season\") FROM \"table1_228973_3\" WHERE \"original_air_date\"='January 3, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_228973_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: which is the number of the season episode whose writer is R. Scott Gemmill and the Director is Ray Austin?" }, { "role": "assistant", "content": "SELECT \"no_in_season\" FROM \"table1_228973_3\" WHERE \"written_by\"='R. Scott Gemmill' AND \"directed_by\"='Ray Austin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_228973_3\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: what is the name of the episode whose number of the series episode was 31?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_228973_3\" WHERE \"no_in_series\"=31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_228973_7\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: When 129 is the number in the series who is the writer?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_228973_7\" WHERE \"no_in_series\"=129;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_228973_7\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: When \"past tense\" is the title who is the writer?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_228973_7\" WHERE \"title\"='\\\"Past Tense\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2289806_1\" (\n \"episode_num\" real,\n \"prod_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"originalairdate\" text\n);\n\nQuestion: How manu original airdates have \"a cellar full of silence\" as the title?" }, { "role": "assistant", "content": "SELECT COUNT(\"originalairdate\") FROM \"table1_2289806_1\" WHERE \"title\"='\\\"A Cellar Full of Silence\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2289806_1\" (\n \"episode_num\" real,\n \"prod_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"originalairdate\" text\n);\n\nQuestion: How many product # have episode 1?" }, { "role": "assistant", "content": "SELECT MAX(\"prod_num\") FROM \"table1_2289806_1\" WHERE \"episode_num\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22903426_1\" (\n \"name\" text,\n \"platform\" text,\n \"license\" text,\n \"windows_builders\" text,\n \"java_builders\" text,\n \"other_builders\" text,\n \"scm_system\" text,\n \"notification\" text,\n \"ide_integration\" text,\n \"other_integration\" text\n);\n\nQuestion: Name the windows builders for apache gump" }, { "role": "assistant", "content": "SELECT \"windows_builders\" FROM \"table1_22903426_1\" WHERE \"name\"='Apache Gump';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22903426_1\" (\n \"name\" text,\n \"platform\" text,\n \"license\" text,\n \"windows_builders\" text,\n \"java_builders\" text,\n \"other_builders\" text,\n \"scm_system\" text,\n \"notification\" text,\n \"ide_integration\" text,\n \"other_integration\" text\n);\n\nQuestion: Name the number of scm system for nant, visual studio" }, { "role": "assistant", "content": "SELECT COUNT(\"scm_system\") FROM \"table1_22903426_1\" WHERE \"windows_builders\"='NAnt, Visual Studio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22903426_1\" (\n \"name\" text,\n \"platform\" text,\n \"license\" text,\n \"windows_builders\" text,\n \"java_builders\" text,\n \"other_builders\" text,\n \"scm_system\" text,\n \"notification\" text,\n \"ide_integration\" text,\n \"other_integration\" text\n);\n\nQuestion: Name the number of other builders for nant, visual studio" }, { "role": "assistant", "content": "SELECT COUNT(\"other_builders\") FROM \"table1_22903426_1\" WHERE \"windows_builders\"='NAnt, Visual Studio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_country_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"manhunt_international\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: What is the minimum for 2nd runner-up?" }, { "role": "assistant", "content": "SELECT MIN(\"2nd_runner_up\") FROM \"by_country_tally\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_country_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"manhunt_international\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of 4th runner-up where the 2nd runner-up is smaller than 1.0 and the 1st runner-up is smaller than 1.0 and the total is 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"4th_runner_up\") FROM \"by_country_tally\" WHERE \"2nd_runner_up\"<1.0 AND \"1st_runner_up\"<1.0 AND \"total\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_228973_9\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: If the original air date is February 4, 2003, what is the episode title?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_228973_9\" WHERE \"original_air_date\"='February 4, 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_228973_9\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: If the original air date is April 1, 2003, what number in the series is this episode?" }, { "role": "assistant", "content": "SELECT \"no_in_series\" FROM \"table1_228973_9\" WHERE \"original_air_date\"='April 1, 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_228973_9\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the maximum number in the series for the episode directed by Harvey S. Laidman?" }, { "role": "assistant", "content": "SELECT MAX(\"no_in_series\") FROM \"table1_228973_9\" WHERE \"directed_by\"='Harvey S. Laidman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22904752_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"rank_week\" text,\n \"original_air_date\" text\n);\n\nQuestion: When is the original air date written by sean whitesell?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_22904752_1\" WHERE \"written_by\"='Sean Whitesell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22904752_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"rank_week\" text,\n \"original_air_date\" text\n);\n\nQuestion: Who is no. 79 directed by?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_22904752_1\" WHERE \"no\"=79;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22904752_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"rank_week\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the # when u.s. viewers (million) is 17.44?" }, { "role": "assistant", "content": "SELECT COUNT(\"num\") FROM \"table1_22904752_1\" WHERE \"u_s_viewers_million\"='17.44';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22904752_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"rank_week\" text,\n \"original_air_date\" text\n);\n\nQuestion: How many # were written by david hoselton?" }, { "role": "assistant", "content": "SELECT MAX(\"num\") FROM \"table1_22904752_1\" WHERE \"written_by\"='David Hoselton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"event\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"race_1_winner\" text,\n \"race_2_winner\" text,\n \"race_3_winner\" text\n);\n\nQuestion: How many race 3 winners were there when Mitch Evans won race 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"race_3_winner\") FROM \"race_calendar_and_results\" WHERE \"race_2_winner\"='Mitch Evans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"event\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"race_1_winner\" text,\n \"race_2_winner\" text,\n \"race_3_winner\" text\n);\n\nQuestion: What date was the race at the Symmons Plains Raceway?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"race_calendar_and_results\" WHERE \"circuit\"='Symmons Plains Raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"event\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"race_1_winner\" text,\n \"race_2_winner\" text,\n \"race_3_winner\" text\n);\n\nQuestion: Who was the race 1 winner at the race held at Winton Motor Raceway?" }, { "role": "assistant", "content": "SELECT \"race_1_winner\" FROM \"race_calendar_and_results\" WHERE \"circuit\"='Winton Motor Raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar_and_results\" (\n \"event\" real,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"race_1_winner\" text,\n \"race_2_winner\" text,\n \"race_3_winner\" text\n);\n\nQuestion: Who was the race 1 winner of the race at Hidden Valley Raceway?" }, { "role": "assistant", "content": "SELECT \"race_1_winner\" FROM \"race_calendar_and_results\" WHERE \"circuit\"='Hidden Valley Raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"margin_of_victory\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winners_share\" real\n);\n\nQuestion: In how many years did Pat Bradley became the champion?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"winners\" WHERE \"champion\"='Pat Bradley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"margin_of_victory\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winners_share\" real\n);\n\nQuestion: When was the tournament in Forest Lake Country Club held?" }, { "role": "assistant", "content": "SELECT \"dates\" FROM \"winners\" WHERE \"tournament_location\"='Forest Lake Country Club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"margin_of_victory\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winners_share\" real\n);\n\nQuestion: How many different countries did the champion Se Ri Pak (2) represent?" }, { "role": "assistant", "content": "SELECT COUNT(\"country\") FROM \"winners\" WHERE \"champion\"='Se Ri Pak (2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"margin_of_victory\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winners_share\" real\n);\n\nQuestion: What was the score in 1978?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"winners\" WHERE \"year\"=1978;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"margin_of_victory\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winners_share\" real\n);\n\nQuestion: What was the winner share (in $) in the year when Se Ri Pak (2) was the champion?" }, { "role": "assistant", "content": "SELECT MIN(\"winners_share\") FROM \"winners\" WHERE \"champion\"='Se Ri Pak (2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"margin_of_victory\" text,\n \"tournament_location\" text,\n \"purse\" real,\n \"winners_share\" real\n);\n\nQuestion: What was the score in the tournament won by Jan Stephenson?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"winners\" WHERE \"champion\"='Jan Stephenson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"location\" text,\n \"opponent\" text,\n \"sooners_points\" real,\n \"opp_points\" real,\n \"record\" text\n);\n\nQuestion: How many points did the opponents score at the game in Knoxville?" }, { "role": "assistant", "content": "SELECT MIN(\"opp_points\") FROM \"schedule\" WHERE \"location\"='Knoxville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"location\" text,\n \"opponent\" text,\n \"sooners_points\" real,\n \"opp_points\" real,\n \"record\" text\n);\n\nQuestion: What game date had a record of 17-7?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"record\"='17-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"location\" text,\n \"opponent\" text,\n \"sooners_points\" real,\n \"opp_points\" real,\n \"record\" text\n);\n\nQuestion: How many points did the opponents score on the game where Sooners' record was 16-5?" }, { "role": "assistant", "content": "SELECT MAX(\"opp_points\") FROM \"schedule\" WHERE \"record\"='16-5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22904780_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"rank_week\" real,\n \"original_air_date\" text\n);\n\nQuestion: List the number of shows that had 12.04 million viewers in the united states" }, { "role": "assistant", "content": "SELECT COUNT(\"title\") FROM \"table1_22904780_1\" WHERE \"u_s_viewers_million\"='12.04';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22904780_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"rank_week\" real,\n \"original_air_date\" text\n);\n\nQuestion: List the original air date for week 5." }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_22904780_1\" WHERE \"rank_week\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22904780_1\" (\n \"no\" real,\n \"num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"rank_week\" real,\n \"original_air_date\" text\n);\n\nQuestion: List the 1st air date for the show where the writers are russel friend & garrett lerner." }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_22904780_1\" WHERE \"written_by\"='Russel Friend & Garrett Lerner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"four_cylinder_engines\" (\n \"engine\" text,\n \"crankshaft\" text,\n \"ignition_timing\" text,\n \"graphical\" text,\n \"example\" text\n);\n\nQuestion: When shinya nakano's kawasaki ninja zx-rr is the example what is the graphical?" }, { "role": "assistant", "content": "SELECT \"graphical\" FROM \"four_cylinder_engines\" WHERE \"example\"='Shinya Nakano''s Kawasaki Ninja ZX-RR';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"four_cylinder_engines\" (\n \"engine\" text,\n \"crankshaft\" text,\n \"ignition_timing\" text,\n \"graphical\" text,\n \"example\" text\n);\n\nQuestion: When 1985-2007 yamaha v-max honda vfr800 is the example what is the engine is it?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"four_cylinder_engines\" WHERE \"example\"='1985-2007 Yamaha V-Max Honda VFR800';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"four_cylinder_engines\" (\n \"engine\" text,\n \"crankshaft\" text,\n \"ignition_timing\" text,\n \"graphical\" text,\n \"example\" text\n);\n\nQuestion: When shinya nakano's kawasaki ninja zx-rr is the example what is the engine type?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"four_cylinder_engines\" WHERE \"example\"='Shinya Nakano''s Kawasaki Ninja ZX-RR';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"four_cylinder_engines\" (\n \"engine\" text,\n \"crankshaft\" text,\n \"ignition_timing\" text,\n \"graphical\" text,\n \"example\" text\n);\n\nQuestion: When 68-292-68-292 is the ignition timing how many graphicals is it?" }, { "role": "assistant", "content": "SELECT COUNT(\"graphical\") FROM \"four_cylinder_engines\" WHERE \"ignition_timing\"='68-292-68-292';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"four_cylinder_engines\" (\n \"engine\" text,\n \"crankshaft\" text,\n \"ignition_timing\" text,\n \"graphical\" text,\n \"example\" text\n);\n\nQuestion: When i4 is the engine what is the graphical?" }, { "role": "assistant", "content": "SELECT \"graphical\" FROM \"four_cylinder_engines\" WHERE \"engine\"='I4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"four_cylinder_engines\" (\n \"engine\" text,\n \"crankshaft\" text,\n \"ignition_timing\" text,\n \"graphical\" text,\n \"example\" text\n);\n\nQuestion: When 1-1-0-0-1-1-0-0- is the graphical how many ignition timings are there?" }, { "role": "assistant", "content": "SELECT COUNT(\"ignition_timing\") FROM \"four_cylinder_engines\" WHERE \"graphical\"='1-1-0-0-1-1-0-0-';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goals\" (\n \"r\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"champions_league\" real,\n \"copa_del_rey\" real,\n \"total\" real\n);\n\nQuestion: Name the least total for sergio ramos" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"goals\" WHERE \"player\"='Sergio Ramos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goals\" (\n \"r\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"champions_league\" real,\n \"copa_del_rey\" real,\n \"total\" real\n);\n\nQuestion: Name the least copa del rey" }, { "role": "assistant", "content": "SELECT MIN(\"copa_del_rey\") FROM \"goals\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goals\" (\n \"r\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"champions_league\" real,\n \"copa_del_rey\" real,\n \"total\" real\n);\n\nQuestion: Name the most copa del rey for karim benzema" }, { "role": "assistant", "content": "SELECT MAX(\"copa_del_rey\") FROM \"goals\" WHERE \"player\"='Karim Benzema';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"r\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"champions_league\" real,\n \"copa_del_rey\" real,\n \"total\" real\n);\n\nQuestion: If the total is 6, what is the maximum R?" }, { "role": "assistant", "content": "SELECT MAX(\"r\") FROM \"assists\" WHERE \"total\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"r\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"champions_league\" real,\n \"copa_del_rey\" real,\n \"total\" real\n);\n\nQuestion: If the player is Marcelo, what is the minimum R?" }, { "role": "assistant", "content": "SELECT MIN(\"r\") FROM \"assists\" WHERE \"player\"='Marcelo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"r\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"champions_league\" real,\n \"copa_del_rey\" real,\n \"total\" real\n);\n\nQuestion: If the position is FB, what is the Copa Del Rey?" }, { "role": "assistant", "content": "SELECT \"copa_del_rey\" FROM \"assists\" WHERE \"position\"='FB';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"r\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"champions_league\" real,\n \"copa_del_rey\" real,\n \"total\" real\n);\n\nQuestion: If the player is Marcelo, what is the position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"assists\" WHERE \"player\"='Marcelo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"r\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"champions_league\" real,\n \"copa_del_rey\" real,\n \"total\" real\n);\n\nQuestion: If the position is AM and the league is larger than 7.0, what is the total R number?" }, { "role": "assistant", "content": "SELECT COUNT(\"r\") FROM \"assists\" WHERE \"position\"='AM' AND \"league\">7.0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"r\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"champions_league\" real,\n \"copa_del_rey\" real,\n \"total\" real\n);\n\nQuestion: What is the maximum possible Copa Del Rey?" }, { "role": "assistant", "content": "SELECT MAX(\"copa_del_rey\") FROM \"assists\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"category_leadership_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification_ta_koszulka\" text,\n \"mountains_classification_klasyfikacja_g_rska\" text,\n \"intermediate_sprints_classification_klasyfikacja_najaktywniejszych\" text,\n \"points_classification_klasyfikacja_punktowa\" text\n);\n\nQuestion: Who was the Stage 1 winner?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"category_leadership_table\" WHERE \"stage\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"category_leadership_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification_ta_koszulka\" text,\n \"mountains_classification_klasyfikacja_g_rska\" text,\n \"intermediate_sprints_classification_klasyfikacja_najaktywniejszych\" text,\n \"points_classification_klasyfikacja_punktowa\" text\n);\n\nQuestion: Who won Stage 7?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"category_leadership_table\" WHERE \"stage\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"category_leadership_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification_ta_koszulka\" text,\n \"mountains_classification_klasyfikacja_g_rska\" text,\n \"intermediate_sprints_classification_klasyfikacja_najaktywniejszych\" text,\n \"points_classification_klasyfikacja_punktowa\" text\n);\n\nQuestion: Who was the mountain classification winner in the stage won by Alessandro Ballan?" }, { "role": "assistant", "content": "SELECT \"mountains_classification_klasyfikacja_g_rska\" FROM \"category_leadership_table\" WHERE \"winner\"='Alessandro Ballan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"incorporated_places_with_a_density_of_ov\" (\n \"rank\" real,\n \"incorporated_place\" text,\n \"metropolitan_area\" text,\n \"state\" text,\n \"population_2010_census\" real,\n \"land_area_mi_2\" text,\n \"population_density_people_per_mi_2\" text\n);\n\nQuestion: For the city whose land area was 135.09, what was the total population density?" }, { "role": "assistant", "content": "SELECT \"population_density_people_per_mi_2\" FROM \"incorporated_places_with_a_density_of_ov\" WHERE \"land_area_mi_2\"='135.09';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"incorporated_places_with_a_density_of_ov\" (\n \"rank\" real,\n \"incorporated_place\" text,\n \"metropolitan_area\" text,\n \"state\" text,\n \"population_2010_census\" real,\n \"land_area_mi_2\" text,\n \"population_density_people_per_mi_2\" text\n);\n\nQuestion: Which major metropolitan area had a land area of 23.80?" }, { "role": "assistant", "content": "SELECT \"metropolitan_area\" FROM \"incorporated_places_with_a_density_of_ov\" WHERE \"land_area_mi_2\"='23.80';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"incorporated_places_with_a_density_of_ov\" (\n \"rank\" real,\n \"incorporated_place\" text,\n \"metropolitan_area\" text,\n \"state\" text,\n \"population_2010_census\" real,\n \"land_area_mi_2\" text,\n \"population_density_people_per_mi_2\" text\n);\n\nQuestion: How many states had a population density of 10188.8?" }, { "role": "assistant", "content": "SELECT COUNT(\"state\") FROM \"incorporated_places_with_a_density_of_ov\" WHERE \"population_density_people_per_mi_2\"='10188.8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"charter_members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real,\n \"left\" real\n);\n\nQuestion: Name the number of left for cardinals" }, { "role": "assistant", "content": "SELECT COUNT(\"left\") FROM \"charter_members\" WHERE \"nickname\"='Cardinals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"charter_members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real,\n \"left\" real\n);\n\nQuestion: Name the school that is private" }, { "role": "assistant", "content": "SELECT \"institution\" FROM \"charter_members\" WHERE \"type\"='Private';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"charter_members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real,\n \"left\" real\n);\n\nQuestion: Name the location that was founded 1798" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"charter_members\" WHERE \"founded\"=1798;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"charter_members\" (\n \"institution\" text,\n \"nickname\" text,\n \"location\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" real,\n \"left\" real\n);\n\nQuestion: Name the nickname that was founded 1798" }, { "role": "assistant", "content": "SELECT \"nickname\" FROM \"charter_members\" WHERE \"founded\"=1798;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas\" (\n \"rank\" real,\n \"metropolitan_area\" text,\n \"principal_city\" text,\n \"10_000_places\" real,\n \"densest_incorporated_place\" text,\n \"density\" text\n);\n\nQuestion: Name the least 10,000+ places for louisville" }, { "role": "assistant", "content": "SELECT MIN(\"10_000_places\") FROM \"metropolitan_areas\" WHERE \"principal_city\"='Louisville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas\" (\n \"rank\" real,\n \"metropolitan_area\" text,\n \"principal_city\" text,\n \"10_000_places\" real,\n \"densest_incorporated_place\" text,\n \"density\" text\n);\n\nQuestion: Name the density for pennsbury village" }, { "role": "assistant", "content": "SELECT \"density\" FROM \"metropolitan_areas\" WHERE \"densest_incorporated_place\"='Pennsbury Village';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas\" (\n \"rank\" real,\n \"metropolitan_area\" text,\n \"principal_city\" text,\n \"10_000_places\" real,\n \"densest_incorporated_place\" text,\n \"density\" text\n);\n\nQuestion: Name the number of rank for stone park" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"metropolitan_areas\" WHERE \"densest_incorporated_place\"='Stone Park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"metropolitan_areas\" (\n \"rank\" real,\n \"metropolitan_area\" text,\n \"principal_city\" text,\n \"10_000_places\" real,\n \"densest_incorporated_place\" text,\n \"density\" text\n);\n\nQuestion: Name the area for north bay village" }, { "role": "assistant", "content": "SELECT \"metropolitan_area\" FROM \"metropolitan_areas\" WHERE \"densest_incorporated_place\"='North Bay Village';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2293510_1\" (\n \"region_nuts_2006\" text,\n \"total_million\" text,\n \"per_capita_2005\" real,\n \"ppp_million\" real,\n \"ppp_per_capita\" real,\n \"pct_of_eu_average_gdp_ppp\" text\n);\n\nQuestion: Where is the PPP 23164 million \u20ac?" }, { "role": "assistant", "content": "SELECT \"region_nuts_2006\" FROM \"table1_2293510_1\" WHERE \"ppp_million\"=23164;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2293510_1\" (\n \"region_nuts_2006\" text,\n \"total_million\" text,\n \"per_capita_2005\" real,\n \"ppp_million\" real,\n \"ppp_per_capita\" real,\n \"pct_of_eu_average_gdp_ppp\" text\n);\n\nQuestion: What's the total (in million \u20ac) in the region where PPP is 21779 million \u20ac?" }, { "role": "assistant", "content": "SELECT \"total_million\" FROM \"table1_2293510_1\" WHERE \"ppp_million\"=21779;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_2293510_1\" (\n \"region_nuts_2006\" text,\n \"total_million\" text,\n \"per_capita_2005\" real,\n \"ppp_million\" real,\n \"ppp_per_capita\" real,\n \"pct_of_eu_average_gdp_ppp\" text\n);\n\nQuestion: What's the percentage of EU average GDP (PPP) in the region where \u20ac per capita is 2519" }, { "role": "assistant", "content": "SELECT \"pct_of_eu_average_gdp_ppp\" FROM \"table1_2293510_1\" WHERE \"per_capita_2005\"=2519;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders_jersey_progress_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: If the winner is Bernhard Eisel, what is the stage maximum?" }, { "role": "assistant", "content": "SELECT MAX(\"stage\") FROM \"riders_jersey_progress_table\" WHERE \"winner\"='Bernhard Eisel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders_jersey_progress_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is the mountain classification name if the winner is Bernhard Eisel?" }, { "role": "assistant", "content": "SELECT \"mountains_classification\" FROM \"riders_jersey_progress_table\" WHERE \"winner\"='Bernhard Eisel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders_jersey_progress_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: If the stage is 3, what is the points classification name?" }, { "role": "assistant", "content": "SELECT \"points_classification\" FROM \"riders_jersey_progress_table\" WHERE \"stage\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders_jersey_progress_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: If the stage is 9, what is the team classification name?" }, { "role": "assistant", "content": "SELECT \"team_classification\" FROM \"riders_jersey_progress_table\" WHERE \"stage\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders_jersey_progress_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: If the winner is Michael Albasini, what is the mountains classification name?" }, { "role": "assistant", "content": "SELECT \"mountains_classification\" FROM \"riders_jersey_progress_table\" WHERE \"winner\"='Michael Albasini';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders_jersey_progress_table\" (\n \"stage\" real,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is the name of the winner when the sprints classification is no award?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"riders_jersey_progress_table\" WHERE \"sprints_classification\"='no award';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22951088_3\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_millions\" text,\n \"18_49_rating_share\" text\n);\n\nQuestion: What was the 18-49 rating share for the episode \"pilot\"?" }, { "role": "assistant", "content": "SELECT \"18_49_rating_share\" FROM \"table1_22951088_3\" WHERE \"title\"='\\\"Pilot\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22951088_3\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_millions\" text,\n \"18_49_rating_share\" text\n);\n\nQuestion: How many viewers (in millions) watched the episode written by deidre shaw?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_in_millions\" FROM \"table1_22951088_3\" WHERE \"written_by\"='Deidre Shaw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22951088_3\" (\n \"no\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"u_s_viewers_in_millions\" text,\n \"18_49_rating_share\" text\n);\n\nQuestion: What was the original air date of episode number 1?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_22951088_3\" WHERE \"no\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_hat_tricks\" (\n \"no\" real,\n \"season\" real,\n \"bowler\" text,\n \"batsmen\" text,\n \"for\" text,\n \"against\" text,\n \"ground\" text,\n \"scorecard\" text\n);\n\nQuestion: Who was the bowler when the batsmen was dwaraka ravi teja rp singh pragyan ojha?" }, { "role": "assistant", "content": "SELECT \"bowler\" FROM \"list_of_hat_tricks\" WHERE \"batsmen\"='Dwaraka Ravi Teja RP Singh Pragyan Ojha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_hat_tricks\" (\n \"no\" real,\n \"season\" real,\n \"bowler\" text,\n \"batsmen\" text,\n \"for\" text,\n \"against\" text,\n \"ground\" text,\n \"scorecard\" text\n);\n\nQuestion: How many bowlers were there when david hussey azhar mahmood gurkeerat singh was the batsmen?" }, { "role": "assistant", "content": "SELECT COUNT(\"bowler\") FROM \"list_of_hat_tricks\" WHERE \"batsmen\"='David Hussey Azhar Mahmood Gurkeerat Singh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_hat_tricks\" (\n \"no\" real,\n \"season\" real,\n \"bowler\" text,\n \"batsmen\" text,\n \"for\" text,\n \"against\" text,\n \"ground\" text,\n \"scorecard\" text\n);\n\nQuestion: What season was herschelle gibbs andrew symonds venugopal rao batsmen?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"list_of_hat_tricks\" WHERE \"batsmen\"='Herschelle Gibbs Andrew Symonds Venugopal Rao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_hat_tricks\" (\n \"no\" real,\n \"season\" real,\n \"bowler\" text,\n \"batsmen\" text,\n \"for\" text,\n \"against\" text,\n \"ground\" text,\n \"scorecard\" text\n);\n\nQuestion: What was the scorecard when robin uthappa mark boucher jacques kallis was the batsmen?" }, { "role": "assistant", "content": "SELECT \"scorecard\" FROM \"list_of_hat_tricks\" WHERE \"batsmen\"='Robin Uthappa Mark Boucher Jacques Kallis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_hat_tricks\" (\n \"no\" real,\n \"season\" real,\n \"bowler\" text,\n \"batsmen\" text,\n \"for\" text,\n \"against\" text,\n \"ground\" text,\n \"scorecard\" text\n);\n\nQuestion: How many sesason were there when for is deccan chargers and bowler is amit mishra?" }, { "role": "assistant", "content": "SELECT COUNT(\"season\") FROM \"list_of_hat_tricks\" WHERE \"for\"='Deccan Chargers' AND \"bowler\"='Amit Mishra';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_hat_tricks\" (\n \"no\" real,\n \"season\" real,\n \"bowler\" text,\n \"batsmen\" text,\n \"for\" text,\n \"against\" text,\n \"ground\" text,\n \"scorecard\" text\n);\n\nQuestion: What is the number when against is rajasthan royals?" }, { "role": "assistant", "content": "SELECT MAX(\"no\") FROM \"list_of_hat_tricks\" WHERE \"against\"='Rajasthan Royals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sun_like_stars_with_hot_dust_disks\" (\n \"star\" text,\n \"stellar_classification\" text,\n \"distance_from_earth_ly\" text,\n \"constellation\" text,\n \"dust_or_debris_temperature_k\" text,\n \"system\" text,\n \"dust_or_debris_location_au\" text,\n \"cool_dust_10_au\" text,\n \"stellar_age_myr\" text\n);\n\nQuestion: Name number of stellar classification for 3 neptune planets < 1 au" }, { "role": "assistant", "content": "SELECT COUNT(\"stellar_classification\") FROM \"sun_like_stars_with_hot_dust_disks\" WHERE \"system\"='3 Neptune planets < 1 AU';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sun_like_stars_with_hot_dust_disks\" (\n \"star\" text,\n \"stellar_classification\" text,\n \"distance_from_earth_ly\" text,\n \"constellation\" text,\n \"dust_or_debris_temperature_k\" text,\n \"system\" text,\n \"dust_or_debris_location_au\" text,\n \"cool_dust_10_au\" text,\n \"stellar_age_myr\" text\n);\n\nQuestion: Name the system for aries" }, { "role": "assistant", "content": "SELECT \"system\" FROM \"sun_like_stars_with_hot_dust_disks\" WHERE \"constellation\"='Aries';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sun_like_stars_with_hot_dust_disks\" (\n \"star\" text,\n \"stellar_classification\" text,\n \"distance_from_earth_ly\" text,\n \"constellation\" text,\n \"dust_or_debris_temperature_k\" text,\n \"system\" text,\n \"dust_or_debris_location_au\" text,\n \"cool_dust_10_au\" text,\n \"stellar_age_myr\" text\n);\n\nQuestion: Name the stellar age for f3v" }, { "role": "assistant", "content": "SELECT \"stellar_age_myr\" FROM \"sun_like_stars_with_hot_dust_disks\" WHERE \"stellar_classification\"='F3V';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sun_like_stars_with_hot_dust_disks\" (\n \"star\" text,\n \"stellar_classification\" text,\n \"distance_from_earth_ly\" text,\n \"constellation\" text,\n \"dust_or_debris_temperature_k\" text,\n \"system\" text,\n \"dust_or_debris_location_au\" text,\n \"cool_dust_10_au\" text,\n \"stellar_age_myr\" text\n);\n\nQuestion: Name the dust for star being hd 69830" }, { "role": "assistant", "content": "SELECT \"dust_or_debris_location_au\" FROM \"sun_like_stars_with_hot_dust_disks\" WHERE \"star\"='HD 69830';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sun_like_stars_with_hot_dust_disks\" (\n \"star\" text,\n \"stellar_classification\" text,\n \"distance_from_earth_ly\" text,\n \"constellation\" text,\n \"dust_or_debris_temperature_k\" text,\n \"system\" text,\n \"dust_or_debris_location_au\" text,\n \"cool_dust_10_au\" text,\n \"stellar_age_myr\" text\n);\n\nQuestion: Name the dust for star being \u03b7 corvi" }, { "role": "assistant", "content": "SELECT \"dust_or_debris_temperature_k\" FROM \"sun_like_stars_with_hot_dust_disks\" WHERE \"star\"='\u03b7 Corvi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22977424_8\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: Name the number of names for exeter chiefs" }, { "role": "assistant", "content": "SELECT COUNT(\"name\") FROM \"table1_22977424_8\" WHERE \"promoted_from_league\"='Exeter Chiefs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22977424_8\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: Name the name for henley manchester" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"table1_22977424_8\" WHERE \"promoted_to_league\"='Henley Manchester';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22977424_8\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: Name the name for doncaster newbury" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"table1_22977424_8\" WHERE \"promoted_to_league\"='Doncaster Newbury';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22977424_8\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: Name the season for rotherham titans" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"table1_22977424_8\" WHERE \"promoted_from_league\"='Rotherham Titans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_22977424_8\" (\n \"season\" text,\n \"name\" text,\n \"teams\" real,\n \"relegated_to_league\" text,\n \"promoted_to_league\" text,\n \"promoted_from_league\" text,\n \"relegated_from_league\" text\n);\n\nQuestion: Name the name for plymouth albion orrell" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"table1_22977424_8\" WHERE \"promoted_to_league\"='Plymouth Albion Orrell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_229917_2\" (\n \"date_dd_mm_yyyy\" text,\n \"tail_number\" text,\n \"location\" text,\n \"fatalities\" text,\n \"brief_description\" text\n);\n\nQuestion: What's the tail number of the airplane involved in the accident described as crashed?" }, { "role": "assistant", "content": "SELECT \"tail_number\" FROM \"table1_229917_2\" WHERE \"brief_description\"='Crashed';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_229917_2\" (\n \"date_dd_mm_yyyy\" text,\n \"tail_number\" text,\n \"location\" text,\n \"fatalities\" text,\n \"brief_description\" text\n);\n\nQuestion: How many different brief descriptions are there for crashes with 0/161 fatalities?" }, { "role": "assistant", "content": "SELECT COUNT(\"brief_description\") FROM \"table1_229917_2\" WHERE \"fatalities\"='0/161';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_229917_2\" (\n \"date_dd_mm_yyyy\" text,\n \"tail_number\" text,\n \"location\" text,\n \"fatalities\" text,\n \"brief_description\" text\n);\n\nQuestion: When did the airplane with tail number RA-85282 crash?" }, { "role": "assistant", "content": "SELECT \"date_dd_mm_yyyy\" FROM \"table1_229917_2\" WHERE \"tail_number\"='RA-85282';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_229917_2\" (\n \"date_dd_mm_yyyy\" text,\n \"tail_number\" text,\n \"location\" text,\n \"fatalities\" text,\n \"brief_description\" text\n);\n\nQuestion: How many fatalities were there in the crash described as ditched 300 m short of runway?" }, { "role": "assistant", "content": "SELECT \"fatalities\" FROM \"table1_229917_2\" WHERE \"brief_description\"='Ditched 300 m short of runway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_229917_2\" (\n \"date_dd_mm_yyyy\" text,\n \"tail_number\" text,\n \"location\" text,\n \"fatalities\" text,\n \"brief_description\" text\n);\n\nQuestion: How many fatalities were there in the crash described as crashed at take-off due to engine failure?" }, { "role": "assistant", "content": "SELECT \"fatalities\" FROM \"table1_229917_2\" WHERE \"brief_description\"='Crashed at take-off due to engine failure';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sycamores_in_professional_leagues_50\" (\n \"player\" text,\n \"class_year\" real,\n \"position\" text,\n \"teams\" text,\n \"career\" text,\n \"highlight_s\" text\n);\n\nQuestion: What class year was Vencie Glenn from? " }, { "role": "assistant", "content": "SELECT MIN(\"class_year\") FROM \"sycamores_in_professional_leagues_50\" WHERE \"player\"='Vencie Glenn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sycamores_in_professional_leagues_50\" (\n \"player\" text,\n \"class_year\" real,\n \"position\" text,\n \"teams\" text,\n \"career\" text,\n \"highlight_s\" text\n);\n\nQuestion: What position did the player whose highlights were 5 career INTs play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"sycamores_in_professional_leagues_50\" WHERE \"highlight_s\"='5 Career INTs';" } ]