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 \"solo_songs\" (\n \"title\" text,\n \"russian\" text,\n \"transliteration\" text,\n \"original_text\" text,\n \"start\" real\n);\n\nQuestion: What Title's Transliteration is Fal'shivaya Nota?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"solo_songs\" WHERE \"transliteration\"='fal''shivaya nota';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"solo_songs\" (\n \"title\" text,\n \"russian\" text,\n \"transliteration\" text,\n \"original_text\" text,\n \"start\" real\n);\n\nQuestion: What Title has a Transliteration of u lyudey-to v domu?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"solo_songs\" WHERE \"transliteration\"='u lyudey-to v domu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_mexico\" (\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 average frequency MHZ when is in portales, new mexico?" }, { "role": "assistant", "content": "SELECT AVG(\"frequency_m_hz\") FROM \"new_mexico\" WHERE \"city_of_license\"='portales, new mexico';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_mexico\" (\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 FCC info when ERP W is larger than 92 and call sign has k264ba?" }, { "role": "assistant", "content": "SELECT \"fcc_info\" FROM \"new_mexico\" WHERE \"erp_w\">92 AND \"call_sign\"='k264ba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_mexico\" (\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: Which call sign has ERP Wlarger than 250, and Frequency MHZ smaller than 99.3?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"new_mexico\" WHERE \"erp_w\">250 AND \"frequency_m_hz\"<99.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friendly_2004\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"comp\" text\n);\n\nQuestion: Where was the game played when the score was 1-4?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"friendly_2004\" WHERE \"score\"='1-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friendly_2004\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"comp\" text\n);\n\nQuestion: Who was the game played against on 2004-02-28 at Skytteholms IP?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"friendly_2004\" WHERE \"venue\"='skytteholms ip' AND \"date\"='2004-02-28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friendly_2004\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"comp\" text\n);\n\nQuestion: When the game was played at Domnarvsvallen who were the opponents?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"friendly_2004\" WHERE \"venue\"='domnarvsvallen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friendly_2004\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"comp\" text\n);\n\nQuestion: Who were the opposing team when playing in the Portugal venue?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"friendly_2004\" WHERE \"venue\"='portugal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"friendly_2004\" (\n \"date\" text,\n \"venue\" text,\n \"opponents\" text,\n \"score\" text,\n \"comp\" text\n);\n\nQuestion: Where was the game played on 2004-06-23?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"friendly_2004\" WHERE \"date\"='2004-06-23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What is the to par for Tom Weiskopf?" }, { "role": "assistant", "content": "SELECT AVG(\"to_par\") FROM \"final_round\" WHERE \"player\"='tom weiskopf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What title did George Fury win when on the Oran Park Raceway?" }, { "role": "assistant", "content": "SELECT \"race_title\" FROM \"race_calendar\" WHERE \"winner\"='george fury' AND \"circuit\"='oran park raceway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: Who was the winner on the Amaroo Park circuit?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"race_calendar\" WHERE \"circuit\"='amaroo park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"promotion_playoff\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What are the fewest points for goals fewer than 13?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"promotion_playoff\" WHERE \"goals_for\"<13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"promotion_playoff\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many goals when more than 10 games played?" }, { "role": "assistant", "content": "SELECT AVG(\"goals_for\") FROM \"promotion_playoff\" WHERE \"played\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"promotion_playoff\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many losses when goals against are more than 17, goal difference is more than 2 and points are more than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"losses\") FROM \"promotion_playoff\" WHERE \"goals_against\">17 AND \"goal_difference\"<2 AND \"points\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"promotion_playoff\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: How many draws when there are fewer than 6 wins and the goal difference is less than -15?" }, { "role": "assistant", "content": "SELECT COUNT(\"draws\") FROM \"promotion_playoff\" WHERE \"wins\"<6 AND \"goal_difference\"<-15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: How much Draw has a Rank of 3rd, and a Performer of noelle, and Points larger than 79?" }, { "role": "assistant", "content": "SELECT COUNT(\"draw\") FROM \"references\" WHERE \"rank\"='3rd' AND \"performer\"='noelle' AND \"points\">79;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: Which Draw has a Performer of jenny newman, and Points smaller than 77?" }, { "role": "assistant", "content": "SELECT AVG(\"draw\") FROM \"references\" WHERE \"performer\"='jenny newman' AND \"points\"<77;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"draw\" real,\n \"song\" text,\n \"performer\" text,\n \"points\" real,\n \"rank\" text\n);\n\nQuestion: Which Points have a Draw of 2?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"references\" WHERE \"draw\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stages\" (\n \"stage\" real,\n \"start\" text,\n \"arrival\" text,\n \"duration\" text,\n \"difficulty\" text\n);\n\nQuestion: Which stage number did son bou arrive at?" }, { "role": "assistant", "content": "SELECT COUNT(\"stage\") FROM \"stages\" WHERE \"arrival\"='son bou';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stages\" (\n \"stage\" real,\n \"start\" text,\n \"arrival\" text,\n \"duration\" text,\n \"difficulty\" text\n);\n\nQuestion: How long does the one that stars with son bou of middle difficulty, and on a stage number larger than 13 last?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"stages\" WHERE \"stage\">13 AND \"difficulty\"='middle' AND \"start\"='son bou';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stages\" (\n \"stage\" real,\n \"start\" text,\n \"arrival\" text,\n \"duration\" text,\n \"difficulty\" text\n);\n\nQuestion: What is the lowest stage number that starts with els alocs and has a middle difficulty?" }, { "role": "assistant", "content": "SELECT MIN(\"stage\") FROM \"stages\" WHERE \"difficulty\"='middle' AND \"start\"='els alocs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saudi_arabia\" (\n \"internet_plan\" text,\n \"downstream\" text,\n \"upstream\" text,\n \"bandwidth_included\" text,\n \"price\" text\n);\n\nQuestion: What is the price of the internet provider that has an upstream rate of 256 kbit and a downstream rate of 512 kbit?" }, { "role": "assistant", "content": "SELECT \"price\" FROM \"saudi_arabia\" WHERE \"upstream\"='256 kbit' AND \"downstream\"='512 kbit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saudi_arabia\" (\n \"internet_plan\" text,\n \"downstream\" text,\n \"upstream\" text,\n \"bandwidth_included\" text,\n \"price\" text\n);\n\nQuestion: For the provider that costs 266 sar, what is the Bandwidth Included?" }, { "role": "assistant", "content": "SELECT \"bandwidth_included\" FROM \"saudi_arabia\" WHERE \"price\"='266 sar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"saudi_arabia\" (\n \"internet_plan\" text,\n \"downstream\" text,\n \"upstream\" text,\n \"bandwidth_included\" text,\n \"price\" text\n);\n\nQuestion: What is the name of the plan that has a downstream rate of 4,096 kbit?" }, { "role": "assistant", "content": "SELECT \"internet_plan\" FROM \"saudi_arabia\" WHERE \"downstream\"='4,096 kbit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which record has a score of l 121\u2013127?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='l 121\u2013127';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What high points did San Francisco have in a game later than 69?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"game\">69 AND \"team\"='san francisco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the record for March 10?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='march 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What high points did a game earlier than 80 have with a score of l 123\u2013142?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"game\"<80 AND \"score\"='l 123\u2013142';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bathurst_1000_results\" (\n \"year\" real,\n \"number\" real,\n \"team\" text,\n \"co_driver\" text,\n \"position\" text,\n \"laps\" real\n);\n\nQuestion: What is the lowest Year, when Co-Driver is Warren Luff, when Position is 7th, and when Laps is less than 161?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"bathurst_1000_results\" WHERE \"co_driver\"='warren luff' AND \"position\"='7th' AND \"laps\"<161;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bathurst_1000_results\" (\n \"year\" real,\n \"number\" real,\n \"team\" text,\n \"co_driver\" text,\n \"position\" text,\n \"laps\" real\n);\n\nQuestion: What is Position, when Laps is 156?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"bathurst_1000_results\" WHERE \"laps\"=156;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"bathurst_1000_results\" (\n \"year\" real,\n \"number\" real,\n \"team\" text,\n \"co_driver\" text,\n \"position\" text,\n \"laps\" real\n);\n\nQuestion: What is the highest Year, when Laps is greater than 161?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"bathurst_1000_results\" WHERE \"laps\">161;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" real,\n \"slalom\" text,\n \"giant_slalom\" real,\n \"super_g\" text,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What season had a combined of 13 and a Giant Slalom more than 31?" }, { "role": "assistant", "content": "SELECT MAX(\"season\") FROM \"season_standings\" WHERE \"combined\"='13' AND \"giant_slalom\">31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" real,\n \"slalom\" text,\n \"giant_slalom\" real,\n \"super_g\" text,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What season had a downhill of 35 and overall greater than 21?" }, { "role": "assistant", "content": "SELECT COUNT(\"season\") FROM \"season_standings\" WHERE \"downhill\"='35' AND \"overall\">21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_standings\" (\n \"season\" real,\n \"overall\" real,\n \"slalom\" text,\n \"giant_slalom\" real,\n \"super_g\" text,\n \"downhill\" text,\n \"combined\" text\n);\n\nQuestion: What's the Super G when the combined was 13 and the overall was more than 7?" }, { "role": "assistant", "content": "SELECT \"super_g\" FROM \"season_standings\" WHERE \"overall\">7 AND \"combined\"='13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is Time, when Laps is 22, and when Grid is 15?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"moto_gp_classification\" WHERE \"laps\"=22 AND \"grid\"=15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average Grid, when Time is +45.855?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"moto_gp_classification\" WHERE \"time\"='+45.855';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the total number of Grid, when Time is +43.191, and when Laps is less than 22?" }, { "role": "assistant", "content": "SELECT COUNT(\"grid\") FROM \"moto_gp_classification\" WHERE \"time\"='+43.191' AND \"laps\"<22;" } ]
[ { "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 is the place of Mark O'Meara?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='mark o''meara';" } ]
[ { "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: Which player has a score of 71-72=143?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='71-72=143';" } ]
[ { "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 is the score for the United States in place T1 for David Duval?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='united states' AND \"place\"='t1' AND \"player\"='david duval';" } ]
[ { "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: Who is the player from the United States with a score of 71-72=143?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"second_round\" WHERE \"country\"='united states' AND \"score\"='71-72=143';" } ]
[ { "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: Which country is Scott McCarron from?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='scott mccarron';" } ]
[ { "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: Which country is in T1 place with a score of 71-68=139?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t1' AND \"score\"='71-68=139';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text,\n \"scored\" real\n);\n\nQuestion: what is the venue when the competition is friendly on 26 may 1999?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='friendly' AND \"date\"='26 may 1999';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"hole\" text\n);\n\nQuestion: What was Australia's place?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"country\"='australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"hole\" text\n);\n\nQuestion: What was the score for United States when the player was Mike Reid and the To par was e?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"third_round\" WHERE \"country\"='united states' AND \"to_par\"='e' AND \"player\"='mike reid';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"hole\" text\n);\n\nQuestion: How many holes did Mike Reid from United States have?" }, { "role": "assistant", "content": "SELECT \"hole\" FROM \"third_round\" WHERE \"country\"='united states' AND \"player\"='mike reid';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Name has a Position smaller than 2?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"main_round\" WHERE \"position\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Lost has a Position larger than 2, a Name of sg m\u00fcnchen (n), and a Drawn larger than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"lost\") FROM \"main_round\" WHERE \"position\">2 AND \"name\"='sg m\u00fcnchen (n)' AND \"drawn\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Drawn has a Position of 2, and a Lost larger than 2?" }, { "role": "assistant", "content": "SELECT MIN(\"drawn\") FROM \"main_round\" WHERE \"position\"=2 AND \"lost\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Played has a Position of 3, and a Points smaller than 15?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"main_round\" WHERE \"position\"=3 AND \"points\"<15;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Which Played has a Position larger than 5, a Points larger than 0, and a Drawn smaller than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"main_round\" WHERE \"position\">5 AND \"points\">0 AND \"drawn\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score when Miami is the visitor?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"april\" WHERE \"visitor\"='miami';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: For the game that was 76-85, what was the record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"april\" WHERE \"score\"='76-85';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: On April 18, which team was the visitor?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"april\" WHERE \"date\"='april 18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the leading scorer on April 7?" }, { "role": "assistant", "content": "SELECT \"leading_scorer\" FROM \"april\" WHERE \"date\"='april 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Where was the home court on April 14?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"april\" WHERE \"date\"='april 14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the boston celtics' record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"season_schedule\" WHERE \"team\"='boston celtics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Score has a Record of 9\u20138?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"season_schedule\" WHERE \"record\"='9\u20138';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Date has a Streak of loss 2, and a Team of @ boston celtics?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"streak\"='loss 2' AND \"team\"='@ boston celtics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which Date has a Streak of win 1, and a Record of 8\u20134?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"streak\"='win 1' AND \"record\"='8\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What was the top score for grier jones?" }, { "role": "assistant", "content": "SELECT MAX(\"score\") FROM \"first_round\" WHERE \"player\"='grier jones';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which To par is scored at 70?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"score\"=70;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: In what place did hubert green score below 70 in the united states?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"first_round\" WHERE \"score\"<70 AND \"country\"='united states' AND \"player\"='hubert green';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"riders\" (\n \"position\" real,\n \"driver_passenger\" text,\n \"equipment\" text,\n \"bike_no\" real,\n \"points\" real\n);\n\nQuestion: Which Driver and passenger have a bike number of less than 4 with zabel -vmc equipment?" }, { "role": "assistant", "content": "SELECT \"driver_passenger\" FROM \"riders\" WHERE \"bike_no\"<4 AND \"equipment\"='zabel -vmc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"place\" real,\n \"competitor\" text,\n \"downhill\" real,\n \"slalom\" real,\n \"average\" real\n);\n\nQuestion: What's the slalom when the average time was greater than 99.25?" }, { "role": "assistant", "content": "SELECT AVG(\"slalom\") FROM \"final_standings\" WHERE \"average\">99.25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_standings\" (\n \"place\" real,\n \"competitor\" text,\n \"downhill\" real,\n \"slalom\" real,\n \"average\" real\n);\n\nQuestion: Where was the place that the downhill was 71.6 and the average was less than 90.06?" }, { "role": "assistant", "content": "SELECT SUM(\"place\") FROM \"final_standings\" WHERE \"average\"<90.06 AND \"downhill\"=71.6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is ICAO, when Airport is \"Sibulan Airport\"?" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"references\" WHERE \"airport\"='sibulan airport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is ICAO, when IATA is \"HKG\"?" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"references\" WHERE \"iata\"='hkg';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is IATA, when ICAO is \"VHHH\"?" }, { "role": "assistant", "content": "SELECT \"iata\" FROM \"references\" WHERE \"icao\"='vhhh';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is City, when IATA is \"LAO\"?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"references\" WHERE \"iata\"='lao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is Country, when City is \"Zamboanga\"?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"references\" WHERE \"city\"='zamboanga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the highest number drawn when the position was 12?" }, { "role": "assistant", "content": "SELECT MAX(\"drawn\") FROM \"final_table\" WHERE \"position\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the highest number of goals against when the number of goals were 55 and the difference was +24?" }, { "role": "assistant", "content": "SELECT MAX(\"goals_against\") FROM \"final_table\" WHERE \"goals_for\">55 AND \"goal_difference\"='+24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the average number lost for hyde united when they had a smaller position than 17, 8 draws, and more than 57 goals against?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"final_table\" WHERE \"goals_against\">57 AND \"position\"<17 AND \"drawn\"=8 AND \"team\"='hyde united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the highest played when there was less than 74 goals against and points 1 of 36 2?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"final_table\" WHERE \"points_1\"='36 2' AND \"goals_against\"<74;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"farra\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: How long is the diameter that has a longitude of 8.0e?" }, { "role": "assistant", "content": "SELECT \"diameter_km\" FROM \"farra\" WHERE \"longitude\"='8.0e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"farra\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: What name was given in 1994 when the diameter (km) was larger than 125 and the latitude was 30.0s?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"farra\" WHERE \"year_named\"=1994 AND \"diameter_km\">125 AND \"latitude\"='30.0s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"farra\" (\n \"name\" text,\n \"latitude\" text,\n \"longitude\" text,\n \"diameter_km\" real,\n \"year_named\" real\n);\n\nQuestion: What is the longitude of Carmenta Farra in 1994?" }, { "role": "assistant", "content": "SELECT \"longitude\" FROM \"farra\" WHERE \"year_named\"=1994 AND \"name\"='carmenta farra';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Name the No. 5 which has a No. 6 of ethan, and a No. 4 of william, and a No. 9 of john?" }, { "role": "assistant", "content": "SELECT \"no_5\" FROM \"male_names\" WHERE \"no_6\"='ethan' AND \"no_4\"='william' AND \"no_9\"='john';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Name the No. 2 which has a No. 3 of jacob, and a No. 10 of wyatt, and a No. 6 of ethan?" }, { "role": "assistant", "content": "SELECT \"no_2\" FROM \"male_names\" WHERE \"no_3\"='jacob' AND \"no_10\"='wyatt' AND \"no_6\"='ethan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Name the No. 3 which has a No. 7 of logan, and a No. 5 of jackson?" }, { "role": "assistant", "content": "SELECT \"no_3\" FROM \"male_names\" WHERE \"no_7\"='logan' AND \"no_5\"='jackson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Name the No. 5 which has a No. 8 of logan, and a No. 10 of ethan, and a No. 4 of jacob?" }, { "role": "assistant", "content": "SELECT \"no_5\" FROM \"male_names\" WHERE \"no_8\"='logan' AND \"no_10\"='ethan' AND \"no_4\"='jacob';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Name the No. 8 which has a No. 4 of benjamin, and a No. 3 of liam?" }, { "role": "assistant", "content": "SELECT \"no_8\" FROM \"male_names\" WHERE \"no_4\"='benjamin' AND \"no_3\"='liam';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"male_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Name the No. 10 which has a No. 8 of jackson, and a No. 9 of jayden?" }, { "role": "assistant", "content": "SELECT \"no_10\" FROM \"male_names\" WHERE \"no_8\"='jackson' AND \"no_9\"='jayden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_mexico\" (\n \"poll_source\" text,\n \"sample_size\" real,\n \"date\" text,\n \"democrat\" text,\n \"republican\" text\n);\n\nQuestion: What was the date for Ron Paul as republican and a sample sized less than 472?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"new_mexico\" WHERE \"sample_size\"<472 AND \"republican\"='ron paul';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_mexico\" (\n \"poll_source\" text,\n \"sample_size\" real,\n \"date\" text,\n \"democrat\" text,\n \"republican\" text\n);\n\nQuestion: Who was the Democrat when the Republican was Mike Huckabee, and the sample size was less than 495?" }, { "role": "assistant", "content": "SELECT \"democrat\" FROM \"new_mexico\" WHERE \"sample_size\"<495 AND \"republican\"='mike huckabee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the attendance in week 9?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"week\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What week had attendance of 52,714?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"attendance\"='52,714';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the gold when silver is 1, event is 2000 summer paralympics and bronze is more than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"summer_paralympics\" WHERE \"silver\"=1 AND \"event\"='2000 summer paralympics' AND \"bronze\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: how many times is bronze 2 and gold more than 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"summer_paralympics\" WHERE \"bronze\"=2 AND \"gold\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the highest gold when silver is 1 and bronze is less than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"summer_paralympics\" WHERE \"silver\"=1 AND \"bronze\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the highest bronze when silver is less than 1 and gold is more than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"summer_paralympics\" WHERE \"silver\"<1 AND \"gold\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summer_paralympics\" (\n \"event\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the most silver when the event is 2008 summer paralympics and bronze is less than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"summer_paralympics\" WHERE \"event\"='2008 summer paralympics' AND \"bronze\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"release_date\" text,\n \"album_title\" text,\n \"record_label\" text,\n \"disc_number\" text,\n \"track_number\" text,\n \"title\" text\n);\n\nQuestion: Which Album title has a Title of \u6ed1\u677f?" }, { "role": "assistant", "content": "SELECT \"album_title\" FROM \"discography\" WHERE \"title\"='\u6ed1\u677f';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"release_date\" text,\n \"album_title\" text,\n \"record_label\" text,\n \"disc_number\" text,\n \"track_number\" text,\n \"title\" text\n);\n\nQuestion: Which Record label has a Title of \u8bc0\u522b\u8bd7?" }, { "role": "assistant", "content": "SELECT \"record_label\" FROM \"discography\" WHERE \"title\"='\u8bc0\u522b\u8bd7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"release_date\" text,\n \"album_title\" text,\n \"record_label\" text,\n \"disc_number\" text,\n \"track_number\" text,\n \"title\" text\n);\n\nQuestion: Which Track number has a Album title of \u6587\u6b66\u53cc\u5168\u5347\u7ea7\u7248, and a Title of \u8001\u7238\u4f60\u522b\u88c5\u9177?" }, { "role": "assistant", "content": "SELECT \"track_number\" FROM \"discography\" WHERE \"album_title\"='\u6587\u6b66\u53cc\u5168\u5347\u7ea7\u7248' AND \"title\"='\u8001\u7238\u4f60\u522b\u88c5\u9177';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"release_date\" text,\n \"album_title\" text,\n \"record_label\" text,\n \"disc_number\" text,\n \"track_number\" text,\n \"title\" text\n);\n\nQuestion: What kind of Disc number has a Track number of 02 on 7 september 2004?" }, { "role": "assistant", "content": "SELECT \"disc_number\" FROM \"discography\" WHERE \"track_number\"='02' AND \"release_date\"='7 september 2004';" } ]