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 \"submissions\" (\n \"year_ceremony\" text,\n \"english_title\" text,\n \"russian_title\" text,\n \"kazakh_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What year was Kelin nominated?" }, { "role": "assistant", "content": "SELECT \"year_ceremony\" FROM \"submissions\" WHERE \"english_title\"='kelin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round_sunday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"winnings\" real\n);\n\nQuestion: What was the to par score in the match that had a score of 76-71-78-67=292?" }, { "role": "assistant", "content": "SELECT COUNT(\"to_par\") FROM \"final_round_sunday\" WHERE \"score\"='76-71-78-67=292';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round_sunday\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"winnings\" real\n);\n\nQuestion: What is Robert Allenby's average to par score?" }, { "role": "assistant", "content": "SELECT AVG(\"to_par\") FROM \"final_round_sunday\" WHERE \"player\"='robert allenby';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Can you tell me the Tournament that has the 2009 of 1r, and the 2012 of w?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"mixed_doubles_performance_timeline\" WHERE \"2009\"='1r' AND \"2012\"='w';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Can you tell me the 2010 that has the 2008 of grand slam tournaments?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"mixed_doubles_performance_timeline\" WHERE \"2008\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Can you tell me the 2009 that has the 2011 of A?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"mixed_doubles_performance_timeline\" WHERE \"2011\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the to par for the player with total of 155?" }, { "role": "assistant", "content": "SELECT AVG(\"to_par\") FROM \"missed_the_cut\" WHERE \"total\"=155;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"notes\" text\n);\n\nQuestion: Who won Bronze with Notes of 2.5km, 16controls?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"women\" WHERE \"notes\"='2.5km, 16controls';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"notes\" text\n);\n\nQuestion: Who won Gold later than 2004 with Notes of 2.73km, 14controls?" }, { "role": "assistant", "content": "SELECT \"gold\" FROM \"women\" WHERE \"year\">2004 AND \"notes\"='2.73km, 14controls';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"notes\" text\n);\n\nQuestion: Who won Bronze with notes of 2.5km, 14controls?" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"women\" WHERE \"notes\"='2.5km, 14controls';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"notes\" text\n);\n\nQuestion: What are the Notes against a Silver for Jenny Johansson earlier than 2006?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"women\" WHERE \"year\"<2006 AND \"silver\"='jenny johansson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the Constituency number for Meerut?" }, { "role": "assistant", "content": "SELECT \"constituency_number\" FROM \"assembly_segments\" WHERE \"name\"='meerut';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the name for the constituency at number 48?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"assembly_segments\" WHERE \"constituency_number\"='48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: When bronze is more than 3, what is the rank?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"summary\" WHERE \"bronze\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: When rank is 7 and silver is less than 0, what is the total gold?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"summary\" WHERE \"rank\"='7' AND \"silver\"<0;" } ]
[ { "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);\n\nQuestion: What player is from Wales?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"third_round\" WHERE \"country\"='wales';" } ]
[ { "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);\n\nQuestion: What player scored 73-68-66=207?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='73-68-66=207';" } ]
[ { "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);\n\nQuestion: What Seve Ballesteros's score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"third_round\" WHERE \"player\"='seve ballesteros';" } ]
[ { "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);\n\nQuestion: What country is Craig Parry from?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='craig parry';" } ]
[ { "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);\n\nQuestion: What country has a score of 66-73-69=208?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='66-73-69=208';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: What is Road Team, when Result is \"74-71\"?" }, { "role": "assistant", "content": "SELECT \"road_team\" FROM \"nba_finals\" WHERE \"result\"='74-71';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: What is Result, when Date is \"April 3\"?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"nba_finals\" WHERE \"date\"='april 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: What is Game, when Road Team is \"Syracuse\", and when Result is \"96-89\"?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"nba_finals\" WHERE \"road_team\"='syracuse' AND \"result\"='96-89';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: What is Home Team, when Date is \"April 10\"?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"nba_finals\" WHERE \"date\"='april 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: What is Game, when Road Team is \"Syracuse\", and when Result is \"109-82\"?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"nba_finals\" WHERE \"road_team\"='syracuse' AND \"result\"='109-82';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: What is Road Team, when Date is \"April 10\"?" }, { "role": "assistant", "content": "SELECT \"road_team\" FROM \"nba_finals\" WHERE \"date\"='april 10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"overall_pick\" real,\n \"player\" text,\n \"school_club_team\" text,\n \"position\" text\n);\n\nQuestion: What was the earliest round with Neil Colzie and a pick smaller than 24?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"player\"='neil colzie' AND \"pick\"<24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"overall_pick\" real,\n \"player\" text,\n \"school_club_team\" text,\n \"position\" text\n);\n\nQuestion: What team had a pick of 24 and an overall pick of 310?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"nfl_draft\" WHERE \"pick\"=24 AND \"overall_pick\"=310;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score of the replay game when watford was the away team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"fifth_round_proper\" WHERE \"tie_no\"='replay' AND \"away_team\"='watford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fifth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the home team when walsall was the away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"fifth_round_proper\" WHERE \"away_team\"='walsall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1991_1992\" (\n \"date\" real,\n \"name\" text,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What is Name, when Venue is \"Hong Kong\"?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"1991_1992\" WHERE \"venue\"='hong kong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1991_1992\" (\n \"date\" real,\n \"name\" text,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What is Name, when Venue is \"Motherwell\"?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"1991_1992\" WHERE \"venue\"='motherwell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_champions\" (\n \"year\" real,\n \"name_of_tournament\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"score\" text\n);\n\nQuestion: In 1987, what is the Runners-up when Stefan Edberg is Champion?" }, { "role": "assistant", "content": "SELECT \"runners_up\" FROM \"singles_champions\" WHERE \"champions\"='stefan edberg' AND \"year\"=1987;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_champions\" (\n \"year\" real,\n \"name_of_tournament\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"score\" text\n);\n\nQuestion: What were the Runners-up prior to 1990 when Ivan Lendl was Champion in the Seiko Super Tennis Tournament?" }, { "role": "assistant", "content": "SELECT \"runners_up\" FROM \"singles_champions\" WHERE \"champions\"='ivan lendl' AND \"name_of_tournament\"='seiko super tennis' AND \"year\"<1990;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_champions\" (\n \"year\" real,\n \"name_of_tournament\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"score\" text\n);\n\nQuestion: In What Tournament did Boris Becker have a Score of 7\u20136, 6\u20134?" }, { "role": "assistant", "content": "SELECT \"name_of_tournament\" FROM \"singles_champions\" WHERE \"champions\"='boris becker' AND \"score\"='7\u20136, 6\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"knights_weapons_items_and_vehicles\" (\n \"knight\" text,\n \"weapon_item\" text,\n \"external_weapon\" text,\n \"shield_animal\" text,\n \"cart\" text\n);\n\nQuestion: What is the external weapon with the falcon shield animal?" }, { "role": "assistant", "content": "SELECT \"external_weapon\" FROM \"knights_weapons_items_and_vehicles\" WHERE \"shield_animal\"='falcon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"knights_weapons_items_and_vehicles\" (\n \"knight\" text,\n \"weapon_item\" text,\n \"external_weapon\" text,\n \"shield_animal\" text,\n \"cart\" text\n);\n\nQuestion: What cart has a serpent shield animal?" }, { "role": "assistant", "content": "SELECT \"cart\" FROM \"knights_weapons_items_and_vehicles\" WHERE \"shield_animal\"='serpent';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"knights_weapons_items_and_vehicles\" (\n \"knight\" text,\n \"weapon_item\" text,\n \"external_weapon\" text,\n \"shield_animal\" text,\n \"cart\" text\n);\n\nQuestion: What is the external weapon of knight zeke?" }, { "role": "assistant", "content": "SELECT \"external_weapon\" FROM \"knights_weapons_items_and_vehicles\" WHERE \"knight\"='zeke';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"knights_weapons_items_and_vehicles\" (\n \"knight\" text,\n \"weapon_item\" text,\n \"external_weapon\" text,\n \"shield_animal\" text,\n \"cart\" text\n);\n\nQuestion: What is the shield animal of knight phil?" }, { "role": "assistant", "content": "SELECT \"shield_animal\" FROM \"knights_weapons_items_and_vehicles\" WHERE \"knight\"='phil';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"knights_weapons_items_and_vehicles\" (\n \"knight\" text,\n \"weapon_item\" text,\n \"external_weapon\" text,\n \"shield_animal\" text,\n \"cart\" text\n);\n\nQuestion: What is the external weapon with a ramhead cart?" }, { "role": "assistant", "content": "SELECT \"external_weapon\" FROM \"knights_weapons_items_and_vehicles\" WHERE \"cart\"='ramhead cart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: On what date was the away team Sheffield Wednesday?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"away_team\"='sheffield wednesday';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the tie number for the game with an away team of Hartlepool United?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"fourth_round_proper\" WHERE \"away_team\"='hartlepool united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score in Tie number 16?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"king_s_commissioners\" (\n \"province\" text,\n \"commissioner\" text,\n \"assumed_office\" text,\n \"duration\" text,\n \"party\" text,\n \"born\" text\n);\n\nQuestion: What is the duration of the commissioner from the zeeland province?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"king_s_commissioners\" WHERE \"province\"='zeeland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: Which round has an H/A of H?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"fa_cup\" WHERE \"h_a\"='h';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: Rich round has an H/A of A and the opponent Sheffield United?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"fa_cup\" WHERE \"h_a\"='a' AND \"opponents\"='sheffield united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"counties_and_districts\" (\n \"mapnum\" real,\n \"county\" text,\n \"capital\" text,\n \"population_2008\" real,\n \"area\" text,\n \"created\" real\n);\n\nQuestion: What is the population (2008) when the capital was Sanniquellie, created later than 1964?" }, { "role": "assistant", "content": "SELECT SUM(\"population_2008\") FROM \"counties_and_districts\" WHERE \"capital\"='sanniquellie' AND \"created\">1964;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"counties_and_districts\" (\n \"mapnum\" real,\n \"county\" text,\n \"capital\" text,\n \"population_2008\" real,\n \"area\" text,\n \"created\" real\n);\n\nQuestion: What is the highest population (2008) created earlier than 1857, and the county was Sinoe?" }, { "role": "assistant", "content": "SELECT MAX(\"population_2008\") FROM \"counties_and_districts\" WHERE \"created\"<1857 AND \"county\"='sinoe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"counties_and_districts\" (\n \"mapnum\" real,\n \"county\" text,\n \"capital\" text,\n \"population_2008\" real,\n \"area\" text,\n \"created\" real\n);\n\nQuestion: What is the earliest created year when the map# was 10?" }, { "role": "assistant", "content": "SELECT MIN(\"created\") FROM \"counties_and_districts\" WHERE \"mapnum\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scotland_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What is the Venue of the game with a Score of 0\u20130?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"scotland_national_team\" WHERE \"score\"='0\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scotland_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What is the Venue of the Friendly Competition with a Score of 1\u20134?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"scotland_national_team\" WHERE \"competition\"='friendly' AND \"score\"='1\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scotland_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What is the Venue of the WCQ5 Competition?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"scotland_national_team\" WHERE \"competition\"='wcq5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scotland_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What is the Date of the Competition with a Score of 2\u20130?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"scotland_national_team\" WHERE \"score\"='2\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scotland_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What is the Venue of the Competition with a Score of 0\u20132?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"scotland_national_team\" WHERE \"score\"='0\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scotland_national_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What is the Venue of the Competition with a Score of 2\u20130?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"scotland_national_team\" WHERE \"score\"='2\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"systematic_multiples\" (\n \"symbol\" text,\n \"prefix\" text,\n \"si_meaning\" text,\n \"binary_meaning\" text,\n \"size_difference\" text\n);\n\nQuestion: What is the binary meaning for symbol p?" }, { "role": "assistant", "content": "SELECT \"binary_meaning\" FROM \"systematic_multiples\" WHERE \"symbol\"='p';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"systematic_multiples\" (\n \"symbol\" text,\n \"prefix\" text,\n \"si_meaning\" text,\n \"binary_meaning\" text,\n \"size_difference\" text\n);\n\nQuestion: What;s the SI Meaning for symbol m?" }, { "role": "assistant", "content": "SELECT \"si_meaning\" FROM \"systematic_multiples\" WHERE \"symbol\"='m';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"systematic_multiples\" (\n \"symbol\" text,\n \"prefix\" text,\n \"si_meaning\" text,\n \"binary_meaning\" text,\n \"size_difference\" text\n);\n\nQuestion: Which prefix has a binary meaning of 2 10 = 1024 1?" }, { "role": "assistant", "content": "SELECT \"prefix\" FROM \"systematic_multiples\" WHERE \"binary_meaning\"='2 10 = 1024 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"systematic_multiples\" (\n \"symbol\" text,\n \"prefix\" text,\n \"si_meaning\" text,\n \"binary_meaning\" text,\n \"size_difference\" text\n);\n\nQuestion: What is the size difference for exa?" }, { "role": "assistant", "content": "SELECT \"size_difference\" FROM \"systematic_multiples\" WHERE \"prefix\"='exa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"systematic_multiples\" (\n \"symbol\" text,\n \"prefix\" text,\n \"si_meaning\" text,\n \"binary_meaning\" text,\n \"size_difference\" text\n);\n\nQuestion: What is the size difference for the binary meaning of 2 70 = 1024 7?" }, { "role": "assistant", "content": "SELECT \"size_difference\" FROM \"systematic_multiples\" WHERE \"binary_meaning\"='2 70 = 1024 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" text,\n \"winner_s_share\" text\n);\n\nQuestion: What is the score of champion masahiro kawamura?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"winners\" WHERE \"champion\"='masahiro kawamura';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" text,\n \"winner_s_share\" text\n);\n\nQuestion: What dates was champion masahiro kawamura at the ibaraki country club tournament?" }, { "role": "assistant", "content": "SELECT \"dates\" FROM \"winners\" WHERE \"tournament_location\"='ibaraki country club' AND \"champion\"='masahiro kawamura';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" text,\n \"winner_s_share\" text\n);\n\nQuestion: What is the winner's share of champion hideto tanihara?" }, { "role": "assistant", "content": "SELECT \"winner_s_share\" FROM \"winners\" WHERE \"champion\"='hideto tanihara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"dates\" text,\n \"champion\" text,\n \"country\" text,\n \"score\" text,\n \"tournament_location\" text,\n \"purse\" text,\n \"winner_s_share\" text\n);\n\nQuestion: Who is the champion with a \u00a5200,000,000 purse?" }, { "role": "assistant", "content": "SELECT \"champion\" FROM \"winners\" WHERE \"purse\"='\u00a5200,000,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"draft\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text\n);\n\nQuestion: What round had Canada with a draft of 1970 and a pick of 7?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"draft_picks\" WHERE \"nationality\"='canada' AND \"draft\"<1970 AND \"pick\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"miss_universe\" (\n \"year\" real,\n \"delegate\" text,\n \"hometown\" text,\n \"placement_in_miss_universe\" text,\n \"other_awards\" text\n);\n\nQuestion: Which Placement in Miss Universe has a Delegate of janine mari raymundo tugonon?" }, { "role": "assistant", "content": "SELECT \"placement_in_miss_universe\" FROM \"miss_universe\" WHERE \"delegate\"='janine mari raymundo tugonon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"miss_universe\" (\n \"year\" real,\n \"delegate\" text,\n \"hometown\" text,\n \"placement_in_miss_universe\" text,\n \"other_awards\" text\n);\n\nQuestion: Which Placement in Miss Universe is armi barbara quiray crespo?" }, { "role": "assistant", "content": "SELECT \"placement_in_miss_universe\" FROM \"miss_universe\" WHERE \"delegate\"='armi barbara quiray crespo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"miss_universe\" (\n \"year\" real,\n \"delegate\" text,\n \"hometown\" text,\n \"placement_in_miss_universe\" text,\n \"other_awards\" text\n);\n\nQuestion: Which Delegate has a Placement in Miss Universe of fourth runner-up, and a Hometown of makati , rizal?" }, { "role": "assistant", "content": "SELECT \"delegate\" FROM \"miss_universe\" WHERE \"placement_in_miss_universe\"='fourth runner-up' AND \"hometown\"='makati , rizal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"miss_universe\" (\n \"year\" real,\n \"delegate\" text,\n \"hometown\" text,\n \"placement_in_miss_universe\" text,\n \"other_awards\" text\n);\n\nQuestion: What kind of Placement in Miss Universe that rosita cornell capuyon is in?" }, { "role": "assistant", "content": "SELECT \"placement_in_miss_universe\" FROM \"miss_universe\" WHERE \"delegate\"='rosita cornell capuyon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"miss_universe\" (\n \"year\" real,\n \"delegate\" text,\n \"hometown\" text,\n \"placement_in_miss_universe\" text,\n \"other_awards\" text\n);\n\nQuestion: Which Year jennifer tarol barrientos is in?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"miss_universe\" WHERE \"delegate\"='jennifer tarol barrientos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"major_competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" real\n);\n\nQuestion: WHAT YEAR WAS THE WORLD CHAMPIONSHIPS IN WITH NOTES OF 39.01?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"major_competition_record\" WHERE \"competition\"='world championships' AND \"notes\"=39.01;" } ]
[ { "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\" text,\n \"money\" real\n);\n\nQuestion: What's the sum of money ($) that angela park has won?" }, { "role": "assistant", "content": "SELECT SUM(\"money\") FROM \"final_round\" WHERE \"player\"='angela park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_football_league\" (\n \"year\" text,\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"position\" text,\n \"nfl_team\" text\n);\n\nQuestion: What number was the pick for the position of DT in 1952, after round 1, where the overall was less than 155?" }, { "role": "assistant", "content": "SELECT \"pick\" FROM \"national_football_league\" WHERE \"position\"='dt' AND \"round\">1 AND \"overall\"<155 AND \"year\"='1952';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"national_football_league\" (\n \"year\" text,\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"position\" text,\n \"nfl_team\" text\n);\n\nQuestion: Which NFL team chose a position of DE when the pick was larger than 9, after round 5, and the overal was larger than 118?" }, { "role": "assistant", "content": "SELECT \"nfl_team\" FROM \"national_football_league\" WHERE \"overall\">118 AND \"pick\">9 AND \"round\">5 AND \"position\"='de';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is 2006, when 2007 is \"1R\", and when 2002 is \"Q2\"?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"singles_performance_timeline\" WHERE \"2007\"='1r' AND \"2002\"='q2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is 2001, when 2007 is \"1R\", and when 2008 is \"Q1\"?" }, { "role": "assistant", "content": "SELECT \"2001\" FROM \"singles_performance_timeline\" WHERE \"2007\"='1r' AND \"2008\"='q1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is Tournament, when 2003 is \"A\"?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2003\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is 2012, when Tournament is \"French Open\"?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='french open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is Tournament, when 2012 is \"Grand Slam Tournaments\"?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"2012\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is 2004, when 2010 is \"Grand Slam Tournaments\"?" }, { "role": "assistant", "content": "SELECT \"2004\" FROM \"singles_performance_timeline\" WHERE \"2010\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" real\n);\n\nQuestion: Which Member has an Electorate of southern melbourne?" }, { "role": "assistant", "content": "SELECT \"member\" FROM \"notes\" WHERE \"electorate\"='southern melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"notes\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"first_elected\" real\n);\n\nQuestion: When was H.B. Higgins first elected?" }, { "role": "assistant", "content": "SELECT \"first_elected\" FROM \"notes\" WHERE \"member\"='h.b. higgins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the highest number of byes when draws are larger than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"byes\") FROM \"2011_ladder\" WHERE \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the lowest amount of losses when the goldne rivers is quambatook, wins are smaller than 15 and draws larger than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"losses\") FROM \"2011_ladder\" WHERE \"wins\"<15 AND \"golden_rivers\"='quambatook' AND \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many losses did the golden rivers of ultima have when wins were less than 12 and byes larger than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"losses\") FROM \"2011_ladder\" WHERE \"wins\"<12 AND \"golden_rivers\"='ultima' AND \"byes\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many losses did the Golden rivers of hay have?" }, { "role": "assistant", "content": "SELECT AVG(\"losses\") FROM \"2011_ladder\" WHERE \"golden_rivers\"='hay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of byes when the wins were 9?" }, { "role": "assistant", "content": "SELECT COUNT(\"byes\") FROM \"2011_ladder\" WHERE \"wins\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is th average dras when wins are less than 12 and the against is 989?" }, { "role": "assistant", "content": "SELECT AVG(\"draws\") FROM \"2011_ladder\" WHERE \"against\"=989 AND \"wins\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_class\" (\n \"class\" text,\n \"seas\" text,\n \"1st_gp\" text,\n \"1st_pod\" text,\n \"1st_win\" text,\n \"race\" real,\n \"podiums\" real,\n \"pole\" real,\n \"f_lap\" real,\n \"w_chmp\" real\n);\n\nQuestion: What is the highest pole for class 125 cc and a WChmp more than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"pole\") FROM \"by_class\" WHERE \"class\"='125 cc' AND \"w_chmp\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_class\" (\n \"class\" text,\n \"seas\" text,\n \"1st_gp\" text,\n \"1st_pod\" text,\n \"1st_win\" text,\n \"race\" real,\n \"podiums\" real,\n \"pole\" real,\n \"f_lap\" real,\n \"w_chmp\" real\n);\n\nQuestion: What is the highest flap for class 500 cc?" }, { "role": "assistant", "content": "SELECT MAX(\"f_lap\") FROM \"by_class\" WHERE \"class\"='500 cc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real,\n \"league_position\" text\n);\n\nQuestion: Name the Result F \u2013 A that has a League position of 1st on 4 january 1994?" }, { "role": "assistant", "content": "SELECT \"result_f_a\" FROM \"fa_premier_league\" WHERE \"league_position\"='1st' AND \"date\"='4 january 1994';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"months\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"abbr\" text,\n \"transcription\" text,\n \"sanskrit_word\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: What is the Thai name for the word abbreviated \u0e21\u0e35.\u0e04.?" }, { "role": "assistant", "content": "SELECT \"thai_name\" FROM \"months\" WHERE \"abbr\"='\u0e21\u0e35.\u0e04.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"months\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"abbr\" text,\n \"transcription\" text,\n \"sanskrit_word\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: What is the English word that is abbreviated \u0e1e.\u0e22.?" }, { "role": "assistant", "content": "SELECT \"english_name\" FROM \"months\" WHERE \"abbr\"='\u0e1e.\u0e22.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"months\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"abbr\" text,\n \"transcription\" text,\n \"sanskrit_word\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: What is the transcription for the English word March?" }, { "role": "assistant", "content": "SELECT \"transcription\" FROM \"months\" WHERE \"english_name\"='march';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"months\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"abbr\" text,\n \"transcription\" text,\n \"sanskrit_word\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: What is the zodiac sign for the English March?" }, { "role": "assistant", "content": "SELECT \"zodiac_sign\" FROM \"months\" WHERE \"english_name\"='march';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"months\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"abbr\" text,\n \"transcription\" text,\n \"sanskrit_word\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: What is the abbreviation for the sign of Capricorn?" }, { "role": "assistant", "content": "SELECT \"abbr\" FROM \"months\" WHERE \"zodiac_sign\"='capricorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"months\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"abbr\" text,\n \"transcription\" text,\n \"sanskrit_word\" text,\n \"zodiac_sign\" text\n);\n\nQuestion: What is the transcription for the English March?" }, { "role": "assistant", "content": "SELECT \"transcription\" FROM \"months\" WHERE \"english_name\"='march';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5_6\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What date was the 1988 world group i edition with a result of 7\u20136 (7\u20135) , 6\u20133?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_5_6\" WHERE \"edition\"='1988 world group i' AND \"result\"='7\u20136 (7\u20135) , 6\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5_6\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Who was the opponent on april 24, 1999?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_5_6\" WHERE \"date\"='april 24, 1999';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5_6\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What's the result for the clay surface edition on july 17, 1992?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"singles_5_6\" WHERE \"surface\"='clay' AND \"date\"='july 17, 1992';" } ]