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 \"main_transmitters\" (\n \"region_served\" text,\n \"ch_1\" text,\n \"on_air_date\" text,\n \"analogue_power\" text,\n \"digital_power\" text,\n \"analogue_haat\" text,\n \"digital_haat\" text,\n \"transmitter_location\" text\n);\n\nQuestion: What is the Ch1 in the region served by Central Tablelands?" }, { "role": "assistant", "content": "SELECT \"ch_1\" FROM \"main_transmitters\" WHERE \"region_served\"='central tablelands';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_transmitters\" (\n \"region_served\" text,\n \"ch_1\" text,\n \"on_air_date\" text,\n \"analogue_power\" text,\n \"digital_power\" text,\n \"analogue_haat\" text,\n \"digital_haat\" text,\n \"transmitter_location\" text\n);\n\nQuestion: What transmitter location has digital power of 570kw?" }, { "role": "assistant", "content": "SELECT \"transmitter_location\" FROM \"main_transmitters\" WHERE \"digital_power\"='570kw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What year did team Yamaha have 0 wins, a rank of 8th, and more than 22 points?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"team\"='yamaha' AND \"wins\"=0 AND \"rank\"='8th' AND \"points\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Name the total number of rounds for gina carano" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='gina carano';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the difference related to 2 losses and fewer than 10 points?" }, { "role": "assistant", "content": "SELECT \"points_difference\" FROM \"first_round\" WHERE \"lost\"=2 AND \"points\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"site\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Where did the game(s) against Iowa take place?" }, { "role": "assistant", "content": "SELECT \"site\" FROM \"schedule\" WHERE \"opponent\"='iowa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What is the Outcome of the Doubles played on Carpet?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_5\" WHERE \"surface\"='carpet';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the Surface during the match with Partner Debbie Graham?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_5\" WHERE \"partner\"='debbie graham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the Partner on February 23, 1997?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_5\" WHERE \"date\"='february 23, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the Tournament on May 24, 1992 played on a Clay Surface?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_5\" WHERE \"surface\"='clay' AND \"date\"='may 24, 1992';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the Surface in the match with a Score of 7\u20135, 6\u20137, 4\u20136?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_5\" WHERE \"score\"='7\u20135, 6\u20137, 4\u20136';" } ]
[ { "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 \"fcc_info\" text\n);\n\nQuestion: What is the frequency MHz in tremonton, utah with a ERP W larger than 30?" }, { "role": "assistant", "content": "SELECT \"frequency_m_hz\" FROM \"translators\" WHERE \"erp_w\">30 AND \"city_of_license\"='tremonton, utah';" } ]
[ { "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 \"fcc_info\" text\n);\n\nQuestion: What is k275av call sign's highest erp w?" }, { "role": "assistant", "content": "SELECT MAX(\"erp_w\") FROM \"translators\" WHERE \"call_sign\"='k275av';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"record\" text,\n \"regular_season_finish\" text,\n \"playoffs\" text,\n \"avg_attend\" real\n);\n\nQuestion: Name the year for american conference semifinals" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"year_by_year\" WHERE \"playoffs\"='american conference semifinals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"record\" text,\n \"regular_season_finish\" text,\n \"playoffs\" text,\n \"avg_attend\" real\n);\n\nQuestion: Name the total number of years for quarterfinals" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"year_by_year\" WHERE \"playoffs\"='quarterfinals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_20_countries_by_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"miss_world\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"5th_runner_up\" real,\n \"6th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: 4th Runner-up smaller than 1, and a 5th Runner-up of 0, and a Miss World smaller than 2 has which lowest 3rd Runner-up?" }, { "role": "assistant", "content": "SELECT MIN(\"3rd_runner_up\") FROM \"top_20_countries_by_tally\" WHERE \"4th_runner_up\"<1 AND \"5th_runner_up\"=0 AND \"miss_world\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_20_countries_by_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"miss_world\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"5th_runner_up\" real,\n \"6th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: Country/Territory of india, and a 4th Runner-up smaller than 1 has which lowest rank?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"top_20_countries_by_tally\" WHERE \"country_territory\"='india' AND \"4th_runner_up\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_20_countries_by_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"miss_world\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"5th_runner_up\" real,\n \"6th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: Rank larger than 3, and a 6th Runner-up larger than 0, and a 5th Runner-up smaller than 1 has which lowest 1st Runner-up?" }, { "role": "assistant", "content": "SELECT MIN(\"1st_runner_up\") FROM \"top_20_countries_by_tally\" WHERE \"rank\">3 AND \"6th_runner_up\">0 AND \"5th_runner_up\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_20_countries_by_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"miss_world\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"5th_runner_up\" real,\n \"6th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: 5th Runner-up smaller than 0 has the lowest semifinalists?" }, { "role": "assistant", "content": "SELECT MIN(\"semifinalists\") FROM \"top_20_countries_by_tally\" WHERE \"5th_runner_up\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_20_countries_by_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"miss_world\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"5th_runner_up\" real,\n \"6th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: 3rd Runner-up of 2, and a Country/Territory of venezuela has what sum of 4th runner-up?" }, { "role": "assistant", "content": "SELECT SUM(\"4th_runner_up\") FROM \"top_20_countries_by_tally\" WHERE \"3rd_runner_up\"=2 AND \"country_territory\"='venezuela';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_20_countries_by_tally\" (\n \"rank\" real,\n \"country_territory\" text,\n \"miss_world\" real,\n \"1st_runner_up\" real,\n \"2nd_runner_up\" real,\n \"3rd_runner_up\" real,\n \"4th_runner_up\" real,\n \"5th_runner_up\" real,\n \"6th_runner_up\" real,\n \"semifinalists\" real,\n \"total\" real\n);\n\nQuestion: 2nd Runner-up larger than 4, and a Country/Territory of israel, and a 4th Runner-up smaller than 0 has which sum of 6th Runner-up?" }, { "role": "assistant", "content": "SELECT SUM(\"6th_runner_up\") FROM \"top_20_countries_by_tally\" WHERE \"2nd_runner_up\">4 AND \"country_territory\"='israel' AND \"4th_runner_up\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"season\" real,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: Who is the Runner-up that has a Season less than 2005?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"finals\" WHERE \"season\"<2005;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"season\" real,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: Which Seasonhas a Score of 3 \u2013 3 aet , 4\u20133 pen?" }, { "role": "assistant", "content": "SELECT MAX(\"season\") FROM \"finals\" WHERE \"score\"='3 \u2013 3 aet , 4\u20133 pen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"season\" real,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: Which Season has a Score of 3 \u2013 3 aet , 4\u20133 pen" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"finals\" WHERE \"score\"='3 \u2013 3 aet , 4\u20133 pen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many rounds had an overall of 211?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"overall\"=211;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_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 mean pick number for the cornerback position when the overall is less than 134?" }, { "role": "assistant", "content": "SELECT AVG(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"position\"='cornerback' AND \"overall\"<134;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"county\" text,\n \"1948\" real,\n \"1956\" real,\n \"1966\" real,\n \"1977\" real,\n \"1992\" real,\n \"2002\" real,\n \"2011\" real\n);\n\nQuestion: Which 1956 has a County of v\u00e2lcea, and a 2011 smaller than 371714?" }, { "role": "assistant", "content": "SELECT SUM(\"1956\") FROM \"see_also\" WHERE \"county\"='v\u00e2lcea' AND \"2011\"<371714;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"county\" text,\n \"1948\" real,\n \"1956\" real,\n \"1966\" real,\n \"1977\" real,\n \"1992\" real,\n \"2002\" real,\n \"2011\" real\n);\n\nQuestion: Which 2011 is the lowest one that has a 1948 smaller than 15872624, and a 1966 of 263103, and a 1992 larger than 266308?" }, { "role": "assistant", "content": "SELECT MIN(\"2011\") FROM \"see_also\" WHERE \"1948\"<15872624 AND \"1966\"=263103 AND \"1992\">266308;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"county\" text,\n \"1948\" real,\n \"1956\" real,\n \"1966\" real,\n \"1977\" real,\n \"1992\" real,\n \"2002\" real,\n \"2011\" real\n);\n\nQuestion: Which 1992 is the lowest one that has a 1977 smaller than 385577, and a 2011 larger than 340310, and a 2002 larger than 300123, and a 1948 larger than 280524?" }, { "role": "assistant", "content": "SELECT MIN(\"1992\") FROM \"see_also\" WHERE \"1977\"<385577 AND \"2011\">340310 AND \"2002\">300123 AND \"1948\">280524;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"county\" text,\n \"1948\" real,\n \"1956\" real,\n \"1966\" real,\n \"1977\" real,\n \"1992\" real,\n \"2002\" real,\n \"2011\" real\n);\n\nQuestion: Which 1977 is the lowest one that has a County of zzz bucharest, and a 2011 smaller than 1883425?" }, { "role": "assistant", "content": "SELECT MIN(\"1977\") FROM \"see_also\" WHERE \"county\"='zzz bucharest' AND \"2011\"<1883425;" } ]
[ { "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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What is the site of the game that had an attendance of 54,040?" }, { "role": "assistant", "content": "SELECT \"game_site\" FROM \"schedule\" WHERE \"attendance\"='54,040';" } ]
[ { "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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance of the game against the houston oilers?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponent\"='houston oilers';" } ]
[ { "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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What was the date of the game on week 7?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=7;" } ]
[ { "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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: How many fans attended the game at Bye?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"game_site\"='bye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: Which winner had a location of Iowa?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"tournament_results\" WHERE \"location\"='iowa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_finals_3_titles_7_run\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which opponent in the final had a partner of Katarina Srebotnik and a championship of wimbledon (4)?" }, { "role": "assistant", "content": "SELECT \"opponents_in_the_final\" FROM \"women_s_doubles_10_finals_3_titles_7_run\" WHERE \"partner\"='katarina srebotnik' AND \"championship\"='wimbledon (4)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_finals_3_titles_7_run\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who was the partner when the championship was us open on a hard surface?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"women_s_doubles_10_finals_3_titles_7_run\" WHERE \"surface\"='hard' AND \"championship\"='us open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_finals_3_titles_7_run\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the surface for Julie Halard when the final score was 6\u20133, 6\u20132?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"women_s_doubles_10_finals_3_titles_7_run\" WHERE \"partner\"='julie halard' AND \"score_in_the_final\"='6\u20133, 6\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_finals_3_titles_7_run\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What was the outcome when the oppenent was serena williams venus williams and had a hard surface?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"women_s_doubles_10_finals_3_titles_7_run\" WHERE \"opponents_in_the_final\"='serena williams venus williams' AND \"surface\"='hard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How much Played has Drawn of 2, and a Position larger than 3, and Points smaller than 10?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"torneio_rio_s_o_paulo\" WHERE \"drawn\"=2 AND \"position\">3 AND \"points\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which average Against has a Difference of 10, and a Lost smaller than 2?" }, { "role": "assistant", "content": "SELECT AVG(\"against\") FROM \"torneio_rio_s_o_paulo\" WHERE \"difference\"='10' AND \"lost\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: How many Attendances have a Result F \u2013 A of 0 \u2013 2, and a Date of 31 january 1903?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"second_division\" WHERE \"result_f_a\"='0 \u2013 2' AND \"date\"='31 january 1903';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: How many Attendances on 13 april 1903?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"second_division\" WHERE \"date\"='13 april 1903';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: How many Attendances have a H / A of h on 7 march 1903?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"second_division\" WHERE \"h_a\"='h' AND \"date\"='7 march 1903';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: Which Opponent has a H / A of a, and a Result F \u2013 A of 2 \u2013 0, and a Attendance larger than 30,000?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"second_division\" WHERE \"h_a\"='a' AND \"result_f_a\"='2 \u2013 0' AND \"attendance\">'30,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_division\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: When is The Opponents of lincoln city and a H / A of a?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"second_division\" WHERE \"opponents\"='lincoln city' AND \"h_a\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the score for the Dec 11 game?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"december\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Which game has an opponent of Phoenix Coyotes and was before Dec 9?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"schedule_and_results\" WHERE \"opponent\"='phoenix coyotes' AND \"december\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the December game that led to an 11-13-5 record?" }, { "role": "assistant", "content": "SELECT MAX(\"december\") FROM \"schedule_and_results\" WHERE \"record\"='11-13-5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the record after game 41?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"game\"=41;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall has a College of florida state, and a Round larger than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"overall\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"college\"='florida state' AND \"round\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many Picks have a Position of kicker, and an Overall smaller than 137?" }, { "role": "assistant", "content": "SELECT SUM(\"pick_num\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"position\"='kicker' AND \"overall\"<137;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Position has a Pick # of 18?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"jacksonville_jaguars_draft_history\" WHERE \"pick_num\"=18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which College has a Round smaller than 7, and a Pick # smaller than 27, and a Name of anthony maddox?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"jacksonville_jaguars_draft_history\" WHERE \"round\"<7 AND \"pick_num\"<27 AND \"name\"='anthony maddox';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How much Overall has a Pick # larger than 9, and a Round larger than 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"overall\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"pick_num\">9 AND \"round\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Which score was for the Spurs as visitors with record of 35\u201316?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"february\" WHERE \"visitor\"='spurs' AND \"record\"='35\u201316';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: Which record was for Warriors at home?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"february\" WHERE \"home\"='warriors';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: English title of mal\u00e8na had what original title?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"2000_2009\" WHERE \"english_title\"='mal\u00e8na';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: Original title of \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 / vozvrashcheniye had what English title?" }, { "role": "assistant", "content": "SELECT \"english_title\" FROM \"2000_2009\" WHERE \"original_title\"='\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 / vozvrashcheniye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: Director of christophe barratier had what highest year?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"2000_2009\" WHERE \"director\"='christophe barratier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: English title of am\u00e9lie had what year?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"2000_2009\" WHERE \"english_title\"='am\u00e9lie';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_2009\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: Original title of das leben der anderen had what director?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"2000_2009\" WHERE \"original_title\"='das leben der anderen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1931_1940\" (\n \"date\" text,\n \"theatre_studio_or_network\" text,\n \"role\" text,\n \"dance_partner\" text,\n \"director\" text\n);\n\nQuestion: Who was the director where the role was Fred Ayres?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"1931_1940\" WHERE \"role\"='fred ayres';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1931_1940\" (\n \"date\" text,\n \"theatre_studio_or_network\" text,\n \"role\" text,\n \"dance_partner\" text,\n \"director\" text\n);\n\nQuestion: What was the theatre where Peter P. Peters is the role?" }, { "role": "assistant", "content": "SELECT \"theatre_studio_or_network\" FROM \"1931_1940\" WHERE \"role\"='peter p. peters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who are the Runner(s)-up with a Margin of 1 stroke?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"wins_5\" WHERE \"margin\"='1 stroke';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who are the Runner(s)-up with a Margin of 3 strokes?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"wins_5\" WHERE \"margin\"='3 strokes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the highest Year with of the open championship?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"wins_5\" WHERE \"championship\"='the open championship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Winning score in 1956?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"wins_5\" WHERE \"year\"=1956;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Winning score in 1965?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"wins_5\" WHERE \"year\"=1965;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_5\" (\n \"year\" real,\n \"championship\" text,\n \"54_holes\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What Year had a Runner(s)-up of flory van donck?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"wins_5\" WHERE \"runner_s_up\"='flory van donck';" } ]
[ { "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 \"catalogue\" text\n);\n\nQuestion: What is the release Date for the Region in New Zealand ?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"region\"='new zealand';" } ]
[ { "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 \"catalogue\" text\n);\n\nQuestion: What is the release Date for the New Zealand Region?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"region\"='new zealand';" } ]
[ { "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 \"catalogue\" text\n);\n\nQuestion: What is the Date of Catalogue number 602517739468?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalogue\"='602517739468';" } ]
[ { "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 \"catalogue\" text\n);\n\nQuestion: In what Region was the Catalogue number 1785089 released?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"catalogue\"='1785089';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"low_powered_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: Which city of license has a frequency less than 100.1?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"low_powered_translators\" WHERE \"frequency_m_hz\"<100.1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"low_powered_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 ERP W with a call sign at w261cq?" }, { "role": "assistant", "content": "SELECT \"erp_w\" FROM \"low_powered_translators\" WHERE \"call_sign\"='w261cq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"low_powered_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 average value for ERP W when frequency is more than 100.1?" }, { "role": "assistant", "content": "SELECT AVG(\"erp_w\") FROM \"low_powered_translators\" WHERE \"frequency_m_hz\">100.1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"low_powered_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 frequency has call sign w228bg?" }, { "role": "assistant", "content": "SELECT \"frequency_m_hz\" FROM \"low_powered_translators\" WHERE \"call_sign\"='w228bg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"low_powered_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 average value of ERP W in Beardstown, Illinois for a frequency greater than 93.5?" }, { "role": "assistant", "content": "SELECT AVG(\"erp_w\") FROM \"low_powered_translators\" WHERE \"city_of_license\"='beardstown, illinois' AND \"frequency_m_hz\">93.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"champion\" text,\n \"country\" text,\n \"venue\" text,\n \"location\" text,\n \"score\" text,\n \"winner_s_share\" real\n);\n\nQuestion: What was the sum of the winner's shares for US Senior Opens won by Brad Bryant before 2007?" }, { "role": "assistant", "content": "SELECT SUM(\"winner_s_share\") FROM \"winners\" WHERE \"champion\"='brad bryant' AND \"year\"<2007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"champion\" text,\n \"country\" text,\n \"venue\" text,\n \"location\" text,\n \"score\" text,\n \"winner_s_share\" real\n);\n\nQuestion: What was the winning score in 2000?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"winners\" WHERE \"year\"=2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"champion\" text,\n \"country\" text,\n \"venue\" text,\n \"location\" text,\n \"score\" text,\n \"winner_s_share\" real\n);\n\nQuestion: What is the average winner's share won by Billy Casper?" }, { "role": "assistant", "content": "SELECT AVG(\"winner_s_share\") FROM \"winners\" WHERE \"champion\"='billy casper';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_2_2008_2009\" (\n \"airdate\" text,\n \"celebrities\" text,\n \"rating\" real,\n \"share\" real,\n \"18_49\" text,\n \"viewers_millions\" real,\n \"weekly_rank\" text,\n \"prod_code\" real\n);\n\nQuestion: Name the weekly rank for sunday, june 14, 2009" }, { "role": "assistant", "content": "SELECT \"weekly_rank\" FROM \"season_2_2008_2009\" WHERE \"airdate\"='sunday, june 14, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Pick # is the highest one that has an Overall of 184, and a Round larger than 6?" }, { "role": "assistant", "content": "SELECT MAX(\"pick_num\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"overall\"=184 AND \"round\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many picks have an Overall of 114?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick_num\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"overall\"=114;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall is the highest one that has a Name of daimon shelton, and a Round larger than 6?" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"name\"='daimon shelton' AND \"round\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Pick # is the highest one that has an Overall larger than 21, and a College of north carolina, and a Round smaller than 3?" }, { "role": "assistant", "content": "SELECT MAX(\"pick_num\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"overall\">21 AND \"college\"='north carolina' AND \"round\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Position has an Overall larger than 147, and a Pick # of 21?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"jacksonville_jaguars_draft_history\" WHERE \"overall\">147 AND \"pick_num\"=21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jacksonville_jaguars_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 cornell's lowest pick number?" }, { "role": "assistant", "content": "SELECT MIN(\"pick_num\") FROM \"jacksonville_jaguars_draft_history\" WHERE \"college\"='cornell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_e_voting_system_result\" (\n \"eviction_no\" real,\n \"nominee\" text,\n \"vote_to_save\" text,\n \"vote_to_evict\" text,\n \"net_vote\" text,\n \"eviction_result\" text\n);\n\nQuestion: Which Eviction result has a Net vote of 31.86%?" }, { "role": "assistant", "content": "SELECT \"eviction_result\" FROM \"s_e_voting_system_result\" WHERE \"net_vote\"='31.86%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_e_voting_system_result\" (\n \"eviction_no\" real,\n \"nominee\" text,\n \"vote_to_save\" text,\n \"vote_to_evict\" text,\n \"net_vote\" text,\n \"eviction_result\" text\n);\n\nQuestion: Which Nominee has a Vote to Save of 1.98%?" }, { "role": "assistant", "content": "SELECT \"nominee\" FROM \"s_e_voting_system_result\" WHERE \"vote_to_save\"='1.98%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_e_voting_system_result\" (\n \"eviction_no\" real,\n \"nominee\" text,\n \"vote_to_save\" text,\n \"vote_to_evict\" text,\n \"net_vote\" text,\n \"eviction_result\" text\n);\n\nQuestion: Which Vote to Evict has a Vote to Save of 21.22%?" }, { "role": "assistant", "content": "SELECT \"vote_to_evict\" FROM \"s_e_voting_system_result\" WHERE \"vote_to_save\"='21.22%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"s_e_voting_system_result\" (\n \"eviction_no\" real,\n \"nominee\" text,\n \"vote_to_save\" text,\n \"vote_to_evict\" text,\n \"net_vote\" text,\n \"eviction_result\" text\n);\n\nQuestion: Which Vote to Save has an Eviction # smaller than 14, and a Vote to Evict of 5.42%?" }, { "role": "assistant", "content": "SELECT \"vote_to_save\" FROM \"s_e_voting_system_result\" WHERE \"eviction_no\"<14 AND \"vote_to_evict\"='5.42%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_10_international_visitors_in_vietnam\" (\n \"rank\" real,\n \"country\" text,\n \"2011\" real,\n \"2012\" real,\n \"2013_jan_sep_link\" text\n);\n\nQuestion: What is the average rank of a nation that had 219,721 in 2012?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"top_10_international_visitors_in_vietnam\" WHERE \"2012\"='219,721';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: In what Round was Pick 138?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"draft_picks\" WHERE \"pick\"=138;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What is John Crawford's Nationality?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='john crawford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kansas\" (\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 ERP W for K236AM?" }, { "role": "assistant", "content": "SELECT \"erp_w\" FROM \"kansas\" WHERE \"call_sign\"='k236am';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kansas\" (\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 average frequency in MHz for stations with an ERP W of 170?" }, { "role": "assistant", "content": "SELECT AVG(\"frequency_m_hz\") FROM \"kansas\" WHERE \"erp_w\"=170;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kansas\" (\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 K236AM's lowest frequency in MHz?" }, { "role": "assistant", "content": "SELECT MIN(\"frequency_m_hz\") FROM \"kansas\" WHERE \"call_sign\"='k236am';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kansas\" (\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 class is assigned to frequencies lower than 90.5?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"kansas\" WHERE \"frequency_m_hz\"<90.5;" } ]