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 \"changes_in_poverty_rates_on_largest_rese\" (\n \"reservation\" text,\n \"location\" text,\n \"1969\" real,\n \"1979\" real,\n \"1989\" real,\n \"2000\" real\n);\n\nQuestion: What shows for 2000 at the Fort Peck Indian Reservation, Montana, when the 1979 is less than 26.8?" }, { "role": "assistant", "content": "SELECT AVG(\"2000\") FROM \"changes_in_poverty_rates_on_largest_rese\" WHERE \"location\"='montana' AND \"reservation\"='fort peck indian reservation' AND \"1979\"<26.8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"changes_in_poverty_rates_on_largest_rese\" (\n \"reservation\" text,\n \"location\" text,\n \"1969\" real,\n \"1979\" real,\n \"1989\" real,\n \"2000\" real\n);\n\nQuestion: What is the 2000 number when the 1969 is 54.3, and the 1979 is less than 48.4?" }, { "role": "assistant", "content": "SELECT SUM(\"2000\") FROM \"changes_in_poverty_rates_on_largest_rese\" WHERE \"1969\"=54.3 AND \"1979\"<48.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"changes_in_poverty_rates_on_largest_rese\" (\n \"reservation\" text,\n \"location\" text,\n \"1969\" real,\n \"1979\" real,\n \"1989\" real,\n \"2000\" real\n);\n\nQuestion: What is the 2000 number when the 1989 is less than 54.9 in Arizona, New Mexico, and Utah?" }, { "role": "assistant", "content": "SELECT SUM(\"2000\") FROM \"changes_in_poverty_rates_on_largest_rese\" WHERE \"1989\"<54.9 AND \"location\"='arizona, new mexico, and utah';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"changes_in_poverty_rates_on_largest_rese\" (\n \"reservation\" text,\n \"location\" text,\n \"1969\" real,\n \"1979\" real,\n \"1989\" real,\n \"2000\" real\n);\n\nQuestion: What is the 1979 number for Standing Rock Indian Reservation when the 1989 is less than 54.9?" }, { "role": "assistant", "content": "SELECT SUM(\"1979\") FROM \"changes_in_poverty_rates_on_largest_rese\" WHERE \"reservation\"='standing rock indian reservation' AND \"1989\"<54.9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"by_county\" (\n \"county\" text,\n \"kerrypct\" text,\n \"kerrynum\" real,\n \"bushpct\" text,\n \"bushnum\" real,\n \"otherspct\" text,\n \"othersnum\" real\n);\n\nQuestion: What Kerry's percentage where 66 people voted for another candidate?" }, { "role": "assistant", "content": "SELECT \"kerrypct\" FROM \"by_county\" WHERE \"othersnum\"=66;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Can you tell me the average Laps that has the Time of +17.485, and the Grid smaller than 7?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"125cc_classification\" WHERE \"time\"='+17.485' AND \"grid\"<7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"125cc_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Can you tell me the sum of Grid that has the Manufacturer of aprilia, and the sandro cortese?" }, { "role": "assistant", "content": "SELECT SUM(\"grid\") FROM \"125cc_classification\" WHERE \"manufacturer\"='aprilia' AND \"rider\"='sandro cortese';" } ]
[ { "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_time\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"arena_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date of game 21?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"regular_season\" WHERE \"game\"=21;" } ]
[ { "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_time\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"arena_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game on June 10?" }, { "role": "assistant", "content": "SELECT \"score_time\" FROM \"regular_season\" WHERE \"date\"='june 10';" } ]
[ { "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 \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is Sum of Round, when College/Junior/Club Team is Brandon Wheat Kings ( WHL ), when Player is Mike Perovich (D), and when Pick is less than 23?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"draft_picks\" WHERE \"college_junior_club_team\"='brandon wheat kings ( whl )' AND \"player\"='mike perovich (d)' AND \"pick\"<23;" } ]
[ { "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 \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college_junior_club_team\" text\n);\n\nQuestion: What is the sum of Round, when Player is Tim Hunter (RW), and when Pick is less than 54?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"draft_picks\" WHERE \"player\"='tim hunter (rw)' AND \"pick\"<54;" } ]
[ { "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: Who is the outgoing manager who was replaced by j\u00fcrgen klopp?" }, { "role": "assistant", "content": "SELECT \"outgoing_manager\" FROM \"managerial_changes\" WHERE \"replaced_by\"='j\u00fcrgen klopp';" } ]
[ { "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 is the date of appointment of the manager who was replaced by markus babbel?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"replaced_by\"='markus babbel';" } ]
[ { "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 manner of depature of the manager with a date of appointment on 23 November 2008?" }, { "role": "assistant", "content": "SELECT \"manner_of_departure\" FROM \"managerial_changes\" WHERE \"date_of_appointment\"='23 november 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: Who replaced the manager of team arminia bielefeld?" }, { "role": "assistant", "content": "SELECT \"replaced_by\" FROM \"managerial_changes\" WHERE \"team\"='arminia bielefeld';" } ]
[ { "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 is the date of vacancy of team fc bayern munich, which had a date of appointment on 27 April 2009?" }, { "role": "assistant", "content": "SELECT \"date_of_vacancy\" FROM \"managerial_changes\" WHERE \"team\"='fc bayern munich' AND \"date_of_appointment\"='27 april 2009';" } ]
[ { "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 is the date of appointment of outgoing manager fred rutten, who had a sacked manner of departure?" }, { "role": "assistant", "content": "SELECT \"date_of_appointment\" FROM \"managerial_changes\" WHERE \"manner_of_departure\"='sacked' AND \"outgoing_manager\"='fred rutten';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"title\" text,\n \"series\" text,\n \"release\" real,\n \"featuring\" text,\n \"writer\" text,\n \"director\" text,\n \"length\" text,\n \"release_date\" text\n);\n\nQuestion: What was the length when James Swallow had a release longer than 2.1?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"external_links\" WHERE \"writer\"='james swallow' AND \"release\">2.1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"title\" text,\n \"series\" text,\n \"release\" real,\n \"featuring\" text,\n \"writer\" text,\n \"director\" text,\n \"length\" text,\n \"release_date\" text\n);\n\nQuestion: Who wrote Infiltration?" }, { "role": "assistant", "content": "SELECT \"writer\" FROM \"external_links\" WHERE \"title\"='infiltration';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"title\" text,\n \"series\" text,\n \"release\" real,\n \"featuring\" text,\n \"writer\" text,\n \"director\" text,\n \"length\" text,\n \"release_date\" text\n);\n\nQuestion: What was the earliest release for Pathogen directed by Sharon Gosling?" }, { "role": "assistant", "content": "SELECT MIN(\"release\") FROM \"external_links\" WHERE \"director\"='sharon gosling' AND \"title\"='pathogen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"title\" text,\n \"series\" text,\n \"release\" real,\n \"featuring\" text,\n \"writer\" text,\n \"director\" text,\n \"length\" text,\n \"release_date\" text\n);\n\nQuestion: What was the length of release 3.6?" }, { "role": "assistant", "content": "SELECT \"length\" FROM \"external_links\" WHERE \"release\"=3.6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_12\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What day was the score for tournament of alcoba\u00e7a 6\u20133, 2\u20136, 7\u20135?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_12\" WHERE \"tournament\"='alcoba\u00e7a' AND \"score\"='6\u20133, 2\u20136, 7\u20135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_12\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score for alcoba\u00e7a when the opponent was in the final of xinyun han?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_12\" WHERE \"tournament\"='alcoba\u00e7a' AND \"opponent_in_the_final\"='xinyun han';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_12\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score when the opponent was irena pavlovic and the surface was hard?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"singles_12\" WHERE \"surface\"='hard' AND \"opponent_in_the_final\"='irena pavlovic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_12\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the opponent in the final when the score was 6\u20133, 2\u20136, 7\u20135?" }, { "role": "assistant", "content": "SELECT \"opponent_in_the_final\" FROM \"singles_12\" WHERE \"score\"='6\u20133, 2\u20136, 7\u20135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_12\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What day was the surface clay and the score 6\u20131, 6\u20134?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_12\" WHERE \"surface\"='clay' AND \"score\"='6\u20131, 6\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cognates_of_core_hangul_letters\" (\n \"hangul\" text,\n \"phagspa\" text,\n \"tibetan\" text,\n \"phoenician\" text,\n \"greek\" text,\n \"latin\" text\n);\n\nQuestion: What is the Phoenician letter for the Hangul of \u3139?" }, { "role": "assistant", "content": "SELECT \"phoenician\" FROM \"cognates_of_core_hangul_letters\" WHERE \"hangul\"='\u3139';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cognates_of_core_hangul_letters\" (\n \"hangul\" text,\n \"phagspa\" text,\n \"tibetan\" text,\n \"phoenician\" text,\n \"greek\" text,\n \"latin\" text\n);\n\nQuestion: What is the Latin letter for the Tibetan of \u0f66?" }, { "role": "assistant", "content": "SELECT \"latin\" FROM \"cognates_of_core_hangul_letters\" WHERE \"tibetan\"='\u0f66';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cognates_of_core_hangul_letters\" (\n \"hangul\" text,\n \"phagspa\" text,\n \"tibetan\" text,\n \"phoenician\" text,\n \"greek\" text,\n \"latin\" text\n);\n\nQuestion: to the Latin of f, y, u/v/w?" }, { "role": "assistant", "content": "SELECT \"greek\" FROM \"cognates_of_core_hangul_letters\" WHERE \"latin\"='f, y, u/v/w';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cognates_of_core_hangul_letters\" (\n \"hangul\" text,\n \"phagspa\" text,\n \"tibetan\" text,\n \"phoenician\" text,\n \"greek\" text,\n \"latin\" text\n);\n\nQuestion: What is the Hangul equivalent of the Greek \u03dd, \u03c5?" }, { "role": "assistant", "content": "SELECT \"hangul\" FROM \"cognates_of_core_hangul_letters\" WHERE \"greek\"='\u03dd, \u03c5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cognates_of_core_hangul_letters\" (\n \"hangul\" text,\n \"phagspa\" text,\n \"tibetan\" text,\n \"phoenician\" text,\n \"greek\" text,\n \"latin\" text\n);\n\nQuestion: What is the Latin equivalent for the Phagspa of \ua859?" }, { "role": "assistant", "content": "SELECT \"latin\" FROM \"cognates_of_core_hangul_letters\" WHERE \"phagspa\"='\ua859';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"tournament\" text,\n \"country\" text,\n \"location\" text,\n \"current_venue\" text,\n \"began\" real,\n \"court_surface\" text\n);\n\nQuestion: What was the surface played on for the match than began before 1897?" }, { "role": "assistant", "content": "SELECT \"court_surface\" FROM \"tournaments\" WHERE \"began\"<1897;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"tournament\" text,\n \"country\" text,\n \"location\" text,\n \"current_venue\" text,\n \"began\" real,\n \"court_surface\" text\n);\n\nQuestion: For the Indian Wells Masters tournament, what was the country?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"tournaments\" WHERE \"tournament\"='indian wells masters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"tournament\" text,\n \"country\" text,\n \"location\" text,\n \"current_venue\" text,\n \"began\" real,\n \"court_surface\" text\n);\n\nQuestion: Which location was in China, and played on a hard court?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"tournaments\" WHERE \"court_surface\"='hard' AND \"country\"='china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournaments\" (\n \"tournament\" text,\n \"country\" text,\n \"location\" text,\n \"current_venue\" text,\n \"began\" real,\n \"court_surface\" text\n);\n\nQuestion: What country was the Paris Masters tournament played in?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"tournaments\" WHERE \"tournament\"='paris masters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"scorers\" text\n);\n\nQuestion: Who was the opponent when the H/A was H and the scorer was Ferguson?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"pre_season_and_friendlies\" WHERE \"h_a\"='h' AND \"scorers\"='ferguson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"scorers\" text\n);\n\nQuestion: Who was the opponent on 11 August 1991 when the H/A was H?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"pre_season_and_friendlies\" WHERE \"h_a\"='h' AND \"date\"='11 august 1991';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"scorers\" text\n);\n\nQuestion: What was the H/A when the scorer was Hughes?" }, { "role": "assistant", "content": "SELECT \"h_a\" FROM \"pre_season_and_friendlies\" WHERE \"scorers\"='hughes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_grossing_films_u_s\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"gross\" text\n);\n\nQuestion: What was the film that grossed $26,010,864 ranked?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"top_grossing_films_u_s\" WHERE \"gross\"='$26,010,864';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_grossing_films_u_s\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"gross\" text\n);\n\nQuestion: How much did Universal Studio's film Xanadu gross?" }, { "role": "assistant", "content": "SELECT \"gross\" FROM \"top_grossing_films_u_s\" WHERE \"studio\"='universal' AND \"title\"='xanadu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_grossing_films_u_s\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director_s\" text,\n \"gross\" text\n);\n\nQuestion: What is the rank of Bronco Billy?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"top_grossing_films_u_s\" WHERE \"title\"='bronco billy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_conference\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"nickname\" text\n);\n\nQuestion: Name the lowest Founded with the Name cougars?" }, { "role": "assistant", "content": "SELECT MIN(\"founded\") FROM \"central_conference\" WHERE \"nickname\"='cougars';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_conference\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"nickname\" text\n);\n\nQuestion: Which Affiliation has a Nickname of cougars?" }, { "role": "assistant", "content": "SELECT \"affiliation\" FROM \"central_conference\" WHERE \"nickname\"='cougars';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_conference\" (\n \"institution\" text,\n \"location\" text,\n \"founded\" real,\n \"affiliation\" text,\n \"nickname\" text\n);\n\nQuestion: Name the Founded which has a Affiliation of private/methodist?" }, { "role": "assistant", "content": "SELECT MAX(\"founded\") FROM \"central_conference\" WHERE \"affiliation\"='private/methodist';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history_and_variations\" (\n \"date\" text,\n \"region\" text,\n \"label\" text,\n \"catalogue\" text,\n \"format\" text\n);\n\nQuestion: What is Label, when Date is 1987?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_history_and_variations\" WHERE \"date\"='1987';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history_and_variations\" (\n \"date\" text,\n \"region\" text,\n \"label\" text,\n \"catalogue\" text,\n \"format\" text\n);\n\nQuestion: What is Date, when Format is Vinyl, and when Label is Mercury?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history_and_variations\" WHERE \"format\"='vinyl' AND \"label\"='mercury';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history_and_variations\" (\n \"date\" text,\n \"region\" text,\n \"label\" text,\n \"catalogue\" text,\n \"format\" text\n);\n\nQuestion: What is Date, when Region is Yugoslavia?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history_and_variations\" WHERE \"region\"='yugoslavia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history_and_variations\" (\n \"date\" text,\n \"region\" text,\n \"label\" text,\n \"catalogue\" text,\n \"format\" text\n);\n\nQuestion: What is Format, when Label is Bronze, when Date is 1982, and when Catalogue is 204 636?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history_and_variations\" WHERE \"label\"='bronze' AND \"date\"='1982' AND \"catalogue\"='204 636';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history_and_variations\" (\n \"date\" text,\n \"region\" text,\n \"label\" text,\n \"catalogue\" text,\n \"format\" text\n);\n\nQuestion: What is Date, when Label is Jugoton?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history_and_variations\" WHERE \"label\"='jugoton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cycles\" (\n \"cycle\" real,\n \"premiere_date\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"number_of_contestants\" text,\n \"international_destinations\" text\n);\n\nQuestion: What is Premier Date, when Cycle is less than 2?" }, { "role": "assistant", "content": "SELECT \"premiere_date\" FROM \"cycles\" WHERE \"cycle\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cycles\" (\n \"cycle\" real,\n \"premiere_date\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"number_of_contestants\" text,\n \"international_destinations\" text\n);\n\nQuestion: What is the lowest Cycle, when Number Of Contestants is 11, and when International Destinations is Paris Gran Canaria?" }, { "role": "assistant", "content": "SELECT MIN(\"cycle\") FROM \"cycles\" WHERE \"number_of_contestants\"='11' AND \"international_destinations\"='paris gran canaria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cycles\" (\n \"cycle\" real,\n \"premiere_date\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"number_of_contestants\" text,\n \"international_destinations\" text\n);\n\nQuestion: What is the highest Cycle, when the Number of Constestants is 11, and when Premiere Date is September 3, 2012?" }, { "role": "assistant", "content": "SELECT MAX(\"cycle\") FROM \"cycles\" WHERE \"number_of_contestants\"='11' AND \"premiere_date\"='september 3, 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cycles\" (\n \"cycle\" real,\n \"premiere_date\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"number_of_contestants\" text,\n \"international_destinations\" text\n);\n\nQuestion: What is Number of Contestants, when Cycle is 4?" }, { "role": "assistant", "content": "SELECT \"number_of_contestants\" FROM \"cycles\" WHERE \"cycle\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cycles\" (\n \"cycle\" real,\n \"premiere_date\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"number_of_contestants\" text,\n \"international_destinations\" text\n);\n\nQuestion: What is Number of Contestants, when International Destinations is London Lisbon?" }, { "role": "assistant", "content": "SELECT \"number_of_contestants\" FROM \"cycles\" WHERE \"international_destinations\"='london lisbon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the lowest pick with fewer than 3 rounds and more than 4 overall?" }, { "role": "assistant", "content": "SELECT MIN(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"round\"<3 AND \"overall\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which round has more than 79 overall and a position of QB?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"washington_redskins_draft_history\" WHERE \"position\"='qb' AND \"overall\">79;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Notre Dame position has a pick lower than 5 and round 7?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"pick\"<5 AND \"college\"='notre dame' AND \"round\"=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\" text\n);\n\nQuestion: What was week 17's date?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=17;" } ]
[ { "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\" text\n);\n\nQuestion: Which Opponent has a Result of l 24\u20133?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='l 24\u20133';" } ]
[ { "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\" text\n);\n\nQuestion: What was week 5's result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" 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 score for Groves High School when the high assist was Giovanni Riley (9)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"2009_season_schedule\" WHERE \"location_attendance\"='groves high school' AND \"high_assists\"='giovanni riley (9)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" 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 high points for opponent Mid-Michigan destroyers on January 3?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"2009_season_schedule\" WHERE \"opponent\"='mid-michigan destroyers' AND \"date\"='january 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" 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 opponent is at Richmond Academy?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"2009_season_schedule\" WHERE \"location_attendance\"='richmond academy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" 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 March 29?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"2009_season_schedule\" WHERE \"date\"='march 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009_season_schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"home_away\" 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: Which opponent scored 95-101?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"2009_season_schedule\" WHERE \"score\"='95-101';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_honour_board\" (\n \"year\" real,\n \"president\" text,\n \"m_finishing_position\" text,\n \"m_coach\" text,\n \"m_best_fairest\" text,\n \"m_leading_goalkicker\" text\n);\n\nQuestion: Who was the (M) Best & Fairest when ray kaduck was president and richard keane was coach?" }, { "role": "assistant", "content": "SELECT \"m_best_fairest\" FROM \"club_honour_board\" WHERE \"president\"='ray kaduck' AND \"m_coach\"='richard keane';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_honour_board\" (\n \"year\" real,\n \"president\" text,\n \"m_finishing_position\" text,\n \"m_coach\" text,\n \"m_best_fairest\" text,\n \"m_leading_goalkicker\" text\n);\n\nQuestion: What was the (M) Finishe position when ray kaduck was president and corey bowen was coach?" }, { "role": "assistant", "content": "SELECT \"m_finishing_position\" FROM \"club_honour_board\" WHERE \"president\"='ray kaduck' AND \"m_coach\"='corey bowen';" } ]
[ { "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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Game has a Score of l 102\u2013114 (ot)?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"score\"='l 102\u2013114 (ot)';" } ]
[ { "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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Date of january 31?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='january 31';" } ]
[ { "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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Game larger than 34, and a Date of january 9?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\">34 AND \"date\"='january 9';" } ]
[ { "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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which Location Attendance has a Record of 11\u201334?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"record\"='11\u201334';" } ]
[ { "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 record for the w 100-99 score?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='w 100-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 for the 23-17 record?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"game_log\" WHERE \"record\"='23-17';" } ]
[ { "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 before game 44, and a 20-16 record?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"game_log\" WHERE \"game\"<44 AND \"record\"='20-16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result for the match with entry Match Reports?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"match\"='match reports';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the location of the match that had a result of 3-3?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"result\"='3-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the lineup for match 12 that had a competition of Group Stage?" }, { "role": "assistant", "content": "SELECT \"lineup\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"competition\"='group stage' AND \"match\"='12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result for the match held in Boston?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"location\"='boston';" } ]
[ { "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_attendance\" text,\n \"record\" text\n);\n\nQuestion: How many total games were played against @ St. Louis Hawks this season?" }, { "role": "assistant", "content": "SELECT SUM(\"game\") FROM \"game_log\" WHERE \"opponent\"='@ st. louis hawks';" } ]
[ { "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_attendance\" text,\n \"record\" text\n);\n\nQuestion: On what day was Game 48 played?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"game\"=48;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nba\" (\n \"year\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nba_club\" text\n);\n\nQuestion: What is the pick number later than round 1, for Reyshawn Terry?" }, { "role": "assistant", "content": "SELECT AVG(\"pick\") FROM \"team_players_drafted_into_the_nba\" WHERE \"round\">1 AND \"player\"='reyshawn terry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nba\" (\n \"year\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nba_club\" text\n);\n\nQuestion: What round was the player Ty Lawson with a pick earlier than 18?" }, { "role": "assistant", "content": "SELECT AVG(\"round\") FROM \"team_players_drafted_into_the_nba\" WHERE \"player\"='ty lawson' AND \"pick\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nba\" (\n \"year\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nba_club\" text\n);\n\nQuestion: What is the pick number for Danny Green in a round less than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"team_players_drafted_into_the_nba\" WHERE \"player\"='danny green' AND \"round\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nba\" (\n \"year\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nba_club\" text\n);\n\nQuestion: What is the pick number in a year earlier than 2009, with a round higher than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"team_players_drafted_into_the_nba\" WHERE \"year\"<2009 AND \"round\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variety\" (\n \"year\" real,\n \"network\" text,\n \"title\" text,\n \"notes\" text,\n \"language\" text\n);\n\nQuestion: What are the notes for the Mandarin Chinese program on CTV earlier than 2013?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"variety\" WHERE \"year\"<2013 AND \"language\"='mandarin chinese' AND \"network\"='ctv';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variety\" (\n \"year\" real,\n \"network\" text,\n \"title\" text,\n \"notes\" text,\n \"language\" text\n);\n\nQuestion: What is the language for Strong Heart?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"variety\" WHERE \"title\"='strong heart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variety\" (\n \"year\" real,\n \"network\" text,\n \"title\" text,\n \"notes\" text,\n \"language\" text\n);\n\nQuestion: What is the title for the Korean progran on KBS2?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"variety\" WHERE \"language\"='korean' AND \"network\"='kbs2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variety\" (\n \"year\" real,\n \"network\" text,\n \"title\" text,\n \"notes\" text,\n \"language\" text\n);\n\nQuestion: What is the network that aired Star King prior to 2011?" }, { "role": "assistant", "content": "SELECT \"network\" FROM \"variety\" WHERE \"year\"<2011 AND \"title\"='star king';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variety\" (\n \"year\" real,\n \"network\" text,\n \"title\" text,\n \"notes\" text,\n \"language\" text\n);\n\nQuestion: What are the notes for Happy Camp?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"variety\" WHERE \"title\"='happy camp';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Pick has a College of ohio state?" }, { "role": "assistant", "content": "SELECT MIN(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='ohio state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round has a Position of lb, and a Pick smaller than 25?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"washington_redskins_draft_history\" WHERE \"position\"='lb' AND \"pick\"<25;" } ]
[ { "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\" text\n);\n\nQuestion: Which week has a result L 56-3?" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='l 56-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Where is the player Raymond Floyd?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"player\"='raymond floyd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which country has a score of 71-72-73-69=285?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"score\"='71-72-73-69=285';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the highest Money ( $ ), when Score is \"69-71-70-74=284\"?" }, { "role": "assistant", "content": "SELECT MAX(\"money\") FROM \"final_round\" WHERE \"score\"='69-71-70-74=284';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is Place, when Score is \"71-71-69-71=282\"?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_round\" WHERE \"score\"='71-71-69-71=282';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is Score, when Player is \"Dow Finsterwald\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_round\" WHERE \"player\"='dow finsterwald';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: Which venue did the runner have a note of 1:23:07?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"achievements\" WHERE \"notes\"='1:23:07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: What is the note result when the runner finished 19th in 2008?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"achievements\" WHERE \"year\"=2008 AND \"position\"='19th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"division_one_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What are the points 1 for the team with position less than 13 and goal difference of +16?" }, { "role": "assistant", "content": "SELECT \"points_1\" FROM \"division_one_final_table\" WHERE \"position\"<13 AND \"goal_difference\"='+16';" } ]