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 \"election\" (\n \"event\" text,\n \"date\" text,\n \"dp_da\" real,\n \"np_nnp\" text,\n \"cope\" text,\n \"acdp\" real,\n \"others\" real\n);\n\nQuestion: Name the NP/NNP for ACDP of 1 and others of 1 and DP/DA of 5" }, { "role": "assistant", "content": "SELECT \"np_nnp\" FROM \"election\" WHERE \"acdp\"=1 AND \"others\"=1 AND \"dp_da\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which player won less than $335?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"money\"<335;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What was the place ranking for the player from Australia?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"country\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: How much money did the player Ed Oliver win?" }, { "role": "assistant", "content": "SELECT SUM(\"money\") FROM \"final_leaderboard\" WHERE \"player\"='ed oliver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"runner_ups_10_62\" (\n \"year\" real,\n \"opponent\" text,\n \"competition\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: What competition did Parramatta Eels join after 1982?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"runner_ups_10_62\" WHERE \"year\">1982 AND \"opponent\"='parramatta eels';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"runner_ups_10_62\" (\n \"year\" real,\n \"opponent\" text,\n \"competition\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: When did nswrfl has a score of 8-21?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"runner_ups_10_62\" WHERE \"competition\"='nswrfl' AND \"score\"='8-21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"runner_ups_10_62\" (\n \"year\" real,\n \"opponent\" text,\n \"competition\" text,\n \"score\" text,\n \"venue\" text,\n \"attendance\" real\n);\n\nQuestion: How many years have less than 28,505 attendance?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"runner_ups_10_62\" WHERE \"attendance\"<'28,505';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What Date is listed for the Region of France and Catalog of 82876-70291-2?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"region\"='france' AND \"catalog\"='82876-70291-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: Which Format is listed that has a Region of China?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"region\"='china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog\" text\n);\n\nQuestion: What's the Date for the Label of Bertelsmann Music group and has a Region of Europe?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"label\"='bertelsmann music group' AND \"region\"='europe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: How many people attended the Royals game with a score of 17 - 6?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"opponent\"='royals' AND \"score\"='17 - 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the result of April 27's game?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='april 27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"design_details\" (\n \"308_winchester_cartridge_type\" text,\n \"100_m_group_mm\" text,\n \"100_m_group_moa\" text,\n \"300_m_group_mm\" text,\n \"300_m_group_moa\" text\n);\n\nQuestion: Which of the .308 Winchester cartridge type has a 100 m group of 14 and also a 300 m group of 0.63?" }, { "role": "assistant", "content": "SELECT \"308_winchester_cartridge_type\" FROM \"design_details\" WHERE \"100_m_group_mm\"='14' AND \"300_m_group_moa\"='0.63';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"licensed_titles\" (\n \"title\" text,\n \"year\" real,\n \"developer\" text,\n \"publisher\" text,\n \"players_per_console\" text,\n \"genre\" text\n);\n\nQuestion: For the strategy game in 1992, how many players were allowed per console?" }, { "role": "assistant", "content": "SELECT \"players_per_console\" FROM \"licensed_titles\" WHERE \"genre\"='strategy' AND \"year\"=1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"licensed_titles\" (\n \"title\" text,\n \"year\" real,\n \"developer\" text,\n \"publisher\" text,\n \"players_per_console\" text,\n \"genre\" text\n);\n\nQuestion: Which Genre was published by Atari and developed by NuFX in 1991?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"licensed_titles\" WHERE \"publisher\"='atari' AND \"year\"=1991 AND \"developer\"='nufx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"licensed_titles\" (\n \"title\" text,\n \"year\" real,\n \"developer\" text,\n \"publisher\" text,\n \"players_per_console\" text,\n \"genre\" text\n);\n\nQuestion: Which year was the game developed by Music Comp in?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"licensed_titles\" WHERE \"developer\"='music comp';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Name the record for august 31" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='august 31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Name the opponent for august 6" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='august 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Name the opponent with record of 52-58" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='52-58';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"belfast_and_northern_counties_railway_18\" (\n \"class\" text,\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"manufacturer\" text,\n \"date_made\" text,\n \"date_withdrawn\" text\n);\n\nQuestion: What Class has a Quantity made of 5?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"belfast_and_northern_counties_railway_18\" WHERE \"quantity_made\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"belfast_and_northern_counties_railway_18\" (\n \"class\" text,\n \"type\" text,\n \"fleet_numbers\" text,\n \"quantity_made\" real,\n \"manufacturer\" text,\n \"date_made\" text,\n \"date_withdrawn\" text\n);\n\nQuestion: What is listed as the Date made with a Quantity made of 13?" }, { "role": "assistant", "content": "SELECT \"date_made\" FROM \"belfast_and_northern_counties_railway_18\" WHERE \"quantity_made\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What year shows 4 points?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"complete_formula_one_results\" WHERE \"points\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the most points when the entrant was Jaguar racing earlier than 2001?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"complete_formula_one_results\" WHERE \"entrant\"='jaguar racing' AND \"year\"<2001;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the entrant in 1999?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"complete_formula_one_results\" WHERE \"year\"=1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the most points when the chassis was Jaguar R3 later than 2002?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='jaguar r3' AND \"year\">2002;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"skin_depth_at_24_k_hz\" (\n \"material\" text,\n \"resistivity_10_6_ohm_inches\" real,\n \"relative_permeability\" real,\n \"skin_depth_inches\" real,\n \"surface_resistance_relative_to_copper\" real\n);\n\nQuestion: What is the lowest relative permeability with a skin depth larger than 0.112 inches?" }, { "role": "assistant", "content": "SELECT MIN(\"relative_permeability\") FROM \"skin_depth_at_24_k_hz\" WHERE \"skin_depth_inches\">0.112;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"skin_depth_at_24_k_hz\" (\n \"material\" text,\n \"resistivity_10_6_ohm_inches\" real,\n \"relative_permeability\" real,\n \"skin_depth_inches\" real,\n \"surface_resistance_relative_to_copper\" real\n);\n\nQuestion: What is the average relative permeability with a resistivity smaller than 1.12 and a surface resistance relative to copper smaller than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"relative_permeability\") FROM \"skin_depth_at_24_k_hz\" WHERE \"resistivity_10_6_ohm_inches\"<1.12 AND \"surface_resistance_relative_to_copper\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"skin_depth_at_24_k_hz\" (\n \"material\" text,\n \"resistivity_10_6_ohm_inches\" real,\n \"relative_permeability\" real,\n \"skin_depth_inches\" real,\n \"surface_resistance_relative_to_copper\" real\n);\n\nQuestion: What is the sum of skin depth with a resistivity of 1.12 and a relative permeability larger than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"skin_depth_inches\") FROM \"skin_depth_at_24_k_hz\" WHERE \"resistivity_10_6_ohm_inches\"=1.12 AND \"relative_permeability\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: How much does Jonathan Bender weigh?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"contestants\" WHERE \"player\"='jonathan bender';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: Of those with a height of 7-0, who weighs the most?" }, { "role": "assistant", "content": "SELECT MAX(\"weight\") FROM \"contestants\" WHERE \"height\"='7-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What does DeShawn Stevenson weigh?" }, { "role": "assistant", "content": "SELECT SUM(\"weight\") FROM \"contestants\" WHERE \"player\"='deshawn stevenson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timaru_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Name the highest roll for coed and authority of state integrated with sacred heart school" }, { "role": "assistant", "content": "SELECT MAX(\"roll\") FROM \"timaru_district\" WHERE \"gender\"='coed' AND \"authority\"='state integrated' AND \"name\"='sacred heart school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"models\" (\n \"engine_code\" text,\n \"displacement\" text,\n \"power_torque_rpm\" text,\n \"redline_rpm\" real,\n \"year\" real\n);\n\nQuestion: What is the displacement of the engine that has a Redline rpm higher than 4750, from 2005?" }, { "role": "assistant", "content": "SELECT \"displacement\" FROM \"models\" WHERE \"redline_rpm\">4750 AND \"year\"=2005;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"models\" (\n \"engine_code\" text,\n \"displacement\" text,\n \"power_torque_rpm\" text,\n \"redline_rpm\" real,\n \"year\" real\n);\n\nQuestion: From what year is the engine with engine code M57D30?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"models\" WHERE \"engine_code\"='m57d30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"models\" (\n \"engine_code\" text,\n \"displacement\" text,\n \"power_torque_rpm\" text,\n \"redline_rpm\" real,\n \"year\" real\n);\n\nQuestion: What is the average Redline RPM of engines with engine code M57TUD30, made after 2002?" }, { "role": "assistant", "content": "SELECT AVG(\"redline_rpm\") FROM \"models\" WHERE \"engine_code\"='m57tud30' AND \"year\">2002;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result against Beijing Hyundai?" }, { "role": "assistant", "content": "SELECT \"result_f_a\" FROM \"pre_season_and_friendlies\" WHERE \"opponents\"='beijing hyundai';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: Was the game with Kashima antlers at home or away?" }, { "role": "assistant", "content": "SELECT \"h_a\" FROM \"pre_season_and_friendlies\" WHERE \"opponents\"='kashima antlers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What date was the game against Royal Antwerp?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"pre_season_and_friendlies\" WHERE \"opponents\"='royal antwerp';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What Records Time is 3:38?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"time\"='3:38';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"country\" text,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real\n);\n\nQuestion: What Country has a number smaller than 56 in 2005 and of 14 in 2006?" }, { "role": "assistant", "content": "SELECT COUNT(\"2004\") FROM \"list\" WHERE \"2005\"<56 AND \"2006\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"country\" text,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real\n);\n\nQuestion: What Country has a number smaller than 3 in 2004 and larger than 1 in 2005?" }, { "role": "assistant", "content": "SELECT COUNT(\"2006\") FROM \"list\" WHERE \"2004\"<3 AND \"2005\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: The building with 48 floors has an address in Las Vegas of what?" }, { "role": "assistant", "content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"=48;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: The Palazzo's street address is listed as what?" }, { "role": "assistant", "content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='the palazzo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_setlist\" (\n \"year\" real,\n \"song_title\" text,\n \"artist\" text,\n \"master_recording\" text,\n \"tier\" text\n);\n\nQuestion: What's the title of the song by Winger?" }, { "role": "assistant", "content": "SELECT \"song_title\" FROM \"main_setlist\" WHERE \"artist\"='winger';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winners\" text,\n \"runner_up\" text,\n \"3rd_place\" text\n);\n\nQuestion: What shows for 3rd place when Runner-up shows as runner-up?" }, { "role": "assistant", "content": "SELECT \"3rd_place\" FROM \"winners\" WHERE \"runner_up\"='runner-up';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winners\" text,\n \"runner_up\" text,\n \"3rd_place\" text\n);\n\nQuestion: What year shows as Runner-up of england (24 pts)?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"winners\" WHERE \"runner_up\"='england (24 pts)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winners\" text,\n \"runner_up\" text,\n \"3rd_place\" text\n);\n\nQuestion: What shows for Winners when it shows 3rd place of [[|]] (21 pts), and a Runner-up of united states (23 pts)?" }, { "role": "assistant", "content": "SELECT \"winners\" FROM \"winners\" WHERE \"3rd_place\"='[[|]] (21 pts)' AND \"runner_up\"='united states (23 pts)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winners\" text,\n \"runner_up\" text,\n \"3rd_place\" text\n);\n\nQuestion: What shows for 3rd place when the venue was Pardubice?" }, { "role": "assistant", "content": "SELECT \"3rd_place\" FROM \"winners\" WHERE \"venue\"='pardubice';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winners\" text,\n \"runner_up\" text,\n \"3rd_place\" text\n);\n\nQuestion: what shows for 3rd place in 1990?" }, { "role": "assistant", "content": "SELECT \"3rd_place\" FROM \"winners\" WHERE \"year\"='1990';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winners\" text,\n \"runner_up\" text,\n \"3rd_place\" text\n);\n\nQuestion: What year was the venue Landshut?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"winners\" WHERE \"venue\"='landshut';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record when Tampa Bay is the visitor?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"march\" WHERE \"visitor\"='tampa bay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the date when Joseph is the decision and San Jose is the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"march\" WHERE \"decision\"='joseph' AND \"home\"='san jose';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the date of the match when Detroit is the home team and Colorado is the visiting team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"march\" WHERE \"home\"='detroit' AND \"visitor\"='colorado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who is the opponent with attendance greater than 73,984 with a result of w 28\u201314?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\">'73,984' AND \"result\"='w 28\u201314';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many people were in attendance in a week over 4 on December 6, 1981?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"week\">4 AND \"date\"='december 6, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Name the least game for october 10 at shibe park" }, { "role": "assistant", "content": "SELECT MIN(\"game\") FROM \"summary\" WHERE \"location\"='shibe park' AND \"date\"='october 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest bronze total that has a rank of 1 and more than 34 total medals?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"rank\"='1' AND \"total\">34;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest bronze total that has a silver total of 13 medals?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"silver\"='13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_by_team\" (\n \"appearances\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"winning_percentage\" real,\n \"season_s\" text\n);\n\nQuestion: With Appearances larger than 1, what is the Wins for the Reno Aces Team?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"appearances_by_team\" WHERE \"team\"='reno aces' AND \"appearances\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_by_team\" (\n \"appearances\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"winning_percentage\" real,\n \"season_s\" text\n);\n\nQuestion: For the Reno Aces, what are the Losses when they had 1 Appearances and a Winning Percentage of 1?" }, { "role": "assistant", "content": "SELECT SUM(\"losses\") FROM \"appearances_by_team\" WHERE \"appearances\"=1 AND \"winning_percentage\"=1 AND \"team\"='reno aces';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_by_team\" (\n \"appearances\" real,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"winning_percentage\" real,\n \"season_s\" text\n);\n\nQuestion: In 2009, what Appearances had a Winning Percentage of less than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"appearances\") FROM \"appearances_by_team\" WHERE \"season_s\"='2009' AND \"winning_percentage\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_world_championship_formula_one_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the chassis for the year of 1969?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_world_championship_formula_one_\" WHERE \"year\"=1969;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_seats\" (\n \"riding\" text,\n \"candidate_s_name\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: Which Occupation has a Rank of 5th, a Gender of M, with a Residence of orono?" }, { "role": "assistant", "content": "SELECT \"occupation\" FROM \"4_seats\" WHERE \"rank\"='5th' AND \"gender\"='m' AND \"residence\"='orono';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_seats\" (\n \"riding\" text,\n \"candidate_s_name\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: Which Gender has a Residence of Haliburton?" }, { "role": "assistant", "content": "SELECT \"gender\" FROM \"4_seats\" WHERE \"residence\"='haliburton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_seats\" (\n \"riding\" text,\n \"candidate_s_name\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: What's the lowest in Votes with a Rank of 5th, has an Occupation of retired, along with a Riding of Brant?" }, { "role": "assistant", "content": "SELECT MIN(\"votes\") FROM \"4_seats\" WHERE \"rank\"='5th' AND \"occupation\"='retired' AND \"riding\"='brant';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_seats\" (\n \"riding\" text,\n \"candidate_s_name\" text,\n \"gender\" text,\n \"residence\" text,\n \"occupation\" text,\n \"votes\" real,\n \"rank\" text\n);\n\nQuestion: What Occupation has the Rank of 5th and has a Candidate's Name of Henry Zekveld?" }, { "role": "assistant", "content": "SELECT \"occupation\" FROM \"4_seats\" WHERE \"rank\"='5th' AND \"candidate_s_name\"='henry zekveld';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the sum of the people in attendance when there was a Loss of clement (5\u20137)?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"loss\"='clement (5\u20137)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What place was Corey Pavin in?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='corey pavin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the two-round score for Bob Tway?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='bob tway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: How many people went to the game that lasted 2:37 after game 2?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"summary\" WHERE \"game\">2 AND \"time\"='2:37';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the FCC info of the w214ba call sign with a frequency below 96.3?" }, { "role": "assistant", "content": "SELECT \"fcc_info\" FROM \"translators\" WHERE \"frequency_m_hz\"<96.3 AND \"call_sign\"='w214ba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the total number of the ERP W with a call sign of w242ak?" }, { "role": "assistant", "content": "SELECT COUNT(\"erp_w\") FROM \"translators\" WHERE \"call_sign\"='w242ak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the FCC info of the station with a frequency above 95.3 and an ERP W smaller than 27 in Ocala, Florida?" }, { "role": "assistant", "content": "SELECT \"fcc_info\" FROM \"translators\" WHERE \"frequency_m_hz\">95.3 AND \"erp_w\"<27 AND \"city_of_license\"='ocala, florida';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_26_16_10\" (\n \"outcome\" text,\n \"date\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What date has an outcome of runner-up, and a Score of 6\u20134, 6\u20132, and a Opponents of gisela dulko flavia pennetta?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"doubles_26_16_10\" WHERE \"outcome\"='runner-up' AND \"score\"='6\u20134, 6\u20132' AND \"opponents\"='gisela dulko flavia pennetta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: In Round 10, what was the Overall for Ed Tomlin?" }, { "role": "assistant", "content": "SELECT AVG(\"overall\") FROM \"indianapolis_colts_draft_history\" WHERE \"round\"=10 AND \"name\"='ed tomlin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the Position of Pick #23 in a Round less than 5 with 23 Overall?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"indianapolis_colts_draft_history\" WHERE \"round\"<5 AND \"pick_num\"=23 AND \"overall\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What Average Pick # has an Overall of 296?" }, { "role": "assistant", "content": "SELECT AVG(\"pick_num\") FROM \"indianapolis_colts_draft_history\" WHERE \"overall\"=296;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: In Round 13, what was the Pick # of the Guard Position with an Overall greater than 23?" }, { "role": "assistant", "content": "SELECT \"pick_num\" FROM \"indianapolis_colts_draft_history\" WHERE \"overall\">23 AND \"position\"='guard' AND \"round\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: With an Overall larger than 107, in what Round was Jim Duncan picked?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"indianapolis_colts_draft_history\" WHERE \"name\"='jim duncan' AND \"overall\">107;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indianapolis_colts_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest Pick # for the College of Maryland-Eastern Shore?" }, { "role": "assistant", "content": "SELECT MAX(\"pick_num\") FROM \"indianapolis_colts_draft_history\" WHERE \"college\"='maryland-eastern shore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is Brown Motors best point total using the Offenhauser L4 engine since 1950?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\">1950 AND \"engine\"='offenhauser l4' AND \"entrant\"='brown motors';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"stage\" text,\n \"time_eest\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"rally_leader\" text\n);\n\nQuestion: Name the length for stage of ss6" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"special_stages\" WHERE \"stage\"='ss6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"stage\" text,\n \"time_eest\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"rally_leader\" text\n);\n\nQuestion: Name the stage for m. gr\u00f6nholm and winner of s.loeb with time of 17:57" }, { "role": "assistant", "content": "SELECT \"stage\" FROM \"special_stages\" WHERE \"rally_leader\"='m. gr\u00f6nholm' AND \"winner\"='s.loeb' AND \"time_eest\"='17:57';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"stage\" text,\n \"time_eest\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"rally_leader\" text\n);\n\nQuestion: Name the winner for schimatari 1" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"special_stages\" WHERE \"name\"='schimatari 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"stage\" text,\n \"time_eest\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"rally_leader\" text\n);\n\nQuestion: Name the stage for 08:46" }, { "role": "assistant", "content": "SELECT \"stage\" FROM \"special_stages\" WHERE \"time_eest\"='08:46';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"stage\" text,\n \"time_eest\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"rally_leader\" text\n);\n\nQuestion: Name the winner with rally leader of c. atkinson and name of agia sotira 1" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"special_stages\" WHERE \"rally_leader\"='c. atkinson' AND \"name\"='agia sotira 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"special_stages\" (\n \"stage\" text,\n \"time_eest\" text,\n \"name\" text,\n \"length\" text,\n \"winner\" text,\n \"rally_leader\" text\n);\n\nQuestion: Name the winner for ss14" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"special_stages\" WHERE \"stage\"='ss14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the mixed doubles the same year that Andrew Downes won the men's singles?" }, { "role": "assistant", "content": "SELECT \"mixed_doubles\" FROM \"previous_winners\" WHERE \"men_s_singles\"='andrew downes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" text,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the mixed doubles in the years that the men's doubles has no competition?" }, { "role": "assistant", "content": "SELECT \"mixed_doubles\" FROM \"previous_winners\" WHERE \"men_s_doubles\"='no competition';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Who lost when the mariners played on September 12?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"opponent\"='mariners' AND \"date\"='september 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: On September 7 what was the record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='september 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Who plays on the date september 29?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='september 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_iq_full_power_affiliates\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which city of license has a wriq Call sign?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"radio_iq_full_power_affiliates\" WHERE \"call_sign\"='wriq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_iq_full_power_affiliates\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the total of Frequency MHz with a Class of b1?" }, { "role": "assistant", "content": "SELECT SUM(\"frequency_m_hz\") FROM \"radio_iq_full_power_affiliates\" WHERE \"class\"='b1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_iq_full_power_affiliates\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which ERP W has a Class of A, and a Call sign of wffc?" }, { "role": "assistant", "content": "SELECT \"erp_w\" FROM \"radio_iq_full_power_affiliates\" WHERE \"class\"='a' AND \"call_sign\"='wffc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_iq_full_power_affiliates\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which class City of license of ferrum, virginia?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"radio_iq_full_power_affiliates\" WHERE \"city_of_license\"='ferrum, virginia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio_iq_full_power_affiliates\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" text,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which call sign has a Class of A, and a Frequency MHz of 88.7?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"radio_iq_full_power_affiliates\" WHERE \"class\"='a' AND \"frequency_m_hz\"=88.7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: what heat number had a time of 58.44?" }, { "role": "assistant", "content": "SELECT COUNT(\"heat\") FROM \"heats\" WHERE \"time\"='58.44';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: what lane was new zealand in?" }, { "role": "assistant", "content": "SELECT \"lane\" FROM \"heats\" WHERE \"nationality\"='new zealand';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stage_results\" (\n \"stage\" text,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"race_leader\" text\n);\n\nQuestion: What stage of the race was held on the course Reggio Calabria to Catanzaro?" }, { "role": "assistant", "content": "SELECT \"stage\" FROM \"stage_results\" WHERE \"course\"='reggio calabria to catanzaro';" } ]