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 \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"location\" text\n);\n\nQuestion: How many rounds did the match last when his record was 6-6?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='6-6';" } ]
[ { "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\" text,\n \"location\" text\n);\n\nQuestion: How did the match end when his record was 15-11?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='15-11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many laps did ben spies do on the grid less than 7?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"moto_gp_classification\" WHERE \"grid\"<7 AND \"rider\"='ben spies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: which grid did less than 20 laps in a time of +58.353?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"moto_gp_classification\" WHERE \"time\"='+58.353' AND \"laps\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: what was valentino rossi's rider time?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"moto_gp_classification\" WHERE \"rider\"='valentino rossi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who manufactures Makoto Tamada's vehicle?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"rider\"='makoto tamada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired of the one with grid of 16?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"moto_gp_classification\" WHERE \"grid\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What team did gonzalo arconada manage?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='gonzalo arconada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What team replaced their manager on 9 December 2008?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"managerial_changes\" WHERE \"date_of_vacancy\"='9 december 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What was the date of appointment for paco chaparro's replacement?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='paco chaparro';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"managerial_changes\" (\n \"team\" text,\n \"outgoing_manager\" text,\n \"manner_of_departure\" text,\n \"date_of_vacancy\" text,\n \"replaced_by\" text,\n \"date_of_appointment\" text,\n \"position_in_table\" text\n);\n\nQuestion: What was the date of appointment for javier aguirre's replacement?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"outgoing_manager\"='javier aguirre';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_14_5_9\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What date did Namigata play against Wen-Hsin Hsu in the finals?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_14_5_9\" WHERE \"opponent_in_the_final\"='wen-hsin hsu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_on\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"result\" text\n);\n\nQuestion: What was the result during the week # of top 8?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"performances_on\" WHERE \"week_num\"='top 8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_on\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"result\" text\n);\n\nQuestion: What was the theme during the week # of top 24 (12 men)" }, { "role": "assistant", "content": "SELECT \"theme\" FROM \"performances_on\" WHERE \"week_num\"='top 24 (12 men)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_on\" (\n \"week_num\" text,\n \"theme\" text,\n \"song_choice\" text,\n \"original_artist\" text,\n \"result\" text\n);\n\nQuestion: What was the result after the week # top 11?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"performances_on\" WHERE \"week_num\"='top 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"shoots\" text,\n \"nationality\" text,\n \"league\" text,\n \"birthplace_date\" text,\n \"height_weight\" text\n);\n\nQuestion: What is the league of player ian schultz?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"draft_picks\" WHERE \"player\"='ian schultz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"shoots\" text,\n \"nationality\" text,\n \"league\" text,\n \"birthplace_date\" text,\n \"height_weight\" text\n);\n\nQuestion: What is the birthplace and date of pick 4?" }, { "role": "assistant", "content": "SELECT \"birthplace_date\" FROM \"draft_picks\" WHERE \"pick\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" text,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"shoots\" text,\n \"nationality\" text,\n \"league\" text,\n \"birthplace_date\" text,\n \"height_weight\" text\n);\n\nQuestion: What is the pick of player ian schultz from Canada?" }, { "role": "assistant", "content": "SELECT \"pick\" FROM \"draft_picks\" WHERE \"nationality\"='canada' AND \"player\"='ian schultz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who is the Opponent on January 7?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"january\" WHERE \"date\"='january 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who is the Opponent on January 16?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"january\" WHERE \"date\"='january 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Score of the game against Philadelphia 76ers?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"january\" WHERE \"opponent\"='philadelphia 76ers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Date of the game where the Cavaliers have a Record of 15-27?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"january\" WHERE \"record\"='15-27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the Opponent in the game with a Score of 102-125?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"january\" WHERE \"score\"='102-125';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"h_a_n\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Cavaliers Record in the game with a Score of 98-99?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"january\" WHERE \"score\"='98-99';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What player has a no pick position in 1976?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"player_selections\" WHERE \"position\"='no pick' AND \"year\"=1976;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What pick number was the player that went to baylor college?" }, { "role": "assistant", "content": "SELECT \"pick\" FROM \"player_selections\" WHERE \"college\"='baylor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What year was the player pick number 15 picked?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"player_selections\" WHERE \"pick\"='15';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the record on september 2?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='september 2';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What were phoenix's high points?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"regular_season\" WHERE \"opponent\"='phoenix';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: When was the record 17-17?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"regular_season\" WHERE \"record\"='17-17';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What were the high points on september 9?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"regular_season\" WHERE \"date\"='september 9';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: How many games had a record of 16-17?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"regular_season\" WHERE \"record\"='16-17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders_in_the_northern_ireland_assembel\" (\n \"leader\" text,\n \"party\" text,\n \"leader_s_seat\" text,\n \"number_of_seats\" real,\n \"leader_since\" text\n);\n\nQuestion: Which leader has been a leader since 2007?" }, { "role": "assistant", "content": "SELECT \"leader\" FROM \"leaders_in_the_northern_ireland_assembel\" WHERE \"leader_since\"='2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders_in_the_northern_ireland_assembel\" (\n \"leader\" text,\n \"party\" text,\n \"leader_s_seat\" text,\n \"number_of_seats\" real,\n \"leader_since\" text\n);\n\nQuestion: How many seats does leader Raymond McCartney have?" }, { "role": "assistant", "content": "SELECT SUM(\"number_of_seats\") FROM \"leaders_in_the_northern_ireland_assembel\" WHERE \"leader\"='raymond mccartney';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"leaders_in_the_northern_ireland_assembel\" (\n \"leader\" text,\n \"party\" text,\n \"leader_s_seat\" text,\n \"number_of_seats\" real,\n \"leader_since\" text\n);\n\nQuestion: Which leader of the Democratic Unionist party has more than 8 seats?" }, { "role": "assistant", "content": "SELECT \"leader\" FROM \"leaders_in_the_northern_ireland_assembel\" WHERE \"number_of_seats\">8 AND \"party\"='democratic unionist party';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"ceremony\" text,\n \"award\" text,\n \"category\" text,\n \"name\" text,\n \"outcome\" text\n);\n\nQuestion: Anuya Bhagvath was nominated for what award?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"accolades\" WHERE \"outcome\"='nominated' AND \"name\"='anuya bhagvath';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"ceremony\" text,\n \"award\" text,\n \"category\" text,\n \"name\" text,\n \"outcome\" text\n);\n\nQuestion: Which award has film lyricist in the category?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"accolades\" WHERE \"category\"='film lyricist';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"ceremony\" text,\n \"award\" text,\n \"category\" text,\n \"name\" text,\n \"outcome\" text\n);\n\nQuestion: What is the category Anuya Bhagvath was nominated for at vijay award?" }, { "role": "assistant", "content": "SELECT \"ceremony\" FROM \"accolades\" WHERE \"award\"='vijay award' AND \"outcome\"='nominated' AND \"name\"='anuya bhagvath';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"accolades\" (\n \"ceremony\" text,\n \"award\" text,\n \"category\" text,\n \"name\" text,\n \"outcome\" text\n);\n\nQuestion: Which ceremony has the best lyricist category?" }, { "role": "assistant", "content": "SELECT \"ceremony\" FROM \"accolades\" WHERE \"category\"='best lyricist';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moves_played_compared_with_computer_choi\" (\n \"position\" real,\n \"best_year\" text,\n \"best_2_year_period\" text,\n \"best_3_year_period\" text,\n \"best_5_year_period\" text,\n \"best_10_year_period\" text,\n \"best_15_year_period\" text\n);\n\nQuestion: Which best 3-year period has a best 15-year period of smyslov; kasparov, and a Position of 5?" }, { "role": "assistant", "content": "SELECT \"best_3_year_period\" FROM \"moves_played_compared_with_computer_choi\" WHERE \"best_15_year_period\"='smyslov; kasparov' AND \"position\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moves_played_compared_with_computer_choi\" (\n \"position\" real,\n \"best_year\" text,\n \"best_2_year_period\" text,\n \"best_3_year_period\" text,\n \"best_5_year_period\" text,\n \"best_10_year_period\" text,\n \"best_15_year_period\" text\n);\n\nQuestion: Which best 5-year period has a best 15-year period of alekhine; lasker?" }, { "role": "assistant", "content": "SELECT \"best_5_year_period\" FROM \"moves_played_compared_with_computer_choi\" WHERE \"best_15_year_period\"='alekhine; lasker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moves_played_compared_with_computer_choi\" (\n \"position\" real,\n \"best_year\" text,\n \"best_2_year_period\" text,\n \"best_3_year_period\" text,\n \"best_5_year_period\" text,\n \"best_10_year_period\" text,\n \"best_15_year_period\" text\n);\n\nQuestion: Which best 10-year period has a best 2-year period of petrosian?" }, { "role": "assistant", "content": "SELECT \"best_10_year_period\" FROM \"moves_played_compared_with_computer_choi\" WHERE \"best_2_year_period\"='petrosian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moves_played_compared_with_computer_choi\" (\n \"position\" real,\n \"best_year\" text,\n \"best_2_year_period\" text,\n \"best_3_year_period\" text,\n \"best_5_year_period\" text,\n \"best_10_year_period\" text,\n \"best_15_year_period\" text\n);\n\nQuestion: Which Position has a best 3-year period of petrosian?" }, { "role": "assistant", "content": "SELECT MAX(\"position\") FROM \"moves_played_compared_with_computer_choi\" WHERE \"best_3_year_period\"='petrosian';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is High Rebounds, when Score is 61-59?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"regular_season\" WHERE \"score\"='61-59';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Score, when High Rebounds is \"Nolan (10)\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"high_rebounds\"='nolan (10)';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is Opponent, when High Rebounds is \"Pierson (6)\"?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"high_rebounds\"='pierson (6)';" } ]
[ { "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 \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the sum of Game(s), when High Rebounds is \"Pierson (6)\"?" }, { "role": "assistant", "content": "SELECT SUM(\"game\") FROM \"regular_season\" WHERE \"high_rebounds\"='pierson (6)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_1\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: How many Laps did Bob Wollek have?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"race_1\" WHERE \"driver\"='bob wollek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_1\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: How many Laps did Team Primagaz Competition have?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"race_1\" WHERE \"team\"='primagaz competition';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_1\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: What Team had 40 Laps in C1 Class?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"race_1\" WHERE \"class\"='c1' AND \"laps\"=40;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_1\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: What Team has Bob Wollek as a Driver with 76 Laps in C1 Class?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"race_1\" WHERE \"class\"='c1' AND \"laps\"=76 AND \"driver\"='bob wollek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_1\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: How many Laps does GP Motorsport Team have?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"race_1\" WHERE \"team\"='gp motorsport';" } ]
[ { "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: what is the location when the score is w 105-99?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"game_log\" WHERE \"score\"='w 105-99';" } ]
[ { "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: what is the location on november 23?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"game_log\" WHERE \"date\"='november 23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin\" (\n \"country\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: Name the highest Ends Lost which has an Shot % larger than 78, and a Ends Won smaller than 38?" }, { "role": "assistant", "content": "SELECT MAX(\"ends_lost\") FROM \"round_robin\" WHERE \"shot_pct\">78 AND \"ends_won\"<38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin\" (\n \"country\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: Name the Country which has Stolen Ends larger than 7, and a Skip of david murdoch?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"round_robin\" WHERE \"stolen_ends\">7 AND \"skip\"='david murdoch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin\" (\n \"country\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: Name the average Stolen Ends which has an Ends Lost smaller than 35?" }, { "role": "assistant", "content": "SELECT AVG(\"stolen_ends\") FROM \"round_robin\" WHERE \"ends_lost\"<35;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_robin\" (\n \"country\" text,\n \"skip\" text,\n \"ends_won\" real,\n \"ends_lost\" real,\n \"blank_ends\" real,\n \"stolen_ends\" real,\n \"shot_pct\" real\n);\n\nQuestion: Name the average Blank Ends which has a Shot % smaller than 78, and a Ends Won larger than 43?" }, { "role": "assistant", "content": "SELECT AVG(\"blank_ends\") FROM \"round_robin\" WHERE \"shot_pct\"<78 AND \"ends_won\">43;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_2012\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: What rank has skyfall as the title?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"highest_grossing_films_of_2012\" WHERE \"title\"='skyfall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_2012\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: What director(s) have the intouchables as the title?" }, { "role": "assistant", "content": "SELECT \"director_s\" FROM \"highest_grossing_films_of_2012\" WHERE \"title\"='the intouchables';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_2012\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: What studio has 6 as the rank?" }, { "role": "assistant", "content": "SELECT \"studio\" FROM \"highest_grossing_films_of_2012\" WHERE \"rank\"=6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_2012\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: How many ranks have $1,084,439,099 as the worldwide gross?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"highest_grossing_films_of_2012\" WHERE \"worldwide_gross\"='$1,084,439,099';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"distribution\" (\n \"macedonian_population_in_vojvodina\" text,\n \"1961\" real,\n \"number_1971\" real,\n \"1981\" real,\n \"1991\" real,\n \"2002\" real\n);\n\nQuestion: What is the 1981 value of the Macedonian population with a 1971 number greater than 192 and a 1991 of 1748?" }, { "role": "assistant", "content": "SELECT \"1981\" FROM \"distribution\" WHERE \"number_1971\">192 AND \"1991\"=1748;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"distribution\" (\n \"macedonian_population_in_vojvodina\" text,\n \"1961\" real,\n \"number_1971\" real,\n \"1981\" real,\n \"1991\" real,\n \"2002\" real\n);\n\nQuestion: What is the lowest 1971 number of the Macedonian population with a 2002 value greater than 133 and a 1991 value less than 171?" }, { "role": "assistant", "content": "SELECT MIN(\"number_1971\") FROM \"distribution\" WHERE \"2002\">133 AND \"1991\"<171;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"distribution\" (\n \"macedonian_population_in_vojvodina\" text,\n \"1961\" real,\n \"number_1971\" real,\n \"1981\" real,\n \"1991\" real,\n \"2002\" real\n);\n\nQuestion: What is the total 1961 number of the plandi\u0161te Macedonian population with a 1981 value greater than 1027?" }, { "role": "assistant", "content": "SELECT COUNT(\"1961\") FROM \"distribution\" WHERE \"macedonian_population_in_vojvodina\"='plandi\u0161te' AND \"1981\">1027;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"distribution\" (\n \"macedonian_population_in_vojvodina\" text,\n \"1961\" real,\n \"number_1971\" real,\n \"1981\" real,\n \"1991\" real,\n \"2002\" real\n);\n\nQuestion: What is the 1961 total of the Macedonian population with a 1971 number of 3325 and a 1991 value greater than 3177?" }, { "role": "assistant", "content": "SELECT COUNT(\"1961\") FROM \"distribution\" WHERE \"number_1971\"=3325 AND \"1991\">3177;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What airport is in Muscat?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"references\" WHERE \"city\"='muscat';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What country is Bandar Abbas in?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"references\" WHERE \"city\"='bandar abbas';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the city in India with an airport named Sardar Vallabhbhai Patel International Airport?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"references\" WHERE \"country\"='india' AND \"airport\"='sardar vallabhbhai patel international airport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What airport is in China with an ICAO of zbaa?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"references\" WHERE \"country\"='china' AND \"icao\"='zbaa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What airport is in Toronto?" }, { "role": "assistant", "content": "SELECT \"airport\" FROM \"references\" WHERE \"city\"='toronto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"references\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What country has an ICAO of ypph?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"references\" WHERE \"icao\"='ypph';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"60_metres_hurdles\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real,\n \"points\" real\n);\n\nQuestion: When the mark is 8.54, the reaction time was over 0.23800000000000002 seconds, what's the highest amount of points recorded?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"60_metres_hurdles\" WHERE \"mark\"='8.54' AND \"react\">0.23800000000000002;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"60_metres_hurdles\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real,\n \"points\" real\n);\n\nQuestion: Which country has a reaction time of under 0.242 seconds and over 1041 points?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"60_metres_hurdles\" WHERE \"react\"<0.242 AND \"points\">1041;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"60_metres_hurdles\" (\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real,\n \"points\" real\n);\n\nQuestion: If a country has 1008 points what's their reaction time?" }, { "role": "assistant", "content": "SELECT MAX(\"react\") FROM \"60_metres_hurdles\" WHERE \"points\"=1008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_class_record_partnerships_by_wicke\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Which wicket had 580 runs?" }, { "role": "assistant", "content": "SELECT \"wicket\" FROM \"first_class_record_partnerships_by_wicke\" WHERE \"runs\"='580';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_class_record_partnerships_by_wicke\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Who fielded against the 8th wicket?" }, { "role": "assistant", "content": "SELECT \"fielding_team\" FROM \"first_class_record_partnerships_by_wicke\" WHERE \"wicket\"='8th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_class_record_partnerships_by_wicke\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: How many runs did Vijay Hazare and Gul Mohammad score?" }, { "role": "assistant", "content": "SELECT \"runs\" FROM \"first_class_record_partnerships_by_wicke\" WHERE \"batting_partners\"='vijay hazare and gul mohammad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_class_record_partnerships_by_wicke\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Who were the batting partners in Colombo?" }, { "role": "assistant", "content": "SELECT \"batting_partners\" FROM \"first_class_record_partnerships_by_wicke\" WHERE \"venue\"='colombo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_class_record_partnerships_by_wicke\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Who was the batting team in the 2006 season?" }, { "role": "assistant", "content": "SELECT \"batting_team\" FROM \"first_class_record_partnerships_by_wicke\" WHERE \"season\"='2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_class_record_partnerships_by_wicke\" (\n \"wicket\" text,\n \"runs\" text,\n \"batting_partners\" text,\n \"batting_team\" text,\n \"fielding_team\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: In what season was 577 runs scored?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"first_class_record_partnerships_by_wicke\" WHERE \"runs\"='577';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What opposing team has 20 against?" }, { "role": "assistant", "content": "SELECT \"opposing_team\" FROM \"matches\" WHERE \"against\"=20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Venue for Hawke's bay?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"matches\" WHERE \"opposing_team\"='hawke''s bay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the average December, when Game is \"36\"?" }, { "role": "assistant", "content": "SELECT AVG(\"december\") FROM \"schedule_and_results\" WHERE \"game\"=36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the lowest Game, when December is greater than 13, and when Score is \"5 - 0\"?" }, { "role": "assistant", "content": "SELECT MIN(\"game\") FROM \"schedule_and_results\" WHERE \"december\">13 AND \"score\"='5 - 0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the sum of December, when Game is greater than 31, and when Score is \"5 - 2\"?" }, { "role": "assistant", "content": "SELECT SUM(\"december\") FROM \"schedule_and_results\" WHERE \"game\">31 AND \"score\"='5 - 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is Record, when Game is \"36\"?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"game\"=36;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the away team that played against home team Leatherhead?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"home_team\"='leatherhead';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score of the match played against away team Arsenal?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"away_team\"='arsenal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"election\" real,\n \"candidates_fielded\" real,\n \"num_of_seats_won\" real,\n \"total_votes\" real,\n \"pct_of_popular_vote\" text,\n \"place\" text\n);\n\nQuestion: Can you tell me the highest Total votes that has the % of popular vote of 0.86%, and the # of seats won larger than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"total_votes\") FROM \"election_results\" WHERE \"pct_of_popular_vote\"='0.86%' AND \"num_of_seats_won\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"election\" real,\n \"candidates_fielded\" real,\n \"num_of_seats_won\" real,\n \"total_votes\" real,\n \"pct_of_popular_vote\" text,\n \"place\" text\n);\n\nQuestion: Can you tell me the average Total votes that has the # of seats won smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"total_votes\") FROM \"election_results\" WHERE \"num_of_seats_won\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"election_results\" (\n \"election\" real,\n \"candidates_fielded\" real,\n \"num_of_seats_won\" real,\n \"total_votes\" real,\n \"pct_of_popular_vote\" text,\n \"place\" text\n);\n\nQuestion: Can you tell me the total number of Total votes that has the Election larger than 2009, and the Candidates fielded larger than 61?" }, { "role": "assistant", "content": "SELECT COUNT(\"total_votes\") FROM \"election_results\" WHERE \"election\">2009 AND \"candidates_fielded\">61;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Which tournament did the opponent Guillermo Carry play?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_titles\" WHERE \"opponent\"='guillermo carry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who was the opponent on April 21, 2008?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_titles\" WHERE \"date\"='april 21, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Who is the opponent on November 22, 2009, clay surface?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"singles_titles\" WHERE \"surface\"='clay' AND \"date\"='november 22, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Laps have a Grid larger than 8, and a Rider of anthony west?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"moto_gp_classification\" WHERE \"grid\">8 AND \"rider\"='anthony west';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which time has a Rider of anthony west?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"moto_gp_classification\" WHERE \"rider\"='anthony west';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Grid is the highest one that has a Rider of colin edwards, and Laps smaller than 28?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"moto_gp_classification\" WHERE \"rider\"='colin edwards' AND \"laps\"<28;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Which Laps have a Rider of andrea dovizioso?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"moto_gp_classification\" WHERE \"rider\"='andrea dovizioso';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What college/junior/club team had a player selected in round 6?" }, { "role": "assistant", "content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"round\"=6;" } ]