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 \"north_germanic\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: How many verbs mean to grow, to produce" }, { "role": "assistant", "content": "SELECT COUNT(\"part_1\") FROM \"north_germanic\" WHERE \"verb_meaning\"='to grow, to produce';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17467578_1\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_airdate\" text,\n \"production_code\" text\n);\n\nQuestion: Who wrote the episode \"The Dream Lover\", which was viewed by 3.96 million viewers?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_17467578_1\" WHERE \"u_s_viewers_million\"='3.96';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17467578_1\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_airdate\" text,\n \"production_code\" text\n);\n\nQuestion: What is the original air date of episode 8? Answer: Dec. 21, 2006" }, { "role": "assistant", "content": "SELECT COUNT(\"original_airdate\") FROM \"table1_17467578_1\" WHERE \"episode_num\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17467578_1\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_airdate\" text,\n \"production_code\" text\n);\n\nQuestion: Who wrote the episode \"The Cold Turkey\", which was viewed by 3.73 million viewers?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_17467578_1\" WHERE \"u_s_viewers_million\"='3.73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17467578_1\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_airdate\" text,\n \"production_code\" text\n);\n\nQuestion: What is the production code of the episode \"The Night Moves\", which was directed by Patrick Norris?" }, { "role": "assistant", "content": "SELECT \"production_code\" FROM \"table1_17467578_1\" WHERE \"directed_by\"='Patrick Norris' AND \"title\"='\\\"The Night Moves\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17467578_1\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_airdate\" text,\n \"production_code\" text\n);\n\nQuestion: Who wrote episode 11?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_17467578_1\" WHERE \"episode_num\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17467578_1\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_airdate\" text,\n \"production_code\" text\n);\n\nQuestion: What was the original airdate of the episode \"The Cold Turkey\", which was viewed by 3.73 million viewers?" }, { "role": "assistant", "content": "SELECT \"original_airdate\" FROM \"table1_17467578_1\" WHERE \"u_s_viewers_million\"='3.73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Name the class for boten" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"german\" WHERE \"part_3\"='boten';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Name the part 3 for treffen" }, { "role": "assistant", "content": "SELECT \"part_3\" FROM \"german\" WHERE \"part_1\"='treffen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Name the part one for to give" }, { "role": "assistant", "content": "SELECT \"part_1\" FROM \"german\" WHERE \"verb_meaning\"='to give';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Name the class for schliefen" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"german\" WHERE \"part_3\"='schliefen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: Name the verb meaning for half drosch" }, { "role": "assistant", "content": "SELECT \"verb_meaning\" FROM \"german\" WHERE \"part_2\"='half drosch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17467447_1\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_airdate\" text,\n \"production_code\" text\n);\n\nQuestion: If the product code is 2t6267, who was the director?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"table1_17467447_1\" WHERE \"production_code\"='2T6267';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17467447_1\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_airdate\" text,\n \"production_code\" text\n);\n\nQuestion: What is the air date when the U.S. viewers was 5.50 million?" }, { "role": "assistant", "content": "SELECT \"original_airdate\" FROM \"table1_17467447_1\" WHERE \"u_s_viewers_million\"='5.50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17467447_1\" (\n \"series_num\" real,\n \"episode_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"u_s_viewers_million\" text,\n \"original_airdate\" text,\n \"production_code\" text\n);\n\nQuestion: Who were the writers for production code 2t6268?" }, { "role": "assistant", "content": "SELECT \"written_by\" FROM \"table1_17467447_1\" WHERE \"production_code\"='2T6268';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1748444_1\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date_built\" text,\n \"heritage\" text,\n \"disposition\" text,\n \"notes\" text\n);\n\nQuestion: Name the number of builders for number 96" }, { "role": "assistant", "content": "SELECT COUNT(\"builder\") FROM \"table1_1748444_1\" WHERE \"number\"='96';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1748444_1\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date_built\" text,\n \"heritage\" text,\n \"disposition\" text,\n \"notes\" text\n);\n\nQuestion: Name the builder for date built is january 1910" }, { "role": "assistant", "content": "SELECT \"builder\" FROM \"table1_1748444_1\" WHERE \"date_built\"='January 1910';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_1748444_1\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date_built\" text,\n \"heritage\" text,\n \"disposition\" text,\n \"notes\" text\n);\n\nQuestion: Name the disposition for date built is march 1909" }, { "role": "assistant", "content": "SELECT \"disposition\" FROM \"table1_1748444_1\" WHERE \"date_built\"='March 1909';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17482534_1\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What is the title of episode number 96 in the series?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_17482534_1\" WHERE \"no_in_series\"='96';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17482534_1\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What number in season is the episode directed by Gene Stupnitsky?" }, { "role": "assistant", "content": "SELECT \"no_in_season\" FROM \"table1_17482534_1\" WHERE \"directed_by\"='Gene Stupnitsky';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17482534_1\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many viewers did the episode written by Warren Lieberstein & Halsted Sullivan have?" }, { "role": "assistant", "content": "SELECT \"u_s_viewers_millions\" FROM \"table1_17482534_1\" WHERE \"written_by\"='Warren Lieberstein & Halsted Sullivan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17482534_1\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: How many writers are listed for the episode with a production code of 5008?" }, { "role": "assistant", "content": "SELECT COUNT(\"written_by\") FROM \"table1_17482534_1\" WHERE \"production_code\"='5008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17482534_1\" (\n \"no_in_series\" text,\n \"no_in_season\" text,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text,\n \"u_s_viewers_millions\" text\n);\n\nQuestion: What number in the series are the episodes with production code 5016/5017?" }, { "role": "assistant", "content": "SELECT \"no_in_series\" FROM \"table1_17482534_1\" WHERE \"production_code\"='5016/5017';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sbn_mom_s_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: How many locations have the call signs dxjp-fm? " }, { "role": "assistant", "content": "SELECT COUNT(\"location\") FROM \"sbn_mom_s_radio_stations\" WHERE \"callsign\"='DXJP-FM';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sbn_mom_s_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the call sign of the station with the frequency of 90.3mhz" }, { "role": "assistant", "content": "SELECT \"callsign\" FROM \"sbn_mom_s_radio_stations\" WHERE \"frequency\"='90.3MHz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sbn_mom_s_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the call sign for the station that uses the branding, mom's radio 101.5 tacloban?" }, { "role": "assistant", "content": "SELECT \"callsign\" FROM \"sbn_mom_s_radio_stations\" WHERE \"branding\"='Mom''s Radio 101.5 Tacloban';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sbn_mom_s_radio_stations\" (\n \"branding\" text,\n \"callsign\" text,\n \"frequency\" text,\n \"power_k_w\" text,\n \"location\" text\n);\n\nQuestion: What is the branding for stations located in Cebu? " }, { "role": "assistant", "content": "SELECT \"branding\" FROM \"sbn_mom_s_radio_stations\" WHERE \"location\"='Cebu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17480471_3\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text\n);\n\nQuestion: Which eagle riders whose ova (harmony gold dub) is dr. kozaburo nambu?" }, { "role": "assistant", "content": "SELECT \"eagle_riders\" FROM \"table1_17480471_3\" WHERE \"ova_harmony_gold_dub\"='Dr. Kozaburo Nambu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17480471_3\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text\n);\n\nQuestion: Which battle of the planets where ova (harmony gold dub) is solaris?" }, { "role": "assistant", "content": "SELECT \"battle_of_the_planets\" FROM \"table1_17480471_3\" WHERE \"ova_harmony_gold_dub\"='Solaris';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17480471_3\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text\n);\n\nQuestion: Which eagle riders have battle of the planets as zoltar?" }, { "role": "assistant", "content": "SELECT \"eagle_riders\" FROM \"table1_17480471_3\" WHERE \"battle_of_the_planets\"='Zoltar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17480471_3\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text\n);\n\nQuestion: Which gatchaman has eagle riders as lukan?" }, { "role": "assistant", "content": "SELECT \"gatchaman\" FROM \"table1_17480471_3\" WHERE \"eagle_riders\"='Lukan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17480471_3\" (\n \"gatchaman\" text,\n \"battle_of_the_planets\" text,\n \"g_force\" text,\n \"eagle_riders\" text,\n \"ova_harmony_gold_dub\" text\n);\n\nQuestion: What eagle riders where ova (harmony gold dub) is lord zortek?" }, { "role": "assistant", "content": "SELECT \"eagle_riders\" FROM \"table1_17480471_3\" WHERE \"ova_harmony_gold_dub\"='Lord Zortek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: What pregame host was on espn and had taylor twellman color commentating?" }, { "role": "assistant", "content": "SELECT \"pregame_host\" FROM \"2010s\" WHERE \"network\"='ESPN' AND \"color_commentator\"='Taylor Twellman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: What pregame analyst(s) had rob stone and monica gonzalez as sideline reporters and were on tsn2?" }, { "role": "assistant", "content": "SELECT \"pregame_analysts\" FROM \"2010s\" WHERE \"sideline_reporters\"='Rob Stone and Monica Gonzalez' AND \"network\"='TSN2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: What color commentator(s) were in 2010?" }, { "role": "assistant", "content": "SELECT \"color_commentator\" FROM \"2010s\" WHERE \"year\"=2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: What is the last year that had sideline reporters rob stone and monica gonzalez?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"2010s\" WHERE \"sideline_reporters\"='Rob Stone and Monica Gonzalez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"color_commentator\" text,\n \"sideline_reporters\" text,\n \"pregame_host\" text,\n \"pregame_analysts\" text\n);\n\nQuestion: Who had the play-by-play on espn with sideline reporter monica gonzalez?" }, { "role": "assistant", "content": "SELECT \"play_by_play\" FROM \"2010s\" WHERE \"network\"='ESPN' AND \"sideline_reporters\"='Monica Gonzalez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"course\" (\n \"number\" real,\n \"name\" text,\n \"kilometer\" real,\n \"location\" text,\n \"length_in_m\" real,\n \"average_climb_pct\" real\n);\n\nQuestion: What was the name of race #28?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"course\" WHERE \"number\"=28;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"course\" (\n \"number\" real,\n \"name\" text,\n \"kilometer\" real,\n \"location\" text,\n \"length_in_m\" real,\n \"average_climb_pct\" real\n);\n\nQuestion: The Eyserweg race was which race #?" }, { "role": "assistant", "content": "SELECT MAX(\"number\") FROM \"course\" WHERE \"name\"='Eyserweg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"course\" (\n \"number\" real,\n \"name\" text,\n \"kilometer\" real,\n \"location\" text,\n \"length_in_m\" real,\n \"average_climb_pct\" real\n);\n\nQuestion: Which race had an average climb of 40%?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"course\" WHERE \"average_climb_pct\"=40;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"course\" (\n \"number\" real,\n \"name\" text,\n \"kilometer\" real,\n \"location\" text,\n \"length_in_m\" real,\n \"average_climb_pct\" real\n);\n\nQuestion: The Keutenberg race had what race length?" }, { "role": "assistant", "content": "SELECT MAX(\"length_in_m\") FROM \"course\" WHERE \"name\"='Keutenberg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_assister\" (\n \"p\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"copa_del_rey\" real,\n \"champions_league\" real,\n \"total\" real\n);\n\nQuestion: In the Champions league, what is the Minimum" }, { "role": "assistant", "content": "SELECT MIN(\"champions_league\") FROM \"top_assister\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_assister\" (\n \"p\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"copa_del_rey\" real,\n \"champions_league\" real,\n \"total\" real\n);\n\nQuestion: In the Champions league is the forward position smaller than 6.0" }, { "role": "assistant", "content": "SELECT COUNT(\"champions_league\") FROM \"top_assister\" WHERE \"position\"='Forward' AND \"league\"<6.0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_assister\" (\n \"p\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"copa_del_rey\" real,\n \"champions_league\" real,\n \"total\" real\n);\n\nQuestion: when the total is 8 and copa del rey is 0 what is the minimum league" }, { "role": "assistant", "content": "SELECT MIN(\"league\") FROM \"top_assister\" WHERE \"total\"=8 AND \"copa_del_rey\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_assister\" (\n \"p\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"copa_del_rey\" real,\n \"champions_league\" real,\n \"total\" real\n);\n\nQuestion: when the position is forward and the league is 5 what number is the Champion league" }, { "role": "assistant", "content": "SELECT COUNT(\"champions_league\") FROM \"top_assister\" WHERE \"league\"=5 AND \"position\"='Forward';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_assister\" (\n \"p\" real,\n \"player\" text,\n \"position\" text,\n \"league\" real,\n \"copa_del_rey\" real,\n \"champions_league\" real,\n \"total\" real\n);\n\nQuestion: if p is bigger than 4.0 what is total number" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"top_assister\" WHERE \"p\">4.0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text,\n \"independent_green\" text,\n \"libertarian\" text,\n \"other_party\" text\n);\n\nQuestion: What was the 2008 election status when glenn nye was the running democrat?" }, { "role": "assistant", "content": "SELECT \"2008_status\" FROM \"match_up_summary\" WHERE \"democratic\"='Glenn Nye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text,\n \"independent_green\" text,\n \"libertarian\" text,\n \"other_party\" text\n);\n\nQuestion: Who was the republican candidate in the race with incumbent thelma drake?" }, { "role": "assistant", "content": "SELECT \"republican\" FROM \"match_up_summary\" WHERE \"incumbent\"='Thelma Drake';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text,\n \"independent_green\" text,\n \"libertarian\" text,\n \"other_party\" text\n);\n\nQuestion: How many districts had republican Bob Goodlatte as a candidate?" }, { "role": "assistant", "content": "SELECT COUNT(\"district\") FROM \"match_up_summary\" WHERE \"republican\"='Bob Goodlatte';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"match_up_summary\" (\n \"district\" real,\n \"incumbent\" text,\n \"2008_status\" text,\n \"democratic\" text,\n \"republican\" text,\n \"independent_green\" text,\n \"libertarian\" text,\n \"other_party\" text\n);\n\nQuestion: Who was the democratic candidate when the republican was frank wolf?" }, { "role": "assistant", "content": "SELECT \"democratic\" FROM \"match_up_summary\" WHERE \"republican\"='Frank Wolf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: How many won when points against is 410?" }, { "role": "assistant", "content": "SELECT COUNT(\"won\") FROM \"league_table\" WHERE \"points_against\"='410';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: How many bonus points are there when points for is 385?" }, { "role": "assistant", "content": "SELECT \"bonus_points\" FROM \"league_table\" WHERE \"points_for\"='385';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: How many clubs have 62 points?" }, { "role": "assistant", "content": "SELECT COUNT(\"club\") FROM \"league_table\" WHERE \"points\"='62';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: How many bonus points were won by 5?" }, { "role": "assistant", "content": "SELECT \"bonus_points\" FROM \"league_table\" WHERE \"won\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: How many have been played for 362 points?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"league_table\" WHERE \"points_for\"='362';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"won\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: How many points against have a lose of 13?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"league_table\" WHERE \"lost\"='13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calculations\" (\n \"level\" real,\n \"shuttles\" real,\n \"cumulative_shuttles\" real,\n \"speed_km_h\" text,\n \"shuttle_time_seconds\" text,\n \"total_level_time_s\" text,\n \"distance_m\" real,\n \"cumulative_distance_m\" real,\n \"cumulative_time_min_and_seconds\" text\n);\n\nQuestion: What is the highest possible level?" }, { "role": "assistant", "content": "SELECT MAX(\"level\") FROM \"calculations\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calculations\" (\n \"level\" real,\n \"shuttles\" real,\n \"cumulative_shuttles\" real,\n \"speed_km_h\" text,\n \"shuttle_time_seconds\" text,\n \"total_level_time_s\" text,\n \"distance_m\" real,\n \"cumulative_distance_m\" real,\n \"cumulative_time_min_and_seconds\" text\n);\n\nQuestion: What is the shuttle time for the level where the speed is 15.5 km/h?" }, { "role": "assistant", "content": "SELECT \"shuttle_time_seconds\" FROM \"calculations\" WHERE \"speed_km_h\"='15.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calculations\" (\n \"level\" real,\n \"shuttles\" real,\n \"cumulative_shuttles\" real,\n \"speed_km_h\" text,\n \"shuttle_time_seconds\" text,\n \"total_level_time_s\" text,\n \"distance_m\" real,\n \"cumulative_distance_m\" real,\n \"cumulative_time_min_and_seconds\" text\n);\n\nQuestion: What is the fewest number of shuttles where the shuttle time is 6.55 seconds?" }, { "role": "assistant", "content": "SELECT MIN(\"shuttles\") FROM \"calculations\" WHERE \"shuttle_time_seconds\"='6.55';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calculations\" (\n \"level\" real,\n \"shuttles\" real,\n \"cumulative_shuttles\" real,\n \"speed_km_h\" text,\n \"shuttle_time_seconds\" text,\n \"total_level_time_s\" text,\n \"distance_m\" real,\n \"cumulative_distance_m\" real,\n \"cumulative_time_min_and_seconds\" text\n);\n\nQuestion: What is the distance (in meters) when the shuttle time is 6.86 seconds?" }, { "role": "assistant", "content": "SELECT MIN(\"distance_m\") FROM \"calculations\" WHERE \"shuttle_time_seconds\"='6.86';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_john_lynch\" text,\n \"republican_joe_kenney\" text,\n \"lead_margin\" real\n);\n\nQuestion: Name the number of lead margin for republican joe kenney being 31%" }, { "role": "assistant", "content": "SELECT COUNT(\"lead_margin\") FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"republican_joe_kenney\"='31%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_john_lynch\" text,\n \"republican_joe_kenney\" text,\n \"lead_margin\" real\n);\n\nQuestion: Namethe democrat john lynch for joe kenney being 27%" }, { "role": "assistant", "content": "SELECT \"democrat_john_lynch\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"republican_joe_kenney\"='27%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_john_lynch\" text,\n \"republican_joe_kenney\" text,\n \"lead_margin\" real\n);\n\nQuestion: Name the poll source for republican joe kenney being 28%" }, { "role": "assistant", "content": "SELECT \"poll_source\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"republican_joe_kenney\"='28%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_john_lynch\" text,\n \"republican_joe_kenney\" text,\n \"lead_margin\" real\n);\n\nQuestion: Name the lead margin for democrat john lynch being 62%" }, { "role": "assistant", "content": "SELECT \"lead_margin\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"democrat_john_lynch\"='62%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_john_lynch\" text,\n \"republican_joe_kenney\" text,\n \"lead_margin\" real\n);\n\nQuestion: Name the most lead margin for republican joe kenney being 23%" }, { "role": "assistant", "content": "SELECT MAX(\"lead_margin\") FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"republican_joe_kenney\"='23%';" } ]
[ { "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\" text,\n \"miss_united_continent\" real,\n \"virreina\" real,\n \"1st_ru\" real,\n \"2nd_ru\" real,\n \"3rd_ru\" real,\n \"4th_ru\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: How many 3rd ru does Costa Rica have? " }, { "role": "assistant", "content": "SELECT MAX(\"3rd_ru\") FROM \"by_country_tally\" WHERE \"country\"='Costa Rica';" } ]
[ { "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\" text,\n \"miss_united_continent\" real,\n \"virreina\" real,\n \"1st_ru\" real,\n \"2nd_ru\" real,\n \"3rd_ru\" real,\n \"4th_ru\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: How many 3rd ru does Canada have? " }, { "role": "assistant", "content": "SELECT COUNT(\"3rd_ru\") FROM \"by_country_tally\" WHERE \"country\"='Canada';" } ]
[ { "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\" text,\n \"miss_united_continent\" real,\n \"virreina\" real,\n \"1st_ru\" real,\n \"2nd_ru\" real,\n \"3rd_ru\" real,\n \"4th_ru\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: What is the least number of miss united continents? " }, { "role": "assistant", "content": "SELECT MIN(\"miss_united_continent\") 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 \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_jay_nixon\" text,\n \"republican_kenny_hulshof\" text,\n \"lead_margin\" text\n);\n\nQuestion: Who's the poll source that claimed the Lead Margin was 17 and the Democrat: Jay Nixon had 54% of the votes?" }, { "role": "assistant", "content": "SELECT \"poll_source\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"democrat_jay_nixon\"='54%' AND \"lead_margin\"='17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_jay_nixon\" text,\n \"republican_kenny_hulshof\" text,\n \"lead_margin\" text\n);\n\nQuestion: What poll source claimed that Republican: Kenny Hulshof had 43%?" }, { "role": "assistant", "content": "SELECT \"poll_source\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"republican_kenny_hulshof\"='43%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_jay_nixon\" text,\n \"republican_kenny_hulshof\" text,\n \"lead_margin\" text\n);\n\nQuestion: How many different lead margins were stated in the poll administered on September 11, 2008?" }, { "role": "assistant", "content": "SELECT COUNT(\"lead_margin\") FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"dates_administered\"='September 11, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_jay_nixon\" text,\n \"republican_kenny_hulshof\" text,\n \"lead_margin\" text\n);\n\nQuestion: What percentage was claimed that Republican: Kenny Hulshof got in the poll that also claimed Democrat: Jay Nixon got 48%?" }, { "role": "assistant", "content": "SELECT \"republican_kenny_hulshof\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"democrat_jay_nixon\"='48%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"description\" (\n \"scientific_name\" text,\n \"common_name\" text,\n \"length_male\" text,\n \"length_female\" text,\n \"color\" text,\n \"lifespan_years\" text\n);\n\nQuestion: Name the common name for rhampholeon spectrum " }, { "role": "assistant", "content": "SELECT \"common_name\" FROM \"description\" WHERE \"scientific_name\"='Rhampholeon spectrum';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"description\" (\n \"scientific_name\" text,\n \"common_name\" text,\n \"length_male\" text,\n \"length_female\" text,\n \"color\" text,\n \"lifespan_years\" text\n);\n\nQuestion: Name the scientific name for veiled chameleon" }, { "role": "assistant", "content": "SELECT \"scientific_name\" FROM \"description\" WHERE \"common_name\"='Veiled chameleon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"description\" (\n \"scientific_name\" text,\n \"common_name\" text,\n \"length_male\" text,\n \"length_female\" text,\n \"color\" text,\n \"lifespan_years\" text\n);\n\nQuestion: Name the common name for furcifer pardalis" }, { "role": "assistant", "content": "SELECT \"common_name\" FROM \"description\" WHERE \"scientific_name\"='Furcifer pardalis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"description\" (\n \"scientific_name\" text,\n \"common_name\" text,\n \"length_male\" text,\n \"length_female\" text,\n \"color\" text,\n \"lifespan_years\" text\n);\n\nQuestion: Name the number of color for furcifer pardalis" }, { "role": "assistant", "content": "SELECT COUNT(\"color\") FROM \"description\" WHERE \"scientific_name\"='Furcifer pardalis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaded_unloaded_freight_and_mail_tons_tu\" (\n \"year\" real,\n \"domestic_freight\" real,\n \"domestic_mail\" real,\n \"international_freight\" real,\n \"international_mail\" real,\n \"total_freight_and_mail\" real,\n \"change\" text\n);\n\nQuestion: Name the number of international frieghts for domestic mail of 260" }, { "role": "assistant", "content": "SELECT COUNT(\"international_freight\") FROM \"loaded_unloaded_freight_and_mail_tons_tu\" WHERE \"domestic_mail\"=260;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaded_unloaded_freight_and_mail_tons_tu\" (\n \"year\" real,\n \"domestic_freight\" real,\n \"domestic_mail\" real,\n \"international_freight\" real,\n \"international_mail\" real,\n \"total_freight_and_mail\" real,\n \"change\" text\n);\n\nQuestion: Name the total number of domestic mail for 7853 for total frieght and mail" }, { "role": "assistant", "content": "SELECT COUNT(\"domestic_mail\") FROM \"loaded_unloaded_freight_and_mail_tons_tu\" WHERE \"total_freight_and_mail\"=7853;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaded_unloaded_freight_and_mail_tons_tu\" (\n \"year\" real,\n \"domestic_freight\" real,\n \"domestic_mail\" real,\n \"international_freight\" real,\n \"international_mail\" real,\n \"total_freight_and_mail\" real,\n \"change\" text\n);\n\nQuestion: Namw the total number for domestic freight for international mail is larger than 1.0 with domestic mail for 260" }, { "role": "assistant", "content": "SELECT COUNT(\"domestic_freight\") FROM \"loaded_unloaded_freight_and_mail_tons_tu\" WHERE \"international_mail\">1.0 AND \"domestic_mail\"=260;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"kerrypct\" text,\n \"kerrynum\" real,\n \"bushpct\" text,\n \"bushnum\" real,\n \"otherspct\" text,\n \"othersnum\" real,\n \"2000_result\" text\n);\n\nQuestion: What was the highest vote for others?" }, { "role": "assistant", "content": "SELECT MAX(\"othersnum\") FROM \"by_county\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"kerrypct\" text,\n \"kerrynum\" real,\n \"bushpct\" text,\n \"bushnum\" real,\n \"otherspct\" text,\n \"othersnum\" real,\n \"2000_result\" text\n);\n\nQuestion: When the result was +2.5, what were the kerry%?" }, { "role": "assistant", "content": "SELECT \"kerrypct\" FROM \"by_county\" WHERE \"2000_result\"='+2.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"kerrypct\" text,\n \"kerrynum\" real,\n \"bushpct\" text,\n \"bushnum\" real,\n \"otherspct\" text,\n \"othersnum\" real,\n \"2000_result\" text\n);\n\nQuestion: When Kerry# was 199060, what was the percentage?" }, { "role": "assistant", "content": "SELECT \"kerrypct\" FROM \"by_county\" WHERE \"kerrynum\"=199060;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"kerrypct\" text,\n \"kerrynum\" real,\n \"bushpct\" text,\n \"bushnum\" real,\n \"otherspct\" text,\n \"othersnum\" real,\n \"2000_result\" text\n);\n\nQuestion: What was the highest vote number for Bush?" }, { "role": "assistant", "content": "SELECT MAX(\"bushnum\") FROM \"by_county\";" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"kerrypct\" text,\n \"kerrynum\" real,\n \"bushpct\" text,\n \"bushnum\" real,\n \"otherspct\" text,\n \"othersnum\" real,\n \"2000_result\" text\n);\n\nQuestion: When the 200 result was +1.6, what was the percentage?" }, { "role": "assistant", "content": "SELECT \"kerrypct\" FROM \"by_county\" WHERE \"2000_result\"='+1.6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"n\" real,\n \"p\" text,\n \"name\" text,\n \"eu\" text,\n \"country\" text,\n \"age\" real,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: How many transfer windows coming from Crystal Palace?" }, { "role": "assistant", "content": "SELECT COUNT(\"transfer_window\") FROM \"in\" WHERE \"moving_from\"='Crystal Palace';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"n\" real,\n \"p\" text,\n \"name\" text,\n \"eu\" text,\n \"country\" text,\n \"age\" real,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What country has a P of GK?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"in\" WHERE \"p\"='GK';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"in\" (\n \"n\" real,\n \"p\" text,\n \"name\" text,\n \"eu\" text,\n \"country\" text,\n \"age\" real,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"source\" text\n);\n\nQuestion: What is the P for the player moving from Everton?" }, { "role": "assistant", "content": "SELECT \"p\" FROM \"in\" WHERE \"moving_from\"='Everton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17594659_1\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"opposition\" text,\n \"first_leg\" text,\n \"second_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: Name the competition of panathinaikos" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"table1_17594659_1\" WHERE \"opposition\"='Panathinaikos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_television_ratings\" (\n \"season\" text,\n \"timeslot\" text,\n \"premiere\" text,\n \"finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What is every value for viewers for ranking #51 for the Tuesday 9:00 p.m. timeslot?" }, { "role": "assistant", "content": "SELECT \"viewers_in_millions\" FROM \"u_s_television_ratings\" WHERE \"ranking\"='#51' AND \"timeslot\"='Tuesday 9:00 p.m.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_television_ratings\" (\n \"season\" text,\n \"timeslot\" text,\n \"premiere\" text,\n \"finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What finales took place in the Tuesday 9:30 p.m. timeslot?" }, { "role": "assistant", "content": "SELECT \"finale\" FROM \"u_s_television_ratings\" WHERE \"timeslot\"='Tuesday 9:30 p.m.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_television_ratings\" (\n \"season\" text,\n \"timeslot\" text,\n \"premiere\" text,\n \"finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What premieres had a finale on May 25, 2004?" }, { "role": "assistant", "content": "SELECT \"premiere\" FROM \"u_s_television_ratings\" WHERE \"finale\"='May 25, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_television_ratings\" (\n \"season\" text,\n \"timeslot\" text,\n \"premiere\" text,\n \"finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What seasons had a finale on May 25, 2004?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"u_s_television_ratings\" WHERE \"finale\"='May 25, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_television_ratings\" (\n \"season\" text,\n \"timeslot\" text,\n \"premiere\" text,\n \"finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What seasons had a ranking of #47?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"u_s_television_ratings\" WHERE \"ranking\"='#47';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"u_s_television_ratings\" (\n \"season\" text,\n \"timeslot\" text,\n \"premiere\" text,\n \"finale\" text,\n \"tv_season\" text,\n \"ranking\" text,\n \"viewers_in_millions\" text\n);\n\nQuestion: What are all values for viewers for 1st season?" }, { "role": "assistant", "content": "SELECT \"viewers_in_millions\" FROM \"u_s_television_ratings\" WHERE \"season\"='1st';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l_class_locomotive_fleet_summary\" (\n \"secr_no\" real,\n \"sr_no\" real,\n \"br_no\" real,\n \"builder\" text,\n \"date_delivered\" text,\n \"date_withdrawn\" text\n);\n\nQuestion: What is the withdraw date for secr no. 771?" }, { "role": "assistant", "content": "SELECT \"date_withdrawn\" FROM \"l_class_locomotive_fleet_summary\" WHERE \"secr_no\"=771;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"l_class_locomotive_fleet_summary\" (\n \"secr_no\" real,\n \"sr_no\" real,\n \"br_no\" real,\n \"builder\" text,\n \"date_delivered\" text,\n \"date_withdrawn\" text\n);\n\nQuestion: Who is the builder for br no. 31779?" }, { "role": "assistant", "content": "SELECT \"builder\" FROM \"l_class_locomotive_fleet_summary\" WHERE \"br_no\"=31779;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loans_in\" (\n \"no\" real,\n \"p\" text,\n \"name\" text,\n \"country\" text,\n \"age\" real,\n \"loan_club\" text,\n \"started\" text,\n \"ended\" text,\n \"start_source\" text,\n \"end_source\" text\n);\n\nQuestion: what ist he country where the loan club is fulham?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"loans_in\" WHERE \"loan_club\"='Fulham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loans_in\" (\n \"no\" real,\n \"p\" text,\n \"name\" text,\n \"country\" text,\n \"age\" real,\n \"loan_club\" text,\n \"started\" text,\n \"ended\" text,\n \"start_source\" text,\n \"end_source\" text\n);\n\nQuestion: what ist he total number of ages where the start date is 6 november?" }, { "role": "assistant", "content": "SELECT COUNT(\"age\") FROM \"loans_in\" WHERE \"started\"='6 November';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17624965_1\" (\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 \"production_code\" real\n);\n\nQuestion: What was the name of eipsode 618?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"table1_17624965_1\" WHERE \"production_code\"=618;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table1_17624965_1\" (\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 \"production_code\" real\n);\n\nQuestion: When did \"secrets\" air?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"table1_17624965_1\" WHERE \"title\"='\\\"Secrets\\\"';" } ]