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 \"january\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: On what date does visiting team Minnesota score higher than 47 points?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"january\" WHERE \"points\">47 AND \"visitor\"='minnesota';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What date does visitor team Toronto score less than 49 points and has record of 18-17-7?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"january\" WHERE \"visitor\"='toronto' AND \"points\"<49 AND \"record\"='18-17-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"retired_fleet\" (\n \"year\" text,\n \"model\" text,\n \"length\" text,\n \"width\" text,\n \"fleet_number\" text\n);\n\nQuestion: What is the fleet number for the model of Gillig Phantom 3096TB?" }, { "role": "assistant", "content": "SELECT \"fleet_number\" FROM \"retired_fleet\" WHERE \"model\"='gillig phantom 3096tb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"retired_fleet\" (\n \"year\" text,\n \"model\" text,\n \"length\" text,\n \"width\" text,\n \"fleet_number\" text\n);\n\nQuestion: What is the width for the year of the 1970?" }, { "role": "assistant", "content": "SELECT \"width\" FROM \"retired_fleet\" WHERE \"year\"='1970';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"retired_fleet\" (\n \"year\" text,\n \"model\" text,\n \"length\" text,\n \"width\" text,\n \"fleet_number\" text\n);\n\nQuestion: Which year has a fleet number of 603?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"retired_fleet\" WHERE \"fleet_number\"='603';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"retired_fleet\" (\n \"year\" text,\n \"model\" text,\n \"length\" text,\n \"width\" text,\n \"fleet_number\" text\n);\n\nQuestion: What is the length of fleet number 501-506?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"retired_fleet\" WHERE \"fleet_number\"='501-506';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"retired_fleet\" (\n \"year\" text,\n \"model\" text,\n \"length\" text,\n \"width\" text,\n \"fleet_number\" text\n);\n\nQuestion: What is fleet number for the year of 19xx?" }, { "role": "assistant", "content": "SELECT \"fleet_number\" FROM \"retired_fleet\" WHERE \"year\"='19xx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"retired_fleet\" (\n \"year\" text,\n \"model\" text,\n \"length\" text,\n \"width\" text,\n \"fleet_number\" text\n);\n\nQuestion: What is the fleet number of Model Orion 01.507?" }, { "role": "assistant", "content": "SELECT \"fleet_number\" FROM \"retired_fleet\" WHERE \"model\"='orion 01.507';" } ]
[ { "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 \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the highest round of Ed Smith, who had a pick higher than 261 and played halfback?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"pick\"<261 AND \"position\"='halfback' AND \"player\"='ed smith';" } ]
[ { "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 \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the lowest round of Ed Smith, who had a pick lower than 19?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"player\"='ed smith' AND \"pick\">19;" } ]
[ { "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 \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player had a round of 27?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"round\"=27;" } ]
[ { "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 \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the position of the player with a round less than 20 from the school/club Washington?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"round\"<20 AND \"school_club_team\"='washington';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Location of hemisfair arena had what record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"location\"='hemisfair arena';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Record of 20\u20134 involved what highest game?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"record\"='20\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Opponent of @ phoenix suns had what sum of game?" }, { "role": "assistant", "content": "SELECT SUM(\"game\") FROM \"game_log\" WHERE \"opponent\"='@ phoenix suns';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Score of 122\u2013105 had what record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='122\u2013105';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_champion_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: In the final, who are the opponents of partner Simon Aspelin?" }, { "role": "assistant", "content": "SELECT \"opponents_in_the_final\" FROM \"doubles_champion_6\" WHERE \"partner\"='simon aspelin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_champion_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: For the tournament played on 26 February 2006, what surface was used?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_champion_6\" WHERE \"date\"='26 february 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which Date has a Record of 58\u201310?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='58\u201310';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which Date has a Score of 106\u2013112?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='106\u2013112';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who was second when Martynas Norkus was the skip?" }, { "role": "assistant", "content": "SELECT \"second\" FROM \"group_b2\" WHERE \"skip\"='martynas norkus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who was the second when Ilian Kirilov was the lead?" }, { "role": "assistant", "content": "SELECT \"second\" FROM \"group_b2\" WHERE \"lead\"='ilian kirilov';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who was the lead when Jamie Meikle was the skip?" }, { "role": "assistant", "content": "SELECT \"lead\" FROM \"group_b2\" WHERE \"skip\"='jamie meikle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who was the lead when Ritvars Gulbis was the skip?" }, { "role": "assistant", "content": "SELECT \"lead\" FROM \"group_b2\" WHERE \"skip\"='ritvars gulbis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: Who came in third in England?" }, { "role": "assistant", "content": "SELECT \"third\" FROM \"group_b2\" WHERE \"nation\"='england';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b2\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text\n);\n\nQuestion: In what nation did Darko Sovran place third?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"group_b2\" WHERE \"third\"='darko sovran';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the tournament with a w/o score on November 5, 2007?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_titles_14\" WHERE \"score\"='w/o' AND \"date\"='november 5, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the surface of eckental tournament with a w/o score?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_titles_14\" WHERE \"tournament\"='eckental' AND \"score\"='w/o';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the tournament with a hard surface and Ruben de Kleijn as the opponent?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_titles_14\" WHERE \"surface\"='hard' AND \"opponent\"='ruben de kleijn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the score of the tournament on November 5, 2007 with a carpet surface?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_titles_14\" WHERE \"surface\"='carpet' AND \"date\"='november 5, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles_14\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the surface of the tournament with Sascha Kloer as the opponent?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_titles_14\" WHERE \"opponent\"='sascha kloer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_1993_94\" text\n);\n\nQuestion: what team scored in gomel" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"teams_and_venues\" WHERE \"location\"='gomel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the average conceded number of the team with a position lower than 8 and more than 2 wins?" }, { "role": "assistant", "content": "SELECT AVG(\"conceded\") FROM \"torneo_apertura\" WHERE \"position\">8 AND \"wins\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the averaged scored number of team guaran\u00ed, which has less than 6 draws and less than 5 losses?" }, { "role": "assistant", "content": "SELECT AVG(\"scored\") FROM \"torneo_apertura\" WHERE \"draws\"<6 AND \"team\"='guaran\u00ed' AND \"losses\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the total number scored of the team positioned lower than 10?" }, { "role": "assistant", "content": "SELECT COUNT(\"scored\") FROM \"torneo_apertura\" WHERE \"position\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest number of wins of the team with less than 24 scored, 27 conceded, and more than 18 played?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"torneo_apertura\" WHERE \"scored\"<24 AND \"conceded\"=27 AND \"played\">18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest number of points of the team with 2 losses and a lower than 1 position?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"torneo_apertura\" WHERE \"losses\"=2 AND \"position\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazilian_clubs_in_international_competi\" (\n \"team\" text,\n \"copa_libertadores_1993\" text,\n \"supercopa_sudamericana_1993\" text,\n \"copa_conmebol_1993\" text,\n \"recopa_sudamericana_1993\" text,\n \"intercontinental_cup_1993\" text\n);\n\nQuestion: What is the Intercontinental Cup 1993 result for a Supercopa Sudamericana 1993 result of round of 16?" }, { "role": "assistant", "content": "SELECT \"intercontinental_cup_1993\" FROM \"brazilian_clubs_in_international_competi\" WHERE \"supercopa_sudamericana_1993\"='round of 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who received the Loss during the game with an Attendance larger than 50,589 and a Record of 71\u201357?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"attendance\">'50,589' AND \"record\"='71\u201357';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"november\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the earliest game in November with more than 22 Games and Toronto Maple Leafs as the Opponent?" }, { "role": "assistant", "content": "SELECT MIN(\"november\") FROM \"regular_season\" WHERE \"game\">22 AND \"opponent\"='toronto maple leafs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wii_version\" (\n \"song_title\" text,\n \"artist\" text,\n \"decade\" text,\n \"genre\" text,\n \"family_friendly\" text\n);\n\nQuestion: What is the family friendly status of the punk genre song from the 1970s?" }, { "role": "assistant", "content": "SELECT \"family_friendly\" FROM \"wii_version\" WHERE \"decade\"='1970s' AND \"genre\"='punk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wii_version\" (\n \"song_title\" text,\n \"artist\" text,\n \"decade\" text,\n \"genre\" text,\n \"family_friendly\" text\n);\n\nQuestion: Who is the artist of the rock song?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"wii_version\" WHERE \"genre\"='rock';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest number of bronze medals for nations with under 0 golds?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_36_drake_4\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many points did Stuart have when he had 0 extra points?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"michigan_36_drake_4\" WHERE \"player\"='stuart' AND \"extra_points\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_36_drake_4\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Who had the lowest field goals but had 10 points and more than 2 touchdowns?" }, { "role": "assistant", "content": "SELECT MIN(\"field_goals\") FROM \"michigan_36_drake_4\" WHERE \"points\"=10 AND \"touchdowns\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_36_drake_4\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many points did Stuart have when he had less than 1 touchdown?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"michigan_36_drake_4\" WHERE \"player\"='stuart' AND \"touchdowns\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_36_drake_4\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Who had a points average with 0 extra points and 0 field goals?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"michigan_36_drake_4\" WHERE \"extra_points\"=0 AND \"field_goals\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"event\" text,\n \"award\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What was the result in the Golden Reel Awards?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"awards\" WHERE \"event\"='golden reel awards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Record of 16\u201329 is how many attendance?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"record\"='16\u201329';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Loss of peavy (4\u20133) is what score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='peavy (4\u20133)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Score of 3\u20132, and a Opponent of reds had what sum of attendance?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"score\"='3\u20132' AND \"opponent\"='reds';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Score of 6\u20134, and a Opponent of @ marlins had what record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='6\u20134' AND \"opponent\"='@ marlins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which Cuts made has a Tournament of totals, and Wins smaller than 11?" }, { "role": "assistant", "content": "SELECT AVG(\"cuts_made\") FROM \"summary\" WHERE \"tournament\"='totals' AND \"wins\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which Top-25 has a Top-5 smaller than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"top_25\") FROM \"summary\" WHERE \"top_5\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which Top-25 has a Top-5 larger than 9, and Wins smaller than 11?" }, { "role": "assistant", "content": "SELECT SUM(\"top_25\") FROM \"summary\" WHERE \"top_5\">9 AND \"wins\"<11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which Top-5 is the highest one that has Wins of 0, and Events larger than 6?" }, { "role": "assistant", "content": "SELECT MAX(\"top_5\") FROM \"summary\" WHERE \"wins\"=0 AND \"events\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which Top-5 is the lowest one that has Cuts made of 10, and Events larger than 10?" }, { "role": "assistant", "content": "SELECT MIN(\"top_5\") FROM \"summary\" WHERE \"cuts_made\"=10 AND \"events\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: Which Events is the highest one that has a Top-10 larger than 7, and Wins smaller than 2?" }, { "role": "assistant", "content": "SELECT MAX(\"events\") FROM \"summary\" WHERE \"top_10\">7 AND \"wins\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_12_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: When the surface is clay, and the tournament of barcelona what is the score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_18_12_6\" WHERE \"surface\"='clay' AND \"tournament\"='barcelona';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_12_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the surface when the opponent was judith wiesner, and the outcome was winner?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"singles_18_12_6\" WHERE \"outcome\"='winner' AND \"opponent\"='judith wiesner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_12_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the opponent for the tournament of rio de janeiro?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_18_12_6\" WHERE \"tournament\"='rio de janeiro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_12_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the opponent with the outcome of runner-up with a date of 19 september 1994?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_18_12_6\" WHERE \"outcome\"='runner-up' AND \"date\"='19 september 1994';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_18_12_6\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the opponent for the tournament of taranto?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_18_12_6\" WHERE \"tournament\"='taranto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_calendar\" (\n \"date\" text,\n \"round\" text,\n \"circuit\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"report\" text\n);\n\nQuestion: Who had the fastest lap where Joan Lascorz was the winner?" }, { "role": "assistant", "content": "SELECT \"fastest_lap\" FROM \"season_calendar\" WHERE \"race_winner\"='joan lascorz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_calendar\" (\n \"date\" text,\n \"round\" text,\n \"circuit\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"report\" text\n);\n\nQuestion: Who won the round in Europe?" }, { "role": "assistant", "content": "SELECT \"race_winner\" FROM \"season_calendar\" WHERE \"round\"='europe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: How many games have a Score of 3\u20130, and a January larger than 12?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"regular_season\" WHERE \"score\"='3\u20130' AND \"january\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Opponent has a January larger than 8, and a Game smaller than 48, and a Score of 5\u20133?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"january\">8 AND \"game\"<48 AND \"score\"='5\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game is the highest that has a January of 28?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"regular_season\" WHERE \"january\"=28;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Score has a Game larger than 47, and a January smaller than 25?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"game\">47 AND \"january\"<25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_reference\" (\n \"code\" text,\n \"vehicle\" text,\n \"year\" text,\n \"displacement\" text,\n \"bore\" text,\n \"stroke\" text,\n \"c_r\" text,\n \"max_power\" text\n);\n\nQuestion: What stroke has a max power of 109 ps(80kw)@4000 rpm?" }, { "role": "assistant", "content": "SELECT \"stroke\" FROM \"engine_reference\" WHERE \"max_power\"='109 ps(80kw)@4000 rpm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_reference\" (\n \"code\" text,\n \"vehicle\" text,\n \"year\" text,\n \"displacement\" text,\n \"bore\" text,\n \"stroke\" text,\n \"c_r\" text,\n \"max_power\" text\n);\n\nQuestion: The nissan primera p12 nissan almera n16 has what C.R.?" }, { "role": "assistant", "content": "SELECT \"c_r\" FROM \"engine_reference\" WHERE \"vehicle\"='nissan primera p12 nissan almera n16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_reference\" (\n \"code\" text,\n \"vehicle\" text,\n \"year\" text,\n \"displacement\" text,\n \"bore\" text,\n \"stroke\" text,\n \"c_r\" text,\n \"max_power\" text\n);\n\nQuestion: What displacement has the code yd22ddt?" }, { "role": "assistant", "content": "SELECT \"displacement\" FROM \"engine_reference\" WHERE \"code\"='yd22ddt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_reference\" (\n \"code\" text,\n \"vehicle\" text,\n \"year\" text,\n \"displacement\" text,\n \"bore\" text,\n \"stroke\" text,\n \"c_r\" text,\n \"max_power\" text\n);\n\nQuestion: What code has a C.R of 16.7:1?" }, { "role": "assistant", "content": "SELECT \"code\" FROM \"engine_reference\" WHERE \"c_r\"='16.7:1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What Outcome happened on a Date that was 20 november 2011?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"singles\" WHERE \"date\"='20 november 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which Away team has a Score of 0\u20133?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"fourth_round\" WHERE \"score\"='0\u20133';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which Attendance has a Tie number of 5?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"fourth_round\" WHERE \"tie_no\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which Score has an Attendance of 23 january 1999, and a Tie # of 6?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"fourth_round\" WHERE \"attendance\"='23 january 1999' AND \"tie_no\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which Tie #has an Attendance of 54,591?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"fourth_round\" WHERE \"attendance\"='54,591';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which Home team has a Score of 1\u20131, and an Away team of tottenham hotspur?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"fourth_round\" WHERE \"score\"='1\u20131' AND \"away_team\"='tottenham hotspur';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which Attendance has a Tie # of 15?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"fourth_round\" WHERE \"tie_no\"='15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: In what Year was the Position 11th?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"achievements\" WHERE \"position\"='11th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What was the name of the Competition in Rome, Italy?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"achievements\" WHERE \"venue\"='rome, italy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What Notes after 1983 have a Position of 18th?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"achievements\" WHERE \"year\">1983 AND \"position\"='18th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: After 1983, what was the Position in Seoul, South Korea?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"achievements\" WHERE \"year\">1983 AND \"venue\"='seoul, south korea';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Gold medals for the country with a Rank of 1 and less than 2 Total medals?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"rank\"='1' AND \"total\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many Gold medals does the country with 2 Silver and more than 2 Bronze have?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"silver\"=2 AND \"bronze\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"living_british_supercentenarians\" (\n \"name\" text,\n \"birth_date\" text,\n \"age_as_of_1_february_2014\" text,\n \"country_of_birth\" text,\n \"place_of_residence\" text\n);\n\nQuestion: What is the Age of dorothy Peel as of 1 February 2014 ?" }, { "role": "assistant", "content": "SELECT \"age_as_of_1_february_2014\" FROM \"living_british_supercentenarians\" WHERE \"name\"='dorothy peel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"living_british_supercentenarians\" (\n \"name\" text,\n \"birth_date\" text,\n \"age_as_of_1_february_2014\" text,\n \"country_of_birth\" text,\n \"place_of_residence\" text\n);\n\nQuestion: Who is 111years, 358days Age as of 1 February 2014?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"living_british_supercentenarians\" WHERE \"age_as_of_1_february_2014\"='111years, 358days';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atp_tour_venues\" (\n \"rank\" text,\n \"stadium\" text,\n \"capacity\" real,\n \"city\" text,\n \"country\" text\n);\n\nQuestion: Which Capacity has a City of london, and a Stadium of queen's club?" }, { "role": "assistant", "content": "SELECT AVG(\"capacity\") FROM \"atp_tour_venues\" WHERE \"city\"='london' AND \"stadium\"='queen''s club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"planica\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which Rank has a Name of thomas morgenstern, and Points larger than 368.9?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"planica\" WHERE \"name\"='thomas morgenstern' AND \"points\">368.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"planica\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which Rank has an Overall WC points (Rank) of 1561 (2), and a 1st (m) larger than 217?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"planica\" WHERE \"overall_wc_points_rank\"='1561 (2)' AND \"1st_m\">217;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"planica\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: How much Rank has a Name of janne happonen, and a 1st (m) larger than 203.5?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"planica\" WHERE \"name\"='janne happonen' AND \"1st_m\">203.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest total for bronzes over 1, golds over 8, and fewer than 10 silvers?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medal_table\" WHERE \"bronze\">1 AND \"gold\">8 AND \"silver\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest number of silvers for ranks over 7?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"rank\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"date\" text,\n \"location\" text,\n \"opponent\" text,\n \"score\" text,\n \"competition\" text\n);\n\nQuestion: Which location held a game against the Maryland Terrapins?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"fixtures\" WHERE \"opponent\"='maryland terrapins';" } ]
[ { "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 \"time\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent when the record recorded was 64-78?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='64-78';" } ]
[ { "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 \"time\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: When the record was 67-82, what was the final score recorded?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='67-82';" } ]
[ { "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 \"time\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent for the game played with 54,136 people in attendance?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"attendance\"='54,136';" } ]
[ { "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 \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which position does bert coan play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"player\"='bert coan';" } ]
[ { "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 \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is round 1's position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"round\"=1;" } ]