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 \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" text,\n \"previous_conference\" text,\n \"year_left\" text\n);\n\nQuestion: what is the school when the location is rochester?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"former_members\" WHERE \"location\"='rochester';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" text,\n \"previous_conference\" text,\n \"year_left\" text\n);\n\nQuestion: what is the location when the school is muncie burris?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"former_members\" WHERE \"school\"='muncie burris';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" text,\n \"previous_conference\" text,\n \"year_left\" text\n);\n\nQuestion: what is the mascot when the school is warsaw?" }, { "role": "assistant", "content": "SELECT \"mascot\" FROM \"former_members\" WHERE \"school\"='warsaw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" text,\n \"previous_conference\" text,\n \"year_left\" text\n);\n\nQuestion: what is the mascot when the county is 43 kosciusko?" }, { "role": "assistant", "content": "SELECT \"mascot\" FROM \"former_members\" WHERE \"county\"='43 kosciusko';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"county\" text,\n \"year_joined\" text,\n \"previous_conference\" text,\n \"year_left\" text\n);\n\nQuestion: what is the county when the year left is 1998?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"former_members\" WHERE \"year_left\"='1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"satellite_awards\" (\n \"year\" real,\n \"category\" text,\n \"film\" text,\n \"result\" text,\n \"lost_to\" text\n);\n\nQuestion: which Film has a Category of best actress \u2013 musical or comedy, and a Lost to of nicole kidman ( moulin rouge! )?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"satellite_awards\" WHERE \"category\"='best actress \u2013 musical or comedy' AND \"lost_to\"='nicole kidman ( moulin rouge! )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"satellite_awards\" (\n \"year\" real,\n \"category\" text,\n \"film\" text,\n \"result\" text,\n \"lost_to\" text\n);\n\nQuestion: which Category has a Result of nominated, and a Lost to of jennifer westfeldt ( kissing jessica stein )?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"satellite_awards\" WHERE \"result\"='nominated' AND \"lost_to\"='jennifer westfeldt ( kissing jessica stein )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"satellite_awards\" (\n \"year\" real,\n \"category\" text,\n \"film\" text,\n \"result\" text,\n \"lost_to\" text\n);\n\nQuestion: Which the Lost to is in 2000" }, { "role": "assistant", "content": "SELECT \"lost_to\" FROM \"satellite_awards\" WHERE \"year\"=2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"bills_points\" real,\n \"opponents\" real,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average attendance for games against the Pittsburgh Steelers when the opponents scored more than 0 points?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='pittsburgh steelers' AND \"opponents\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"twentieth_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the team that has a pick less than 154 and an offensive guard position?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"twentieth_round\" WHERE \"position\"='offensive guard' AND \"pick\"<154;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_roster\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: What is the Weight of the GK Player with 2012 Club of CN Atl\u00e8tic-Barceloneta?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"current_roster\" WHERE \"pos\"='gk' AND \"2012_club\"='cn atl\u00e8tic-barceloneta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current_roster\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"2012_club\" text\n);\n\nQuestion: What is the Height of the CF Player with 2012 club of Posillipo?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"current_roster\" WHERE \"pos\"='cf' AND \"2012_club\"='posillipo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_premier\" (\n \"game\" real,\n \"date\" text,\n \"opponents\" text,\n \"venue\" text,\n \"result\" text,\n \"score_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Attendance of Game 24?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"conference_premier\" WHERE \"game\"=24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"conference_premier\" (\n \"game\" real,\n \"date\" text,\n \"opponents\" text,\n \"venue\" text,\n \"result\" text,\n \"score_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Venue of Game 41 with a Score F\u2013A of 1\u20132?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"conference_premier\" WHERE \"score_f_a\"='1\u20132' AND \"game\"=41;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_36_20_16\" (\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: Who are the opponents in the February 19, 1996 final?" }, { "role": "assistant", "content": "SELECT \"opponents_in_the_final\" FROM \"doubles_36_20_16\" WHERE \"date\"='february 19, 1996';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_36_20_16\" (\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: What was the final score on March 22, 1993?" }, { "role": "assistant", "content": "SELECT \"score_in_the_final\" FROM \"doubles_36_20_16\" WHERE \"date\"='march 22, 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_36_20_16\" (\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: What is the outcome on June 9, 1997?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_36_20_16\" WHERE \"date\"='june 9, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What school has an IHSAA Class of aaa, and their mascot is Tiger Cubs?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_class\"='aaa' AND \"mascot\"='tiger cubs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What is the IHSAA Football Class for county 67 putnam at Greencastle?" }, { "role": "assistant", "content": "SELECT \"ihsaa_football_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"county\"='67 putnam' AND \"school\"='greencastle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: What school has more than 533 enrolled and is an IHSAA Football Class of aa?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"indiana_high_school_athletics_conference\" WHERE \"enrollment\">533 AND \"ihsaa_football_class\"='aa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"ihsaa_football_class\" text,\n \"county\" text\n);\n\nQuestion: Where is the IHSAA Class of aaa school with more than 590 enrolled?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"indiana_high_school_athletics_conference\" WHERE \"ihsaa_class\"='aaa' AND \"enrollment\">590;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_history\" (\n \"wrestlers\" text,\n \"reign\" text,\n \"days_held\" text,\n \"location\" text,\n \"event\" text\n);\n\nQuestion: Which location has 111 as the days held?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"title_history\" WHERE \"days_held\"='111';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_history\" (\n \"wrestlers\" text,\n \"reign\" text,\n \"days_held\" text,\n \"location\" text,\n \"event\" text\n);\n\nQuestion: What days held has 1 as the reign with eden black as the wrestlers?" }, { "role": "assistant", "content": "SELECT \"days_held\" FROM \"title_history\" WHERE \"reign\"='1' AND \"wrestlers\"='eden black';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_history\" (\n \"wrestlers\" text,\n \"reign\" text,\n \"days_held\" text,\n \"location\" text,\n \"event\" text\n);\n\nQuestion: What wrestlers have summer brawl 2006 as the event?" }, { "role": "assistant", "content": "SELECT \"wrestlers\" FROM \"title_history\" WHERE \"event\"='summer brawl 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What is the average amount of points larger than 154 laps?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"race\" WHERE \"laps\">154;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What home team played against Crystal Palace?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"away_team\"='crystal palace';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_team\" (\n \"rank\" real,\n \"team\" text,\n \"apps\" real,\n \"record\" text,\n \"win_pct\" real\n);\n\nQuestion: What is the lowest win % with a 0-2 record and more than 2 apps?" }, { "role": "assistant", "content": "SELECT MIN(\"win_pct\") FROM \"by_team\" WHERE \"record\"='0-2' AND \"apps\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_team\" (\n \"rank\" real,\n \"team\" text,\n \"apps\" real,\n \"record\" text,\n \"win_pct\" real\n);\n\nQuestion: What is the lowest apps for rank 3 and 0% wins?" }, { "role": "assistant", "content": "SELECT MIN(\"apps\") FROM \"by_team\" WHERE \"rank\"=3 AND \"win_pct\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_10_albums\" (\n \"rank\" real,\n \"artist\" text,\n \"album\" text,\n \"peak_position\" real,\n \"sales\" real,\n \"certification\" text\n);\n\nQuestion: What artist had a peak position under 2, and more than 200,000 in sales?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"top_10_albums\" WHERE \"peak_position\"<2 AND \"sales\">'200,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: Which points has place smaller than 2?" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"results\" WHERE \"place\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What's the size of Centerville in 89 Wayne county with an IHSAA class of AA in the year before 1974?" }, { "role": "assistant", "content": "SELECT \"size\" FROM \"membership\" WHERE \"year_joined\"<1974 AND \"ihsaa_class\"='aa' AND \"num_county\"='89 wayne' AND \"school\"='centerville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What's the year that Hagerstown joined?" }, { "role": "assistant", "content": "SELECT \"year_joined\" FROM \"membership\" WHERE \"school\"='hagerstown';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What county is Fountain City?" }, { "role": "assistant", "content": "SELECT \"num_county\" FROM \"membership\" WHERE \"location\"='fountain city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"size\" real,\n \"ihsaa_class\" text,\n \"num_county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: What's the previous conference of Fountain City with a size more than 287?" }, { "role": "assistant", "content": "SELECT \"previous_conference\" FROM \"membership\" WHERE \"size\">287 AND \"location\"='fountain city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"116_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"polling_institute\" text,\n \"socialist\" text,\n \"social_democratic\" text,\n \"green_communist\" text,\n \"people_s_party\" text,\n \"left_bloc\" text,\n \"lead\" text\n);\n\nQuestion: What is the people's party with an 8.0% green-communist?" }, { "role": "assistant", "content": "SELECT \"people_s_party\" FROM \"116_seats_needed_for_a_majority\" WHERE \"green_communist\"='8.0%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"116_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"polling_institute\" text,\n \"socialist\" text,\n \"social_democratic\" text,\n \"green_communist\" text,\n \"people_s_party\" text,\n \"left_bloc\" text,\n \"lead\" text\n);\n\nQuestion: What is the social democrat released on October 10, 1999?" }, { "role": "assistant", "content": "SELECT \"social_democratic\" FROM \"116_seats_needed_for_a_majority\" WHERE \"date_released\"='october 10, 1999';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"116_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"polling_institute\" text,\n \"socialist\" text,\n \"social_democratic\" text,\n \"green_communist\" text,\n \"people_s_party\" text,\n \"left_bloc\" text,\n \"lead\" text\n);\n\nQuestion: What is the green-communist with a 15.5% lead?" }, { "role": "assistant", "content": "SELECT \"green_communist\" FROM \"116_seats_needed_for_a_majority\" WHERE \"lead\"='15.5%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"116_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"polling_institute\" text,\n \"socialist\" text,\n \"social_democratic\" text,\n \"green_communist\" text,\n \"people_s_party\" text,\n \"left_bloc\" text,\n \"lead\" text\n);\n\nQuestion: What is the left bloc with a 49.0% socialist?" }, { "role": "assistant", "content": "SELECT \"left_bloc\" FROM \"116_seats_needed_for_a_majority\" WHERE \"socialist\"='49.0%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"116_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"polling_institute\" text,\n \"socialist\" text,\n \"social_democratic\" text,\n \"green_communist\" text,\n \"people_s_party\" text,\n \"left_bloc\" text,\n \"lead\" text\n);\n\nQuestion: Which polling institute has a 30.7% for social democratic?" }, { "role": "assistant", "content": "SELECT \"polling_institute\" FROM \"116_seats_needed_for_a_majority\" WHERE \"social_democratic\"='30.7%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"116_seats_needed_for_a_majority\" (\n \"date_released\" text,\n \"polling_institute\" text,\n \"socialist\" text,\n \"social_democratic\" text,\n \"green_communist\" text,\n \"people_s_party\" text,\n \"left_bloc\" text,\n \"lead\" text\n);\n\nQuestion: What is the people's party with a 30.0% social democratic?" }, { "role": "assistant", "content": "SELECT \"people_s_party\" FROM \"116_seats_needed_for_a_majority\" WHERE \"social_democratic\"='30.0%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the week with w 31-21 result?" }, { "role": "assistant", "content": "SELECT \"week\" FROM \"schedule\" WHERE \"result\"='w 31-21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: In week 7, what was the average attendance?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"week\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the opponent on september 10, 1979?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='september 10, 1979';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"date_of_release\" text,\n \"title\" text,\n \"billboard_peak\" text,\n \"riaa_cert\" text,\n \"label\" text\n);\n\nQuestion: When was twenty released?" }, { "role": "assistant", "content": "SELECT \"date_of_release\" FROM \"discography\" WHERE \"title\"='twenty';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"date_of_release\" text,\n \"title\" text,\n \"billboard_peak\" text,\n \"riaa_cert\" text,\n \"label\" text\n);\n\nQuestion: On what date was god & guns released?" }, { "role": "assistant", "content": "SELECT \"date_of_release\" FROM \"discography\" WHERE \"title\"='god & guns';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"date_of_release\" text,\n \"title\" text,\n \"billboard_peak\" text,\n \"riaa_cert\" text,\n \"label\" text\n);\n\nQuestion: What was the Billboard peak for the album released on September 12, 2000 by sanctuary?" }, { "role": "assistant", "content": "SELECT \"billboard_peak\" FROM \"discography\" WHERE \"label\"='sanctuary' AND \"date_of_release\"='september 12, 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"date_of_release\" text,\n \"title\" text,\n \"billboard_peak\" text,\n \"riaa_cert\" text,\n \"label\" text\n);\n\nQuestion: Where did god & guns peak on the Billboard?" }, { "role": "assistant", "content": "SELECT \"billboard_peak\" FROM \"discography\" WHERE \"title\"='god & guns';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"date_of_release\" text,\n \"title\" text,\n \"billboard_peak\" text,\n \"riaa_cert\" text,\n \"label\" text\n);\n\nQuestion: What was the Billboard peak for the album released on February 2, 1976 by MCA?" }, { "role": "assistant", "content": "SELECT \"billboard_peak\" FROM \"discography\" WHERE \"label\"='mca' AND \"date_of_release\"='february 2, 1976';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What venue was the tour match against eastern province played at with more than 0 against?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"results\" WHERE \"status\"='tour match' AND \"against\">0 AND \"opposing_team\"='eastern province';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the game where there was more than 22 against?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"results\" WHERE \"against\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"lions_points\" text,\n \"opponents\" text,\n \"record\" text,\n \"streak\" text,\n \"attendance\" text\n);\n\nQuestion: In which game did the opponents score 14 points?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"schedule\" WHERE \"opponents\"='14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"lions_points\" text,\n \"opponents\" text,\n \"record\" text,\n \"streak\" text,\n \"attendance\" text\n);\n\nQuestion: What was the streak after the game on Dec. 12?" }, { "role": "assistant", "content": "SELECT \"streak\" FROM \"schedule\" WHERE \"date\"='dec. 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_of_amt_versions\" (\n \"feature\" text,\n \"amt_1_0_desktop\" text,\n \"amt_2_0_2_1_desktop\" text,\n \"amt_2_5_2_6_mobile\" text,\n \"amt_3_0_desktop\" text,\n \"amt_4_0_mobile\" text,\n \"amt_5_0_desktop\" text,\n \"6_0_desktop_mobile\" text,\n \"7_0_8_0_desktop_mobile\" text\n);\n\nQuestion: What's the AMT 3.0 when it has a feature of Vlan Settings for Intel AMT Network Interfaces?" }, { "role": "assistant", "content": "SELECT \"amt_3_0_desktop\" FROM \"comparison_of_amt_versions\" WHERE \"feature\"='vlan settings for intel amt network interfaces';" } ]
[ { "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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the number of silver when bronze is 0, and rank is less than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"bronze\"=0 AND \"rank\"<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\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the silver when the Total is 1, and Gold is 1?" }, { "role": "assistant", "content": "SELECT AVG(\"silver\") FROM \"medal_table\" WHERE \"total\"=1 AND \"gold\"=1;" } ]
[ { "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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the number of silver when the total is less than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"total\"<1;" } ]
[ { "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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest silver number when the rank is smaller than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"rank\"<1;" } ]
[ { "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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the number of bronze when the total is smaller than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"total\"<1;" } ]
[ { "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 \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest number of bronze when silver is larger than 0, rank is larger than 3?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"silver\">0 AND \"rank\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_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 lowest number of silvers for countries in rank 12 with more than 0 bronze?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medals_table\" WHERE \"rank\"='12' AND \"bronze\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_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 most number of silvers for teams in rank 5 with more than 6 total medals?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medals_table\" WHERE \"rank\"='5' AND \"total\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_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 fewest number of golds for teams with a total of 3 and fewer than 2 silvers?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medals_table\" WHERE \"total\"=3 AND \"silver\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"win_loss_record\" (\n \"club\" text,\n \"active\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"percentage_wins\" text,\n \"flags\" real\n);\n\nQuestion: What's the number of wins when the flags were less than 8 and 52.11% of wins?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"win_loss_record\" WHERE \"percentage_wins\"='52.11%' AND \"flags\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"win_loss_record\" (\n \"club\" text,\n \"active\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"percentage_wins\" text,\n \"flags\" real\n);\n\nQuestion: What's the most flags that had 473 wins and less than 633 losses?" }, { "role": "assistant", "content": "SELECT MAX(\"flags\") FROM \"win_loss_record\" WHERE \"wins\"=473 AND \"losses\"<633;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"win_loss_record\" (\n \"club\" text,\n \"active\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"percentage_wins\" text,\n \"flags\" real\n);\n\nQuestion: How many wins did South Warrnambool have that had more than 6 flags and a draw greater than 10?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"win_loss_record\" WHERE \"flags\">6 AND \"draws\">10 AND \"club\"='south warrnambool';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"win_loss_record\" (\n \"club\" text,\n \"active\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real,\n \"percentage_wins\" text,\n \"flags\" real\n);\n\nQuestion: What are the losses of Warrnambool with a draw less than 19?" }, { "role": "assistant", "content": "SELECT AVG(\"losses\") FROM \"win_loss_record\" WHERE \"club\"='warrnambool' AND \"draws\"<19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senior_career\" (\n \"year\" real,\n \"competition_description\" text,\n \"location\" text,\n \"apparatus\" text,\n \"rank_final\" text\n);\n\nQuestion: What is the Location of the Competition with a Rank-Final of 10?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"senior_career\" WHERE \"rank_final\"='10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals for Bulgaria (BUL) with 2 silvers and a less than 18 rank?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"men\" WHERE \"silver\"=2 AND \"nation\"='bulgaria (bul)' AND \"rank\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the most bronze medals for Great Britain (GBR) with more than 1 silver and ranked more than 6?" }, { "role": "assistant", "content": "SELECT MAX(\"bronze\") FROM \"men\" WHERE \"rank\">6 AND \"nation\"='great britain (gbr)' AND \"silver\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the total silver medals having less than 2 gold and 2 bronze?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"men\" WHERE \"bronze\"=2 AND \"gold\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"yellow_cards\" (\n \"name\" text,\n \"championship\" real,\n \"league_cup\" real,\n \"fa_cup\" real,\n \"total\" real\n);\n\nQuestion: Which Name has a Championship larger than 2, and a Total larger than 4, and an FA Cup larger than 0?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"yellow_cards\" WHERE \"championship\">2 AND \"total\">4 AND \"fa_cup\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which Video has a Channel smaller than 35.66, and a Programming of nhk world?" }, { "role": "assistant", "content": "SELECT \"video\" FROM \"digital_channels\" WHERE \"channel\"<35.66 AND \"programming\"='nhk world';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which Video has a PSIP Short Name of rt?" }, { "role": "assistant", "content": "SELECT \"video\" FROM \"digital_channels\" WHERE \"psip_short_name\"='rt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which Programming has a Channel of 35.4?" }, { "role": "assistant", "content": "SELECT \"programming\" FROM \"digital_channels\" WHERE \"channel\"=35.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"per_country\" (\n \"rank\" text,\n \"country\" text,\n \"jerseys\" real,\n \"vuelta_wins\" real,\n \"points\" real,\n \"combo\" real,\n \"different_holders\" real\n);\n\nQuestion: what is the lowest vuelta wins when the rank is 19 and combo is more than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"vuelta_wins\") FROM \"per_country\" WHERE \"rank\"='19' AND \"combo\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"per_country\" (\n \"rank\" text,\n \"country\" text,\n \"jerseys\" real,\n \"vuelta_wins\" real,\n \"points\" real,\n \"combo\" real,\n \"different_holders\" real\n);\n\nQuestion: How many times is the country ireland and points more than 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"vuelta_wins\") FROM \"per_country\" WHERE \"country\"='ireland' AND \"points\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What is the format for the MHCP-66 Catalog?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='mhcp-66';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What Catalog came out on August 20, 1965?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"date\"='august 20, 1965';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What is the catalog with an LP Format and under the Simply Vinyl label?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"format\"='lp' AND \"label\"='simply vinyl';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What date had a CD format, under Columbia/Legacy from the UK?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"format\"='cd' AND \"label\"='columbia/legacy' AND \"country\"='uk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What country has an LP format, catalog s 31503?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"release_history\" WHERE \"format\"='lp' AND \"catalog\"='s 31503';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"country\" text,\n \"catalog\" text\n);\n\nQuestion: What is the format for Catalog CL 2372?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"catalog\"='cl 2372';" } ]
[ { "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 \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text,\n \"points\" text\n);\n\nQuestion: What event has european championships as the tournament, with 2006 as the year?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"achievements\" WHERE \"tournament\"='european championships' AND \"year\"=2006;" } ]
[ { "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 \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text,\n \"points\" text\n);\n\nQuestion: What average year has international meeting & national championships as the tournament?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"achievements\" WHERE \"tournament\"='international meeting & national championships';" } ]
[ { "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 \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text,\n \"points\" text\n);\n\nQuestion: What is the lowest year that has hypo-meeting as the tournament, with 8002 as the points?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"tournament\"='hypo-meeting' AND \"points\"='8002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Who was the opponent in the match that lasted 4:17?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='4:17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Where was the match that lasted less than 3 rounds and was won by submission (triangle choke)?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<3 AND \"method\"='submission (triangle choke)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which event had Carlos Alexandre Pereira as opponent?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='carlos alexandre pereira';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Where was the match that resulted in a win in 4:16 held?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"time\"='4:16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"texas_counties_ranked_by_per_capita_inco\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What's the population that has a median family income of $50,553?" }, { "role": "assistant", "content": "SELECT COUNT(\"population\") FROM \"texas_counties_ranked_by_per_capita_inco\" WHERE \"median_family_income\"='$50,553';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_6\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the highest rank for the team of egypt?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"heat_6\" WHERE \"country\"='egypt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_6\" (\n \"rank\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Who was the athlete from egypt with q in the notes?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"heat_6\" WHERE \"notes\"='q' AND \"country\"='egypt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_sites\" (\n \"transmitter\" text,\n \"service_area\" text,\n \"radio_1_m_hz\" real,\n \"2_fm_m_hz\" text,\n \"rna_g_m_hz\" text,\n \"lyric_fm_m_hz\" text,\n \"erp_k_w\" real\n);\n\nQuestion: What is the 2FM for SW Ireland?" }, { "role": "assistant", "content": "SELECT \"2_fm_m_hz\" FROM \"main_sites\" WHERE \"service_area\"='sw ireland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Name Event of Medal of gold and a Name of duncan white?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"list_of_medalists\" WHERE \"medal\"='gold' AND \"name\"='duncan white';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Name the Event of the Games of 1950 auckland and a Medal of bronze?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"list_of_medalists\" WHERE \"games\"='1950 auckland' AND \"medal\"='bronze';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Which Medal has a Name of alex obeyesekera?" }, { "role": "assistant", "content": "SELECT \"medal\" FROM \"list_of_medalists\" WHERE \"name\"='alex obeyesekera';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Which Event has a Medal of gold and a Name of barney henricus?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"list_of_medalists\" WHERE \"medal\"='gold' AND \"name\"='barney henricus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Name the Event of sudesh peiris?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"list_of_medalists\" WHERE \"name\"='sudesh peiris';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_trailers\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What year was the developer(s) Bioware?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"game_trailers\" WHERE \"developer_s\"='bioware';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_trailers\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: What is the genre for 2009 on Playstation 3?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"game_trailers\" WHERE \"year\">2009 AND \"platform_s\"='playstation 3';" } ]