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 \"girls_basketball_players_and_coaches_of_\" (\n \"year\" text,\n \"player\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: Where did Maya Moore attend school?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"girls_basketball_players_and_coaches_of_\" WHERE \"player\"='maya moore';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_clausura_closing_tournament\" (\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"diff\" real\n);\n\nQuestion: What is the difference with a loss smaller than 5 and points lower than 32?" }, { "role": "assistant", "content": "SELECT COUNT(\"diff\") FROM \"torneo_clausura_closing_tournament\" WHERE \"lost\"<5 AND \"points\"<32;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_clausura_closing_tournament\" (\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"diff\" real\n);\n\nQuestion: Which loss had a player lower than 18?" }, { "role": "assistant", "content": "SELECT MIN(\"lost\") FROM \"torneo_clausura_closing_tournament\" WHERE \"played\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010s_raiders_5_2\" (\n \"year\" real,\n \"date\" text,\n \"winner\" text,\n \"result\" text,\n \"loser\" text,\n \"location\" text\n);\n\nQuestion: Who won the 2012 game that had a score of 15\u20130?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"2010s_raiders_5_2\" WHERE \"year\"=2012 AND \"result\"='15\u20130';" } ]
[ { "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: Tell me the week for result of l 31-27, and an Attendance smaller than 85,865" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='l 31-27' AND \"attendance\"<'85,865';" } ]
[ { "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: I want the date for week less than 5 and attendance more than 43,922 with a result of w 21-7" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"<5 AND \"attendance\">'43,922' AND \"result\"='w 21-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_superlative_academy_award_winner\" (\n \"superlative\" text,\n \"director\" text,\n \"record_set\" text,\n \"year\" text,\n \"notes\" text\n);\n\nQuestion: Who had notes of Prizzi's Honor?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"list_of_superlative_academy_award_winner\" WHERE \"notes\"='prizzi''s honor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_superlative_academy_award_winner\" (\n \"superlative\" text,\n \"director\" text,\n \"record_set\" text,\n \"year\" text,\n \"notes\" text\n);\n\nQuestion: What Superlative had a record set of 12 nominations?" }, { "role": "assistant", "content": "SELECT \"superlative\" FROM \"list_of_superlative_academy_award_winner\" WHERE \"record_set\"='12 nominations';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"driver\" text,\n \"car_num\" real,\n \"make\" text,\n \"points\" text,\n \"laps\" real,\n \"winnings\" text\n);\n\nQuestion: What is the highest number of laps completed by driver Joe Nemechek?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"race_results\" WHERE \"driver\"='joe nemechek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the home team score when they played at Victoria Park?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_18\" WHERE \"venue\"='victoria park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the away team score when the home team score was 11.18 (84)?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_18\" WHERE \"home_team_score\"='11.18 (84)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the venue when the home team was Fitzroy?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_18\" WHERE \"home_team\"='fitzroy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What team was the home team when the home team score was 12.16 (88)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_18\" WHERE \"home_team_score\"='12.16 (88)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_18\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What team was the away team when the home team score was 16.11 (107)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_18\" WHERE \"home_team_score\"='16.11 (107)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the date for proposed for revere textile prints corporation" }, { "role": "assistant", "content": "SELECT \"proposed\" FROM \"superfund_sites\" WHERE \"name\"='revere textile prints corporation';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the deleted for tolland?" }, { "role": "assistant", "content": "SELECT \"deleted\" FROM \"superfund_sites\" WHERE \"county\"='tolland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What venue has the away side scoring 16.14 (110)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_2\" WHERE \"away_team_score\"='16.14 (110)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away side score when hawthorn is the home side?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_2\" WHERE \"home_team\"='hawthorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the average lap total for grids under 19 and a Time/Retired of +4 laps?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"time_retired\"='+4 laps' AND \"grid\"<19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Who drive over 43 laps in grid 5?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\">43 AND \"grid\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team played away in the game that the home team scored 7.8 (50)?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_4\" WHERE \"home_team_score\"='7.8 (50)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the home team score when the away team scored 6.8 (44)?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_4\" WHERE \"away_team_score\"='6.8 (44)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Away team score has a Venue of princes park?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"venue\"='princes park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Away team score has a Home team of melbourne?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_7\" WHERE \"home_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"genre\" text,\n \"official_website\" text\n);\n\nQuestion: What genre is revolving doors of vengeance \u9152\u5e97\u98a8\u96f2?" }, { "role": "assistant", "content": "SELECT \"genre\" FROM \"second_line_series\" WHERE \"english_title_chinese_title\"='revolving doors of vengeance \u9152\u5e97\u98a8\u96f2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_line_series\" (\n \"airing_date\" text,\n \"english_title_chinese_title\" text,\n \"number_of_episodes\" real,\n \"genre\" text,\n \"official_website\" text\n);\n\nQuestion: What is the english title of the modern drama, episode 20, that airs on 26 sep- 21 oct?" }, { "role": "assistant", "content": "SELECT \"english_title_chinese_title\" FROM \"second_line_series\" WHERE \"genre\"='modern drama' AND \"number_of_episodes\"=20 AND \"airing_date\"='26 sep- 21 oct';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_41\" text,\n \"d_42\" text,\n \"d_43\" text,\n \"d_44\" text,\n \"d_45\" text,\n \"d_46\" text,\n \"d_47\" text,\n \"d_48\" text,\n \"d_49\" text,\n \"d_50_o\" text\n);\n\nQuestion: What is the D48 when the D 50 O is d 31?" }, { "role": "assistant", "content": "SELECT \"d_48\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_50_o\"='d 31';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_details\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: What was Catalogue tojp 60121-22's Date?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_details\" WHERE \"catalogue\"='tojp 60121-22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_details\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: What was the Date of Country of United States?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_details\" WHERE \"country\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_details\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: What Catalogue is Dated 14 november 2003, with the Format compact disc?" }, { "role": "assistant", "content": "SELECT \"catalogue\" FROM \"release_details\" WHERE \"date\"='14 november 2003' AND \"format\"='compact disc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_details\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: What is the Label for Date of 14 November 2003, and Catalogue tojp 60121-22?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_details\" WHERE \"date\"='14 november 2003' AND \"catalogue\"='tojp 60121-22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_details\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: What Label was Catalogued tojp 60121-22?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"release_details\" WHERE \"catalogue\"='tojp 60121-22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: What is the record for Norway on 23 august 1981?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"men\" WHERE \"nationality\"='norway' AND \"date\"='23 august 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text\n);\n\nQuestion: What is the record for the 20000 m walk?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"men\" WHERE \"event\"='20000 m walk';" } ]
[ { "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: When was the Bye week?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='bye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_quad\" text,\n \"u15_2nd_quad\" text,\n \"u15_3rd_quad\" text,\n \"u15_4th_quad\" text,\n \"u15_5th_quad\" text,\n \"u15_6th_quad\" text\n);\n\nQuestion: Which Open 2nd VIII had a U15 6th Quad of BGS and a U16 1st VII of TSS?" }, { "role": "assistant", "content": "SELECT \"open_2nd_viii\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"u15_6th_quad\"='bgs' AND \"u16_1st_viii\"='tss';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_quad\" text,\n \"u15_2nd_quad\" text,\n \"u15_3rd_quad\" text,\n \"u15_4th_quad\" text,\n \"u15_5th_quad\" text,\n \"u15_6th_quad\" text\n);\n\nQuestion: What U15 3rd Quad has a U15 2nd Quad of ACGS?" }, { "role": "assistant", "content": "SELECT \"u15_3rd_quad\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"u15_2nd_quad\"='acgs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_quad\" text,\n \"u15_2nd_quad\" text,\n \"u15_3rd_quad\" text,\n \"u15_4th_quad\" text,\n \"u15_5th_quad\" text,\n \"u15_6th_quad\" text\n);\n\nQuestion: Which U15 4th Quad had a U15 3rd Quad of BBC and U15 6th Quad of GT?" }, { "role": "assistant", "content": "SELECT \"u15_4th_quad\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"u15_3rd_quad\"='bbc' AND \"u15_6th_quad\"='gt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"winning_head_of_the_river_championship_e\" (\n \"crew\" real,\n \"open_1st_viii\" text,\n \"open_2nd_viii\" text,\n \"open_3rd_viii\" text,\n \"u16_1st_viii\" text,\n \"u16_2nd_viii\" text,\n \"u16_3rd_viii\" text,\n \"u15_1st_quad\" text,\n \"u15_2nd_quad\" text,\n \"u15_3rd_quad\" text,\n \"u15_4th_quad\" text,\n \"u15_5th_quad\" text,\n \"u15_6th_quad\" text\n);\n\nQuestion: Which U15 1st Quad had an Open 3rd VIII of BBC and U16 3rd VIII of BBC?" }, { "role": "assistant", "content": "SELECT \"u15_1st_quad\" FROM \"winning_head_of_the_river_championship_e\" WHERE \"open_3rd_viii\"='bbc' AND \"u16_3rd_viii\"='bbc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"athlete\" text,\n \"nationality\" text,\n \"3_60\" text,\n \"3_80\" text,\n \"3_95\" text,\n \"result\" text\n);\n\nQuestion: What was the nationality of the athlete with a final result of 4.50?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"final\" WHERE \"result\"='4.50';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final\" (\n \"athlete\" text,\n \"nationality\" text,\n \"3_60\" text,\n \"3_80\" text,\n \"3_95\" text,\n \"result\" text\n);\n\nQuestion: What was the athlete with a final result of 4.30?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"final\" WHERE \"result\"='4.30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"alpine_club_classification\" (\n \"ave_no\" text,\n \"name\" text,\n \"country\" text,\n \"highest_mountain\" text,\n \"height_m\" real\n);\n\nQuestion: Which country has the Highest mountain of rettlkirchspitze?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"alpine_club_classification\" WHERE \"highest_mountain\"='rettlkirchspitze';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"alpine_club_classification\" (\n \"ave_no\" text,\n \"name\" text,\n \"country\" text,\n \"highest_mountain\" text,\n \"height_m\" real\n);\n\nQuestion: What is the average height with the Highest mountain of hochgall?" }, { "role": "assistant", "content": "SELECT AVG(\"height_m\") FROM \"alpine_club_classification\" WHERE \"highest_mountain\"='hochgall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"single\" text,\n \"u_s_country\" text,\n \"u_s\" text,\n \"u_s_ac\" text,\n \"album\" text\n);\n\nQuestion: What US Country released an album of singles only in 1967?" }, { "role": "assistant", "content": "SELECT \"u_s_country\" FROM \"singles\" WHERE \"album\"='singles only' AND \"year\"=1967;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"single\" text,\n \"u_s_country\" text,\n \"u_s\" text,\n \"u_s_ac\" text,\n \"album\" text\n);\n\nQuestion: What was the best album in 1965?" }, { "role": "assistant", "content": "SELECT \"u_s_ac\" FROM \"singles\" WHERE \"album\"='the best' AND \"year\"=1965;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is the result of the fight that had a tko (low kicks)?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"kickboxing_record\" WHERE \"method\"='tko (low kicks)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What event went under 3 rounds and was no contest (punch after knockdown)?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"kickboxing_record\" WHERE \"round\"<3 AND \"method\"='no contest (punch after knockdown)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What event was in hong kong and went less than 2 rounds?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"kickboxing_record\" WHERE \"round\"<2 AND \"location\"='hong kong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kickboxing_record\" (\n \"result\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: How many rounds was the fight against carter williams?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"kickboxing_record\" WHERE \"opponent\"='carter williams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: In rounds 7-13 what engine was featured?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"rounds\"='7-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What score was conceded by Richmond?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_14\" WHERE \"home_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"iran\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text,\n \"goals\" real\n);\n\nQuestion: What is the number of Goals on 1950-05-30?" }, { "role": "assistant", "content": "SELECT COUNT(\"goals\") FROM \"iran\" WHERE \"date\"='1950-05-30';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"iran\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text,\n \"goals\" real\n);\n\nQuestion: In 1948-10-28, what were the lowest Goals in Tehran, Iran?" }, { "role": "assistant", "content": "SELECT MIN(\"goals\") FROM \"iran\" WHERE \"venue\"='tehran, iran' AND \"date\"='1948-10-28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"iran\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text,\n \"goals\" real\n);\n\nQuestion: In what Venue was the Result 1-3?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"iran\" WHERE \"result\"='1-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"iran\" (\n \"date\" text,\n \"venue\" text,\n \"result\" text,\n \"competition\" text,\n \"goals\" real\n);\n\nQuestion: In 1948-10-28, in what Venue was the Competition of International Match held?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"iran\" WHERE \"competition\"='international match' AND \"date\"='1948-10-28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What was the Zakspeed 1500/4 1.5 l4 t chassis?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"drivers_and_constructors\" WHERE \"engine\"='zakspeed 1500/4 1.5 l4 t';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What was the Michele Alboreto's engine?" }, { "role": "assistant", "content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"driver\"='michele alboreto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elected_candidates\" (\n \"rank\" real,\n \"list\" text,\n \"candidate_name\" text,\n \"gender\" text,\n \"religion\" text,\n \"votes\" real\n);\n\nQuestion: What is the average rank for antun salman?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"elected_candidates\" WHERE \"candidate_name\"='antun salman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elected_candidates\" (\n \"rank\" real,\n \"list\" text,\n \"candidate_name\" text,\n \"gender\" text,\n \"religion\" text,\n \"votes\" real\n);\n\nQuestion: Khalil chawka has a gender of \u2642, a religion of \u262a, and how many votes?" }, { "role": "assistant", "content": "SELECT \"votes\" FROM \"elected_candidates\" WHERE \"gender\"='\u2642' AND \"religion\"='\u262a' AND \"candidate_name\"='khalil chawka';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elected_candidates\" (\n \"rank\" real,\n \"list\" text,\n \"candidate_name\" text,\n \"gender\" text,\n \"religion\" text,\n \"votes\" real\n);\n\nQuestion: Who has a religion of \u262a and more than 1853 votes?" }, { "role": "assistant", "content": "SELECT \"candidate_name\" FROM \"elected_candidates\" WHERE \"votes\">1853 AND \"religion\"='\u262a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"disc_four_studio_highlights_1971_1976\" (\n \"track\" real,\n \"recorded\" text,\n \"original_issue\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What is the recorder has a Track more than 11 with a time 3:06" }, { "role": "assistant", "content": "SELECT \"recorded\" FROM \"disc_four_studio_highlights_1971_1976\" WHERE \"track\">11 AND \"time\"='3:06';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"disc_four_studio_highlights_1971_1976\" (\n \"track\" real,\n \"recorded\" text,\n \"original_issue\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: Which track has a title : Just a little bit" }, { "role": "assistant", "content": "SELECT MIN(\"track\") FROM \"disc_four_studio_highlights_1971_1976\" WHERE \"song_title\"='just a little bit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_records\" (\n \"season\" text,\n \"div\" text,\n \"pos\" text,\n \"pld\" text,\n \"pts\" text,\n \"play_offs\" text,\n \"trophy\" text\n);\n\nQuestion: What is the Trophy with a Season with 2008\u20132009?" }, { "role": "assistant", "content": "SELECT \"trophy\" FROM \"season_by_season_records\" WHERE \"season\"='2008\u20132009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"controversy\" (\n \"year\" real,\n \"name\" text,\n \"western_states\" text,\n \"vermont\" text,\n \"leadville\" text,\n \"wasatch\" text,\n \"total_time\" text\n);\n\nQuestion: What Wasatch time corresponds to a total time of 122:13:40?" }, { "role": "assistant", "content": "SELECT \"wasatch\" FROM \"controversy\" WHERE \"total_time\"='122:13:40';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_16_5_11\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_final\" text,\n \"score_in_final\" text\n);\n\nQuestion: Who were the opponents in the final on 9 January 1994?" }, { "role": "assistant", "content": "SELECT \"opponents_in_final\" FROM \"doubles_16_5_11\" WHERE \"date\"='9 january 1994';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was Melbourne's home team opponent?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_15\" WHERE \"away_team\"='melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_15\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was Richmond's away team opponent?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_15\" WHERE \"home_team\"='richmond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"name\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the average FA Cup value with a total greater than 2, a League Cup of 1, a league less than 3, and Paul Ince scoring?" }, { "role": "assistant", "content": "SELECT AVG(\"fa_cup\") FROM \"goalscorers\" WHERE \"total\">2 AND \"league_cup\"=1 AND \"name\"='paul ince' AND \"league\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"name\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the average total value in a League less than 1 with more than 1 League Cup?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"goalscorers\" WHERE \"league\"<1 AND \"league_cup\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"goalscorers\" (\n \"name\" text,\n \"league\" real,\n \"fa_cup\" real,\n \"league_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest value for League Cup when the League number is greater than 1, no FA Cups, and Brian Deane scoring?" }, { "role": "assistant", "content": "SELECT MIN(\"league_cup\") FROM \"goalscorers\" WHERE \"league\">1 AND \"name\"='brian deane' AND \"fa_cup\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"year\" real,\n \"name\" text,\n \"format_s\" text,\n \"label\" text\n);\n\nQuestion: Name the region before 2008 when name of best 1200" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"year\"<2008 AND \"name\"='best 1200';" } ]
[ { "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: What method resulted in a win and a time of 4:36?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"time\"='4:36';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: At what venue did the Essendon team play as an away team?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" WHERE \"away_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Who was the home team for the game played at Junction Oval?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_17\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the score of the home team when the away team was Geelong?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_17\" WHERE \"away_team\"='geelong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the venue where the away team ended in a score of 6.8 (44)?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"round_17\" WHERE \"away_team_score\"='6.8 (44)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the away team when the home team was South Melbourne?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_17\" WHERE \"home_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the name of the home team playing at the Junction Oval venue?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_17\" WHERE \"venue\"='junction oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sports\" (\n \"club\" text,\n \"league\" text,\n \"sport\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" text\n);\n\nQuestion: What is the total number of the established club of Lehigh Valley Storm?" }, { "role": "assistant", "content": "SELECT COUNT(\"established\") FROM \"sports\" WHERE \"club\"='lehigh valley storm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sports\" (\n \"club\" text,\n \"league\" text,\n \"sport\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" text\n);\n\nQuestion: What is the name of a league in the sport of baseball?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"sports\" WHERE \"sport\"='baseball';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sports\" (\n \"club\" text,\n \"league\" text,\n \"sport\" text,\n \"venue\" text,\n \"established\" real,\n \"championships\" text\n);\n\nQuestion: What venue does the soccer team Pennsylvania Stoners play in?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"sports\" WHERE \"sport\"='soccer' AND \"club\"='pennsylvania stoners';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What game number was played on March 4?" }, { "role": "assistant", "content": "SELECT AVG(\"game_num\") FROM \"march\" WHERE \"date\"='march 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"march\" (\n \"game_num\" real,\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What is the record when the visitor is Buffalo?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"march\" WHERE \"visitor\"='buffalo';" } ]
[ { "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: Tell me the number of attendance that has a result of l 35-17" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"result\"='l 35-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\" real\n);\n\nQuestion: I want the attendance for week larger than 10 and result of l 22-21" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\">10 AND \"result\"='l 22-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: Name for me the total number in attendance for week before 2 and result of t 24-24" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"result\"='t 24-24' AND \"week\"<2;" } ]
[ { "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: I want the greatest attendance when the opponent is the chicago bears" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='chicago bears';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the average attendance for a game against Phoenix?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"february\" WHERE \"visitor\"='phoenix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the home team in the February 22 game that Legace played in for the St. Louis Blues?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"february\" WHERE \"decision\"='legace' AND \"visitor\"='st. louis' AND \"date\"='february 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was Carlton's home team opponent?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_11\" WHERE \"away_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team at Lake Oval?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_11\" WHERE \"venue\"='lake oval';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was South Melbourne's away team opponent?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"home_team\"='south melbourne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_11\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team at Princes Park when the attendance was more than 30,848?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"round_11\" WHERE \"crowd\">'30,848' AND \"venue\"='princes park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the high grid with 27 laps?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"classification\" WHERE \"laps\"=27;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the high grid that has a Time/Retired of +6 laps, and under 69 laps?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"classification\" WHERE \"time_retired\"='+6 laps' AND \"laps\"<69;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"release_date\" text,\n \"peak_chart_position\" real,\n \"first_week_sales\" real,\n \"copies_sold\" real,\n \"album\" text\n);\n\nQuestion: What's the total number of copies sold for the single that sold 206,030 in the first week?" }, { "role": "assistant", "content": "SELECT COUNT(\"copies_sold\") FROM \"singles\" WHERE \"first_week_sales\"='206,030';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"release_format\" text,\n \"country\" text,\n \"label\" text,\n \"cat_no\" text,\n \"release_date\" real\n);\n\nQuestion: What was the latest release date for Ariola in Spain?" }, { "role": "assistant", "content": "SELECT MAX(\"release_date\") FROM \"release_history\" WHERE \"label\"='ariola' AND \"country\"='spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"release_format\" text,\n \"country\" text,\n \"label\" text,\n \"cat_no\" text,\n \"release_date\" real\n);\n\nQuestion: What type of format was released after 1979?" }, { "role": "assistant", "content": "SELECT \"release_format\" FROM \"release_history\" WHERE \"release_date\">1979;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"release_format\" text,\n \"country\" text,\n \"label\" text,\n \"cat_no\" text,\n \"release_date\" real\n);\n\nQuestion: On what date did Epic label start its release?" }, { "role": "assistant", "content": "SELECT SUM(\"release_date\") FROM \"release_history\" WHERE \"label\"='epic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: Which game had less than 270 rebounds and a rank lower than 5?" }, { "role": "assistant", "content": "SELECT \"games\" FROM \"rebounds\" WHERE \"rebounds\"<270 AND \"rank\"<5;" } ]