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 \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the Time/Retired for emerson fittipaldi?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"driver\"='emerson fittipaldi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" text,\n \"avg\" text,\n \"td_s\" real,\n \"long\" text\n);\n\nQuestion: What is the long for the player with 26 carries?" }, { "role": "assistant", "content": "SELECT \"long\" FROM \"running_backs\" WHERE \"car\"=26;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" text,\n \"avg\" text,\n \"td_s\" real,\n \"long\" text\n);\n\nQuestion: How many carries for the player with a 2 yard long?" }, { "role": "assistant", "content": "SELECT COUNT(\"car\") FROM \"running_backs\" WHERE \"long\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" text,\n \"avg\" text,\n \"td_s\" real,\n \"long\" text\n);\n\nQuestion: What is the long for the player with under 30 carries and 0 yards?" }, { "role": "assistant", "content": "SELECT \"long\" FROM \"running_backs\" WHERE \"car\"<30 AND \"yards\"='0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"mlb_season\" text,\n \"reds_season\" real,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" real,\n \"losses\" real,\n \"winpct\" real,\n \"gb_c\" text\n);\n\nQuestion: How many wins were there in the 2000 season in the central division with less than 81 losses?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"seasons\" WHERE \"division\"='central' AND \"reds_season\"<2000 AND \"losses\"<81;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"mlb_season\" text,\n \"reds_season\" real,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" real,\n \"losses\" real,\n \"winpct\" real,\n \"gb_c\" text\n);\n\nQuestion: What was the lowest percentages of wins in 1989 with a GB [c] of 17?" }, { "role": "assistant", "content": "SELECT MIN(\"winpct\") FROM \"seasons\" WHERE \"gb_c\"='17' AND \"reds_season\"=1989;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"mlb_season\" text,\n \"reds_season\" real,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" real,\n \"losses\" real,\n \"winpct\" real,\n \"gb_c\" text\n);\n\nQuestion: How many losses did the 1943 MLB have?" }, { "role": "assistant", "content": "SELECT AVG(\"losses\") FROM \"seasons\" WHERE \"mlb_season\"='1943';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"mlb_season\" text,\n \"reds_season\" real,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" real,\n \"losses\" real,\n \"winpct\" real,\n \"gb_c\" text\n);\n\nQuestion: What was the lowest wins in a season less than 1915 with a 7th finish and 0.429 win %?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"seasons\" WHERE \"finish\"='7th' AND \"winpct\">0.429 AND \"reds_season\"<1915;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"mlb_season\" text,\n \"reds_season\" real,\n \"league\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" real,\n \"losses\" real,\n \"winpct\" real,\n \"gb_c\" text\n);\n\nQuestion: In 1900 with 62 wins and a win percentage less than 0.457, what was the GB [c]?" }, { "role": "assistant", "content": "SELECT \"gb_c\" FROM \"seasons\" WHERE \"winpct\"<0.457 AND \"wins\"=62 AND \"reds_season\"=1900;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: Which record has a score of 7\u20136 (12)?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='7\u20136 (12)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: On what date was the record 59\u201359?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='59\u201359';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What loss occurred on August 21?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='august 21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provincial_percentage_share_of_average_c\" (\n \"year\" text,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2005\" real,\n \"2000\" real,\n \"1995\" real,\n \"1990\" real,\n \"1985\" real\n);\n\nQuestion: What is the highest 1985 value that has a 1990 value of 93?" }, { "role": "assistant", "content": "SELECT MAX(\"1985\") FROM \"provincial_percentage_share_of_average_c\" WHERE \"1990\"=93;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provincial_percentage_share_of_average_c\" (\n \"year\" text,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2005\" real,\n \"2000\" real,\n \"1995\" real,\n \"1990\" real,\n \"1985\" real\n);\n\nQuestion: What is the highest 2000 value that has a 2010 value of 82 and a 2005 value less than 74?" }, { "role": "assistant", "content": "SELECT MAX(\"2000\") FROM \"provincial_percentage_share_of_average_c\" WHERE \"2010\"=82 AND \"2005\"<74;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provincial_percentage_share_of_average_c\" (\n \"year\" text,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2005\" real,\n \"2000\" real,\n \"1995\" real,\n \"1990\" real,\n \"1985\" real\n);\n\nQuestion: What is the 1995 value with a Jiangxi year and a 2008 value bigger than 67?" }, { "role": "assistant", "content": "SELECT SUM(\"1995\") FROM \"provincial_percentage_share_of_average_c\" WHERE \"year\"='jiangxi' AND \"2008\">67;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provincial_percentage_share_of_average_c\" (\n \"year\" text,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2005\" real,\n \"2000\" real,\n \"1995\" real,\n \"1990\" real,\n \"1985\" real\n);\n\nQuestion: What is the lowest 2009 value with a 2010 value of 141 and a 1985 value bigger than 165?" }, { "role": "assistant", "content": "SELECT MIN(\"2009\") FROM \"provincial_percentage_share_of_average_c\" WHERE \"2010\"=141 AND \"1985\">165;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provincial_percentage_share_of_average_c\" (\n \"year\" text,\n \"2010\" real,\n \"2009\" real,\n \"2008\" real,\n \"2005\" real,\n \"2000\" real,\n \"1995\" real,\n \"1990\" real,\n \"1985\" real\n);\n\nQuestion: What is the 1995 value with a 2005 value bigger than 74, a 2008 value of 84, and a 2000 value less than 80?" }, { "role": "assistant", "content": "SELECT SUM(\"1995\") FROM \"provincial_percentage_share_of_average_c\" WHERE \"2005\">74 AND \"2008\"=84 AND \"2000\"<80;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What is the date of the election where Sir Christopher William Codrington was elected as First Member and Robert Stayner Holford as the Second Member?" }, { "role": "assistant", "content": "SELECT \"election\" FROM \"members_of_parliament\" WHERE \"1st_member\"='sir christopher william codrington' AND \"2nd_member\"='robert stayner holford';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What is the Second Party where Sir Christopher William Codrington is the First Member and Hon. Francis Charteris is the Second Member?" }, { "role": "assistant", "content": "SELECT \"2nd_party\" FROM \"members_of_parliament\" WHERE \"1st_member\"='sir christopher william codrington' AND \"2nd_member\"='hon. francis charteris';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members_of_parliament\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What is the date of the election where Sir Christopher William Codrington is elected First Member and the second party is Conservative?" }, { "role": "assistant", "content": "SELECT \"election\" FROM \"members_of_parliament\" WHERE \"1st_member\"='sir christopher william codrington' AND \"2nd_party\"='conservative';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"compilations\" (\n \"year\" real,\n \"tracks\" text,\n \"title\" text,\n \"format_special_notes\" text,\n \"label\" text\n);\n\nQuestion: What label is after 2004?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"compilations\" WHERE \"year\">2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"compilations\" (\n \"year\" real,\n \"tracks\" text,\n \"title\" text,\n \"format_special_notes\" text,\n \"label\" text\n);\n\nQuestion: What is the Format and Special Notes for of the pact: ...of the gods?" }, { "role": "assistant", "content": "SELECT \"format_special_notes\" FROM \"compilations\" WHERE \"title\"='the pact: ...of the gods';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"compilations\" (\n \"year\" real,\n \"tracks\" text,\n \"title\" text,\n \"format_special_notes\" text,\n \"label\" text\n);\n\nQuestion: What movie has noxialicht as a track?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"compilations\" WHERE \"tracks\"='noxialicht';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_2006_2009\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest gold medals of a rank 12 team?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_table_2006_2009\" WHERE \"rank\"='12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_2006_2009\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of bronze medals of the team with more than 8 silvers and a total of 50 medals?" }, { "role": "assistant", "content": "SELECT COUNT(\"bronze\") FROM \"medal_table_2006_2009\" WHERE \"silver\">8 AND \"total\"=50;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table_2006_2009\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average gold medals Uzbekistan, which has less than 24 total medals, has?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table_2006_2009\" WHERE \"nation\"='uzbekistan' AND \"total\"<24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Which open cup was after 1993?" }, { "role": "assistant", "content": "SELECT \"open_cup\" FROM \"year_by_year\" WHERE \"year\">1993;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: Which year had playoffs of champion?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"year_by_year\" WHERE \"playoffs\"='champion';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" real,\n \"division\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"open_cup\" text\n);\n\nQuestion: What divisions was in the year 1993?" }, { "role": "assistant", "content": "SELECT \"division\" FROM \"year_by_year\" WHERE \"year\"=1993;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"air_movement_table_mission_albany\" (\n \"serial\" text,\n \"airborne_unit\" text,\n \"troop_carrier_group\" text,\n \"num_of_c_47s\" real,\n \"uk_base\" text,\n \"drop_zone\" text,\n \"drop_zone_time\" real\n);\n\nQuestion: Which UK base has 441st tcg Troop carrier group and 14 as their seir serial?" }, { "role": "assistant", "content": "SELECT \"uk_base\" FROM \"air_movement_table_mission_albany\" WHERE \"troop_carrier_group\"='441st tcg' AND \"serial\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"air_movement_table_mission_albany\" (\n \"serial\" text,\n \"airborne_unit\" text,\n \"troop_carrier_group\" text,\n \"num_of_c_47s\" real,\n \"uk_base\" text,\n \"drop_zone\" text,\n \"drop_zone_time\" real\n);\n\nQuestion: What is the Drop Zone time for the 439th tcg Troop Carrier Group with more tham 36 C-47s?" }, { "role": "assistant", "content": "SELECT \"drop_zone_time\" FROM \"air_movement_table_mission_albany\" WHERE \"troop_carrier_group\"='439th tcg' AND \"num_of_c_47s\">36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was the grid placement for the Maserati that completed 14 laps?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"classification\" WHERE \"constructor\"='maserati' AND \"laps\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What company built the car driven by Tony Brooks?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"classification\" WHERE \"driver\"='tony brooks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eastern_conference_quarter_finals_vs_1_n\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score on the date of May 2?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"eastern_conference_quarter_finals_vs_1_n\" WHERE \"date\"='may 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eastern_conference_quarter_finals_vs_1_n\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What city was a visitor on the date of April 30?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"eastern_conference_quarter_finals_vs_1_n\" WHERE \"date\"='april 30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eastern_conference_quarter_finals_vs_1_n\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: On the date of April 22, which city was a visitor?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"eastern_conference_quarter_finals_vs_1_n\" WHERE \"date\"='april 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"eastern_conference_quarter_finals_vs_1_n\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What visitor has Ottawa as a home and a date of April 26?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"eastern_conference_quarter_finals_vs_1_n\" WHERE \"home\"='ottawa' AND \"date\"='april 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: What is Paino Hehea's date of birth?" }, { "role": "assistant", "content": "SELECT \"date_of_birth_age\" FROM \"2007_rugby_world_cup_squads\" WHERE \"player\"='paino hehea';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: I want to know the location that has a record of 3-0" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='3-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Tell me the record for round more than 1" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"round\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: I want to know the method for opponent of jerry bohlander" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jerry bohlander';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"serie_a\" (\n \"season\" text,\n \"player\" text,\n \"nationality\" text,\n \"club\" text,\n \"goals\" text\n);\n\nQuestion: Who belongs to the Bologna Milan club?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"serie_a\" WHERE \"club\"='bologna milan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: Who is the opponent on June 6?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='june 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: What is the date of the game at Commerce Bank Ballpark?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"field\"='commerce bank ballpark';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: What is the result of the game at Bishop Kearney Field on August 2?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"field\"='bishop kearney field' AND \"date\"='august 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: Who was the opponent of the game at Homewood field?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"field\"='homewood field';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" text,\n \"field\" text,\n \"result\" text\n);\n\nQuestion: What is the result of the game at Bishop Kearney Field on August 2?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"field\"='bishop kearney field' AND \"date\"='august 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newcomers_race_a\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the time of the rider with a speed of 102.962mph?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"newcomers_race_a\" WHERE \"speed\"='102.962mph';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newcomers_race_a\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: Who is the rider who had the time of 1:27.37.22?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"newcomers_race_a\" WHERE \"time\"='1:27.37.22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"newcomers_race_a\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: Who is the rider who has a rank lower than 10, and a time of 1:26.31.20?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"newcomers_race_a\" WHERE \"rank\"<10 AND \"time\"='1:26.31.20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What date was the Circuit of Indianapolis?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_review\" WHERE \"circuit\"='indianapolis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Who was the Constructor at the Argentine Grand Prix?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"season_review\" WHERE \"race\"='argentine grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What was the date of the Circuit of Indianapolis?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_review\" WHERE \"circuit\"='indianapolis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Who was the winning driver of the Argentine Grand Prix?" }, { "role": "assistant", "content": "SELECT \"winning_driver\" FROM \"season_review\" WHERE \"race\"='argentine grand prix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What was Juan Manuel Fangio's reported pole position and the tire of C?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"season_review\" WHERE \"pole_position\"='juan manuel fangio' AND \"tyre\"='c';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the Attendance when the Home team was Montreal, on the Date of March 24?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"march\" WHERE \"home\"='montreal' AND \"date\"='march 24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the Score on March 15?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"march\" WHERE \"date\"='march 15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school does Dell Curry play for?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"c\" WHERE \"player\"='dell curry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school does John Crotty play for?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"c\" WHERE \"player\"='john crotty';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"c\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What school does Wayne Cooper play for?" }, { "role": "assistant", "content": "SELECT \"school_club_team\" FROM \"c\" WHERE \"player\"='wayne cooper';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" text,\n \"avg\" text,\n \"long\" real\n);\n\nQuestion: Who has greater than 8 Long and a 73 Yards?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"running_backs\" WHERE \"long\">8 AND \"yards\"='73';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" text,\n \"avg\" text,\n \"long\" real\n);\n\nQuestion: Who has a highest Long with 26 Yards and less than 9 Car?" }, { "role": "assistant", "content": "SELECT MAX(\"long\") FROM \"running_backs\" WHERE \"yards\"='26' AND \"car\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" text,\n \"avg\" text,\n \"long\" real\n);\n\nQuestion: Who has the highest Long with 59 Car?" }, { "role": "assistant", "content": "SELECT MAX(\"long\") FROM \"running_backs\" WHERE \"car\"=59;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_2007_uci_pro_tour_standings_a\" (\n \"rank\" real,\n \"previous_rank\" text,\n \"name\" text,\n \"nationality\" text,\n \"team\" text,\n \"points\" real\n);\n\nQuestion: Tell me the team with a rank less than 13 and points more than 79 and previous rank of 4" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"individual_2007_uci_pro_tour_standings_a\" WHERE \"rank\"<13 AND \"points\">79 AND \"previous_rank\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_2007_uci_pro_tour_standings_a\" (\n \"rank\" real,\n \"previous_rank\" text,\n \"name\" text,\n \"nationality\" text,\n \"team\" text,\n \"points\" real\n);\n\nQuestion: I want to know the sum of points with a previous rank of 3" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"individual_2007_uci_pro_tour_standings_a\" WHERE \"previous_rank\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_2007_uci_pro_tour_standings_a\" (\n \"rank\" real,\n \"previous_rank\" text,\n \"name\" text,\n \"nationality\" text,\n \"team\" text,\n \"points\" real\n);\n\nQuestion: Tell me the previous rank for italy with points more than 100" }, { "role": "assistant", "content": "SELECT \"previous_rank\" FROM \"individual_2007_uci_pro_tour_standings_a\" WHERE \"nationality\"='italy' AND \"points\">100;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_2007_uci_pro_tour_standings_a\" (\n \"rank\" real,\n \"previous_rank\" text,\n \"name\" text,\n \"nationality\" text,\n \"team\" text,\n \"points\" real\n);\n\nQuestion: Tell me the sum of rank for australia when points are less than 79" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"individual_2007_uci_pro_tour_standings_a\" WHERE \"nationality\"='australia' AND \"points\"<79;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"naval_forces_operation_mainbrace_1952_ci\" (\n \"nato_member\" text,\n \"aircraft_carriers\" text,\n \"battleships\" text,\n \"cruisers\" text,\n \"escorts\" text,\n \"submarines\" text,\n \"torpedo_boat_squadrons\" text,\n \"s_motor_ship_s_naval_trawler\" text,\n \"grand_total\" real\n);\n\nQuestion: How many ships for the nation with grand total of 20?" }, { "role": "assistant", "content": "SELECT \"s_motor_ship_s_naval_trawler\" FROM \"naval_forces_operation_mainbrace_1952_ci\" WHERE \"grand_total\"=20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"naval_forces_operation_mainbrace_1952_ci\" (\n \"nato_member\" text,\n \"aircraft_carriers\" text,\n \"battleships\" text,\n \"cruisers\" text,\n \"escorts\" text,\n \"submarines\" text,\n \"torpedo_boat_squadrons\" text,\n \"s_motor_ship_s_naval_trawler\" text,\n \"grand_total\" real\n);\n\nQuestion: How many escorts does the nation with 6 cruisers have?" }, { "role": "assistant", "content": "SELECT \"escorts\" FROM \"naval_forces_operation_mainbrace_1952_ci\" WHERE \"cruisers\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: Which address has 44 floors?" }, { "role": "assistant", "content": "SELECT \"street_address\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"=44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heavyweight_75_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the total for the person with 73.28 bodyweight and fewer snatches than 75?" }, { "role": "assistant", "content": "SELECT AVG(\"total_kg\") FROM \"heavyweight_75_kg\" WHERE \"bodyweight\"=73.28 AND \"snatch\"<75;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heavyweight_75_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: Which person has a bodyweight of 73.6?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"heavyweight_75_kg\" WHERE \"bodyweight\"=73.6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heavyweight_75_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the total for the player with more snatches than 87.5 and bodyweight more than 74.8?" }, { "role": "assistant", "content": "SELECT AVG(\"total_kg\") FROM \"heavyweight_75_kg\" WHERE \"snatch\">87.5 AND \"bodyweight\">74.8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heavyweight_75_kg\" (\n \"name\" text,\n \"bodyweight\" real,\n \"snatch\" real,\n \"clean_jerk\" real,\n \"total_kg\" real\n);\n\nQuestion: What is the bodyweight for the player with a clean & jerk of 82.5 and total smaller than 152.5?" }, { "role": "assistant", "content": "SELECT SUM(\"bodyweight\") FROM \"heavyweight_75_kg\" WHERE \"clean_jerk\"=82.5 AND \"total_kg\"<152.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the home team when the away team was essendon" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_10\" WHERE \"away_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the away team score for home team of university" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"home_team\"='university';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the venue for geelong away team" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_10\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the venue when the away team was richmond" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_10\" WHERE \"away_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_10\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Name the away team score for geelong away team" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_10\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the venue was brunswick street oval what was the home teams score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_3\" WHERE \"venue\"='brunswick street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the away team scored 10.15 (75) and the crowd was larger than 20,000 people, what was the home team playing?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_3\" WHERE \"crowd\">'20,000' AND \"away_team_score\"='10.15 (75)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the away team scored 7.8 (50), what was the opposing teams score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_3\" WHERE \"away_team_score\"='7.8 (50)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the away team scored 14.14 (98), who was the Home team who played?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_3\" WHERE \"away_team_score\"='14.14 (98)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_3\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: If the home team scored 14.15 (99), who was the away team?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_3\" WHERE \"home_team_score\"='14.15 (99)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_2_14_february_1999\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: How many draws feature artist wendy fierce?" }, { "role": "assistant", "content": "SELECT SUM(\"draw\") FROM \"semi_final_2_14_february_1999\" WHERE \"artist\"='wendy fierce';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_final_2_14_february_1999\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What song is later than place 2 and has a draw number of 1?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"semi_final_2_14_february_1999\" WHERE \"place\">2 AND \"draw\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day did Collingwood play as the home team?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_7\" WHERE \"home_team\"='collingwood';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team at Princes Park?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_7\" WHERE \"venue\"='princes park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was Hawthorn's away opponent?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_7\" WHERE \"home_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Name the record that has a stream of l1 and score of l 95\u2013111" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"march\" WHERE \"streak\"='l1' AND \"score\"='l 95\u2013111';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Name the attendance for when the washington wizards was visiting" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"march\" WHERE \"visitor\"='washington wizards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the smallest grid for driver of juan pablo montoya?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"driver\"='juan pablo montoya';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What driver has a ime/Retired of +1 lap, and a Constructor of bar - honda?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"time_retired\"='+1 lap' AND \"constructor\"='bar - honda';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2008\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: What is the Chinese title with a premiere rating of 31?" }, { "role": "assistant", "content": "SELECT \"chinese_title\" FROM \"highest_rating_drama_series_of_2008\" WHERE \"premiere\"=31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2008\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: What is the premiere rating for a Chinese title of \u91ce\u883b\u5976\u5976\u5927\u6230\u6208\u5e2b\u5976, and a Peak smaller than 41?" }, { "role": "assistant", "content": "SELECT SUM(\"premiere\") FROM \"highest_rating_drama_series_of_2008\" WHERE \"chinese_title\"='\u91ce\u883b\u5976\u5976\u5927\u6230\u6208\u5e2b\u5976' AND \"peak\"<41;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2008\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: What is the premiere rating associated with an average of 35 ranked above 1?" }, { "role": "assistant", "content": "SELECT MIN(\"premiere\") FROM \"highest_rating_drama_series_of_2008\" WHERE \"average\"=35 AND \"rank\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When was there a game at Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"round_5\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How big was the crowd when Richmond was the away team?" }, { "role": "assistant", "content": "SELECT \"crowd\" FROM \"round_5\" WHERE \"away_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team plays at Arden Street Oval?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_5\" WHERE \"venue\"='arden street oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How many fans were at Essendon?" }, { "role": "assistant", "content": "SELECT COUNT(\"crowd\") FROM \"round_5\" WHERE \"home_team\"='essendon';" } ]