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 \"trades\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: WHo is the Visitor on april 14?" }, { "role": "assistant", "content": "SELECT \"visitor\" FROM \"trades\" WHERE \"date\"='april 14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"trades\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Record has a Visitor of quebec nordiques with a Score of 4\u20135?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"trades\" WHERE \"visitor\"='quebec nordiques' AND \"score\"='4\u20135';" } ]
[ { "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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What's the highest December against the Pittsburgh Penguins in a game larger than 27, with less than 41 points?" }, { "role": "assistant", "content": "SELECT MAX(\"december\") FROM \"regular_season\" WHERE \"game\">27 AND \"opponent\"='pittsburgh penguins' AND \"points\"<41;" } ]
[ { "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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What's the score for December of 30?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"december\"=30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_1\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goal_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the average number of games associated with 6 points and under 2 losses?" }, { "role": "assistant", "content": "SELECT AVG(\"games\") FROM \"group_1\" WHERE \"points\"=6 AND \"lost\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_1\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goal_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the low point total when there are over 5 games?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"group_1\" WHERE \"games\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"presidential_elections\" (\n \"year\" real,\n \"electors\" real,\n \"votes\" text,\n \"share_of_votes\" text,\n \"candidate\" text\n);\n\nQuestion: What was the share of votes when there were more than 56 electors and the year was more recent than 1950?" }, { "role": "assistant", "content": "SELECT \"share_of_votes\" FROM \"presidential_elections\" WHERE \"electors\">56 AND \"year\">1950;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"presidential_elections\" (\n \"year\" real,\n \"electors\" real,\n \"votes\" text,\n \"share_of_votes\" text,\n \"candidate\" text\n);\n\nQuestion: What is the total of electors when the share of votes was 11,0%?" }, { "role": "assistant", "content": "SELECT SUM(\"electors\") FROM \"presidential_elections\" WHERE \"share_of_votes\"='11,0%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Lost has Games larger than 7?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"world_championship_group_b_denmark\" WHERE \"games\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Points have a Lost smaller than 1, and Games larger than 7?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"world_championship_group_b_denmark\" WHERE \"lost\"<1 AND \"games\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Lost has Points larger than 13?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"world_championship_group_b_denmark\" WHERE \"points\">13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_denmark\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Points have a Drawn larger than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"world_championship_group_b_denmark\" WHERE \"drawn\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"one_cent_test_tokens\" (\n \"year_of_issue\" real,\n \"weight\" text,\n \"diameter\" text,\n \"thickness\" text,\n \"edge\" text\n);\n\nQuestion: Which Diameter has a Year of Issue of 1977?" }, { "role": "assistant", "content": "SELECT \"diameter\" FROM \"one_cent_test_tokens\" WHERE \"year_of_issue\"=1977;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"one_cent_test_tokens\" (\n \"year_of_issue\" real,\n \"weight\" text,\n \"diameter\" text,\n \"thickness\" text,\n \"edge\" text\n);\n\nQuestion: Which Year of Issue has a Thickness of 1.42mm?" }, { "role": "assistant", "content": "SELECT MAX(\"year_of_issue\") FROM \"one_cent_test_tokens\" WHERE \"thickness\"='1.42mm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"one_cent_test_tokens\" (\n \"year_of_issue\" real,\n \"weight\" text,\n \"diameter\" text,\n \"thickness\" text,\n \"edge\" text\n);\n\nQuestion: Which Diameter has a Thickness of 1.3mm?" }, { "role": "assistant", "content": "SELECT \"diameter\" FROM \"one_cent_test_tokens\" WHERE \"thickness\"='1.3mm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elected_me_ps_5\" (\n \"candidate\" text,\n \"party\" text,\n \"eu_party\" text,\n \"1st_count\" real,\n \"29th_count\" text\n);\n\nQuestion: Which party's candidate is Grech Louis Grech?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"elected_me_ps_5\" WHERE \"candidate\"='grech louis grech';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elected_me_ps_5\" (\n \"candidate\" text,\n \"party\" text,\n \"eu_party\" text,\n \"1st_count\" real,\n \"29th_count\" text\n);\n\nQuestion: Which eu party has a 29th count of 40,529?" }, { "role": "assistant", "content": "SELECT \"eu_party\" FROM \"elected_me_ps_5\" WHERE \"29th_count\"='40,529';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"elected_me_ps_5\" (\n \"candidate\" text,\n \"party\" text,\n \"eu_party\" text,\n \"1st_count\" real,\n \"29th_count\" text\n);\n\nQuestion: Which candidate's party is pl when the 29th count is 39,250?" }, { "role": "assistant", "content": "SELECT \"candidate\" FROM \"elected_me_ps_5\" WHERE \"party\"='pl' AND \"29th_count\"='39,250';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_2009\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: What is the sport played in Iowa City on February 14, 2009?" }, { "role": "assistant", "content": "SELECT \"sport\" FROM \"2008_2009\" WHERE \"site\"='iowa city' AND \"date\"='february 14, 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_2009\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: What is the series of the winning team in Iowa, for softball?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"2008_2009\" WHERE \"winning_team\"='iowa' AND \"sport\"='softball';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the score of the match that was against alberto berasategui?" }, { "role": "assistant", "content": "SELECT \"score_in_the_final\" FROM \"singles\" WHERE \"opponent_in_the_final\"='alberto berasategui';" } ]
[ { "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: How many rebounds does Ann Wauters have?" }, { "role": "assistant", "content": "SELECT COUNT(\"rebounds\") FROM \"rebounds\" WHERE \"name\"='ann wauters';" } ]
[ { "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: Who played 10 games?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"rebounds\" WHERE \"games\"=10;" } ]
[ { "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: What is the total number of rebounds values for Ann Wauters?" }, { "role": "assistant", "content": "SELECT COUNT(\"rebounds\") FROM \"rebounds\" WHERE \"name\"='ann wauters';" } ]
[ { "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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: Who did the Colts play against on September 25, 1966?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='september 25, 1966';" } ]
[ { "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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What is the date of the game with 40,005 in attendance?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='40,005';" } ]
[ { "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 \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What is the lowest week number for the game that was at milwaukee county stadium?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"game_site\"='milwaukee county stadium';" } ]
[ { "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: After week 11, what was the Result on December 13, 1964?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">11 AND \"date\"='december 13, 1964';" } ]
[ { "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: After week 8, what was the Attendance on November 1, 1964?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='november 1, 1964' AND \"week\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b1\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: What is the alternate of the nation with Piotras Gerasimovici as the second?" }, { "role": "assistant", "content": "SELECT \"alternate\" FROM \"group_b1\" WHERE \"second\"='piotras gerasimovici';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b1\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: What is the alternate of the nation with hubert gr\u00fcndhammer as the second?" }, { "role": "assistant", "content": "SELECT \"alternate\" FROM \"group_b1\" WHERE \"second\"='hubert gr\u00fcndhammer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b1\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: What is the alternate of the nation with Erkki Lill as the skip?" }, { "role": "assistant", "content": "SELECT \"alternate\" FROM \"group_b1\" WHERE \"skip\"='erkki lill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b1\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who is the skip of the nation with Laurens van der Windt as the alternate?" }, { "role": "assistant", "content": "SELECT \"skip\" FROM \"group_b1\" WHERE \"alternate\"='laurens van der windt';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_b1\" (\n \"nation\" text,\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"alternate\" text\n);\n\nQuestion: Who is the lead of the nation with Juha Pekaristo as the alternate?" }, { "role": "assistant", "content": "SELECT \"lead\" FROM \"group_b1\" WHERE \"alternate\"='juha pekaristo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the highest round in which a player was picked for the Center position?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"draft_picks\" WHERE \"position\"='center';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is John Flatters' nationality?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='john flatters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Jeremy Duchesne's position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"player\"='jeremy duchesne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" real,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" text,\n \"competition\" text\n);\n\nQuestion: When was the attendance 1,034?" }, { "role": "assistant", "content": "SELECT MIN(\"date\") FROM \"february\" WHERE \"attendance\"='1,034';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"football_alliance\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: what was the opponent on 26 october 1889?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"football_alliance\" WHERE \"date\"='26 october 1889';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"estimated_total_direct_programme_hours_p\" (\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"1996_2\" real\n);\n\nQuestion: 1950 larger than 80, and a 1960 of 196, and a 1990 larger than 131 what is the lowest 1996[2]?" }, { "role": "assistant", "content": "SELECT MIN(\"1996_2\") FROM \"estimated_total_direct_programme_hours_p\" WHERE \"1950\">80 AND \"1960\"=196 AND \"1990\">131;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"estimated_total_direct_programme_hours_p\" (\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"1996_2\" real\n);\n\nQuestion: 1960 larger than 196, and a 1996[2] smaller than 726, and a 1980 larger than 125, and a 1990 larger than 848, what is the highest 1950?" }, { "role": "assistant", "content": "SELECT MAX(\"1950\") FROM \"estimated_total_direct_programme_hours_p\" WHERE \"1960\">196 AND \"1996_2\"<726 AND \"1980\">125 AND \"1990\">848;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"estimated_total_direct_programme_hours_p\" (\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"1996_2\" real\n);\n\nQuestion: 1980 smaller than 719, and a 1960 smaller than 205, and a 1996[2] smaller than 364, and a 1970 larger than 251 is what 1990 highest?" }, { "role": "assistant", "content": "SELECT MAX(\"1990\") FROM \"estimated_total_direct_programme_hours_p\" WHERE \"1980\"<719 AND \"1960\"<205 AND \"1996_2\"<364 AND \"1970\">251;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"estimated_total_direct_programme_hours_p\" (\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"1996_2\" real\n);\n\nQuestion: 1996[2] larger than 68, and a 1990 smaller than 352, and a 1970 larger than 105, and a 1950 of 119 is the sum of what 1980?" }, { "role": "assistant", "content": "SELECT SUM(\"1980\") FROM \"estimated_total_direct_programme_hours_p\" WHERE \"1996_2\">68 AND \"1990\"<352 AND \"1970\">105 AND \"1950\"=119;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"estimated_total_direct_programme_hours_p\" (\n \"1950\" real,\n \"1960\" real,\n \"1970\" real,\n \"1980\" real,\n \"1990\" real,\n \"1996_2\" real\n);\n\nQuestion: 1996[2] of 127, and a 1990 smaller than 120 is the sum of 1990?" }, { "role": "assistant", "content": "SELECT SUM(\"1980\") FROM \"estimated_total_direct_programme_hours_p\" WHERE \"1996_2\"=127 AND \"1990\"<120;" } ]
[ { "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 \"game_site\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game with a result of w 14\u20136?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='w 14\u20136';" } ]
[ { "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 \"game_site\" text,\n \"record\" text\n);\n\nQuestion: What was the result of the game with a record of 2\u20133\u20132 before week 8?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"<8 AND \"record\"='2\u20133\u20132';" } ]
[ { "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 \"game_site\" text,\n \"record\" text\n);\n\nQuestion: What was the earliest week with a game at the Braves Field on October 2, 1932?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"game_site\"='braves field' AND \"date\"='october 2, 1932';" } ]
[ { "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 \"game_site\" text,\n \"record\" text\n);\n\nQuestion: What was the record at the game on November 13, 1932?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"date\"='november 13, 1932';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"others\" (\n \"character\" text,\n \"actor\" text,\n \"duration\" text,\n \"role\" text,\n \"appearances\" text\n);\n\nQuestion: What role is Kevin Bishop the actor?" }, { "role": "assistant", "content": "SELECT \"role\" FROM \"others\" WHERE \"actor\"='kevin bishop';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"others\" (\n \"character\" text,\n \"actor\" text,\n \"duration\" text,\n \"role\" text,\n \"appearances\" text\n);\n\nQuestion: What is the duration for mike walling as the actor?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"others\" WHERE \"actor\"='mike walling';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"others\" (\n \"character\" text,\n \"actor\" text,\n \"duration\" text,\n \"role\" text,\n \"appearances\" text\n);\n\nQuestion: What is the duration that has 3 for appearances, and james garret as the character?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"others\" WHERE \"appearances\"='3' AND \"character\"='james garret';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"others\" (\n \"character\" text,\n \"actor\" text,\n \"duration\" text,\n \"role\" text,\n \"appearances\" text\n);\n\nQuestion: What is the duration for nickolas grace as the actor?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"others\" WHERE \"actor\"='nickolas grace';" } ]
[ { "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 \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Time ( ET ) of 1:00pm, and a Result of w 34\u201314 has what record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"time_et\"='1:00pm' AND \"result\"='w 34\u201314';" } ]
[ { "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 \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Date of sun. oct. 1 has what location?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"schedule\" WHERE \"date\"='sun. oct. 1';" } ]
[ { "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 \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Record of 3\u20133 has what result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"record\"='3\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 \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Date of sun. oct. 29 has what time (et)?" }, { "role": "assistant", "content": "SELECT \"time_et\" FROM \"schedule\" WHERE \"date\"='sun. oct. 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_france\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: How many games have more than 10 points and more than 2 draws?" }, { "role": "assistant", "content": "SELECT COUNT(\"games\") FROM \"world_championship_group_b_france\" WHERE \"points\"=10 AND \"drawn\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_france\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the sum of losses that have points of 11 and more than 1 draw?" }, { "role": "assistant", "content": "SELECT SUM(\"lost\") FROM \"world_championship_group_b_france\" WHERE \"points\"=11 AND \"drawn\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_france\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the greatest points value that have draws under 2 and 2 losses?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"world_championship_group_b_france\" WHERE \"drawn\"<2 AND \"lost\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championship_group_b_france\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: How many losses have draw values under 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"lost\") FROM \"world_championship_group_b_france\" WHERE \"drawn\"<1;" } ]
[ { "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 \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What's the lowest February for less than 57 points?" }, { "role": "assistant", "content": "SELECT MIN(\"february\") FROM \"regular_season\" WHERE \"points\"<57;" } ]
[ { "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 \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What's the February for the game against the Montreal Canadiens?" }, { "role": "assistant", "content": "SELECT SUM(\"february\") FROM \"regular_season\" WHERE \"opponent\"='montreal canadiens';" } ]
[ { "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 \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What's the record for Game 58?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"game\"=58;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_finals\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: Which Winner has a Season of 2005\u201306?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"list_of_finals\" WHERE \"season\"='2005\u201306';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_finals\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: Which Runner-up played in the Season of 2000\u201301?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"list_of_finals\" WHERE \"season\"='2000\u201301';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_finals\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: What was the venue during the Season of 2010\u201311?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"list_of_finals\" WHERE \"season\"='2010\u201311';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_finals\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: Which Winner has a Runner-up of larne, and a Season of 2003\u201304?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"list_of_finals\" WHERE \"runner_up\"='larne' AND \"season\"='2003\u201304';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_finals\" (\n \"season\" text,\n \"winner\" text,\n \"score\" text,\n \"runner_up\" text,\n \"venue\" text\n);\n\nQuestion: Which Winner has a Score of 1 \u2013 0, and a Season of 2011\u201312?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"list_of_finals\" WHERE \"score\"='1 \u2013 0' AND \"season\"='2011\u201312';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_nfl_draft\" (\n \"round\" real,\n \"pick\" text,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position does Martin Rucker play?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"2008_nfl_draft\" WHERE \"name\"='martin rucker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_nfl_draft\" (\n \"round\" real,\n \"pick\" text,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the lowest round for Paul Hubbard?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"2008_nfl_draft\" WHERE \"name\"='paul hubbard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_nfl_draft\" (\n \"round\" real,\n \"pick\" text,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was the lowest round for a tight end position?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"2008_nfl_draft\" WHERE \"position\"='tight end';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_records\" (\n \"coach\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: What years did the person coach who had more than 31 ties?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"coaching_records\" WHERE \"ties\">31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_records\" (\n \"coach\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: What is the average number of wins for the person who coached from 1951 to 1956 and had less than 174 losses and less than 6 ties?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"coaching_records\" WHERE \"losses\"<174 AND \"years\"='1951 to 1956' AND \"ties\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_records\" (\n \"coach\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: Who was the coach who had 215 losses?" }, { "role": "assistant", "content": "SELECT \"coach\" FROM \"coaching_records\" WHERE \"losses\"=215;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_records\" (\n \"coach\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: What years did the person coach who had more than 1 tie, mess than 311 wins and 174 losses?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"coaching_records\" WHERE \"ties\">1 AND \"wins\"<311 AND \"losses\"=174;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_records\" (\n \"coach\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real\n);\n\nQuestion: What years did the person coach who had less than 82 wins and more than 24 losses?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"coaching_records\" WHERE \"wins\"<82 AND \"losses\">24;" } ]
[ { "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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Points have a Game larger than 25, and an Opponent of dallas stars?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"game_log\" WHERE \"game\">25 AND \"opponent\"='dallas stars';" } ]
[ { "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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Record has a December smaller than 28, and Points smaller than 38, and a Game smaller than 26, and a Score of 0\u20131 ot?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"december\"<28 AND \"points\"<38 AND \"game\"<26 AND \"score\"='0\u20131 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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Opponent has a Game of 31?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"game\"=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 \"december\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Record has Points smaller than 40, and a Game larger than 25, and a Score of 2\u20130?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"points\"<40 AND \"game\">25 AND \"score\"='2\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_6\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: Episode of 9 in which performer 3 had?" }, { "role": "assistant", "content": "SELECT \"performer_3\" FROM \"series_6\" WHERE \"episode\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_6\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: Date of 8 july 1994 involves which performer 1?" }, { "role": "assistant", "content": "SELECT \"performer_1\" FROM \"series_6\" WHERE \"date\"='8 july 1994';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_6\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: Date of 15 july 1994 involves which performer 3?" }, { "role": "assistant", "content": "SELECT \"performer_3\" FROM \"series_6\" WHERE \"date\"='15 july 1994';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"series_6\" (\n \"date\" text,\n \"episode\" real,\n \"performer_1\" text,\n \"performer_2\" text,\n \"performer_3\" text,\n \"performer_4\" text\n);\n\nQuestion: Performer 2 of chip esten has what performer 3?" }, { "role": "assistant", "content": "SELECT \"performer_3\" FROM \"series_6\" WHERE \"performer_2\"='chip esten';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_of_the_class\" (\n \"name\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"date_of_commission\" text,\n \"homeport_as_of_july_2013\" text,\n \"planned_decommission_as_announced_in_2009\" text\n);\n\nQuestion: Which Name has a Pennant number of f82?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"ships_of_the_class\" WHERE \"pennant_number\"='f82';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_of_the_class\" (\n \"name\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"date_of_commission\" text,\n \"homeport_as_of_july_2013\" text,\n \"planned_decommission_as_announced_in_2009\" text\n);\n\nQuestion: What is the Launched which is on 3 may 2001?" }, { "role": "assistant", "content": "SELECT \"launched\" FROM \"ships_of_the_class\" WHERE \"date_of_commission\"='3 may 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_of_the_class\" (\n \"name\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"date_of_commission\" text,\n \"homeport_as_of_july_2013\" text,\n \"planned_decommission_as_announced_in_2009\" text\n);\n\nQuestion: What is the Homeport that has a Laid down on 14 december 1985?" }, { "role": "assistant", "content": "SELECT \"homeport_as_of_july_2013\" FROM \"ships_of_the_class\" WHERE \"laid_down\"='14 december 1985';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ships_of_the_class\" (\n \"name\" text,\n \"pennant_number\" text,\n \"laid_down\" text,\n \"launched\" text,\n \"date_of_commission\" text,\n \"homeport_as_of_july_2013\" text,\n \"planned_decommission_as_announced_in_2009\" text\n);\n\nQuestion: What kind of Launched has a Homeport (as of July 2013) of sold to chile, and a Pennant number of f80?" }, { "role": "assistant", "content": "SELECT \"launched\" FROM \"ships_of_the_class\" WHERE \"homeport_as_of_july_2013\"='sold to chile' AND \"pennant_number\"='f80';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"money_leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"events\" real,\n \"prize_money\" real\n);\n\nQuestion: Which player had more than 25 events?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"money_leaders\" WHERE \"events\">25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"money_leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"events\" real,\n \"prize_money\" real\n);\n\nQuestion: What amount of prize money was there when the rank was less than 7, there were more than 6 events, and the country was Fiji?" }, { "role": "assistant", "content": "SELECT \"prize_money\" FROM \"money_leaders\" WHERE \"rank\"<7 AND \"events\">6 AND \"country\"='fiji';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"money_leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"events\" real,\n \"prize_money\" real\n);\n\nQuestion: What is the least amount of prize money when there are 21 events?" }, { "role": "assistant", "content": "SELECT MIN(\"prize_money\") FROM \"money_leaders\" WHERE \"events\"=21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_8_2006_2007\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which series episode has a netflix figure of s04e21?" }, { "role": "assistant", "content": "SELECT \"series_ep\" FROM \"season_8_2006_2007\" WHERE \"netflix\"='s04e21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_8_2006_2007\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which segment a's netflix figure is s04e24?" }, { "role": "assistant", "content": "SELECT \"segment_a\" FROM \"season_8_2006_2007\" WHERE \"netflix\"='s04e24';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_8_2006_2007\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: How many episodes have a segment d that is goalie masks (part 2)?" }, { "role": "assistant", "content": "SELECT COUNT(\"episode\") FROM \"season_8_2006_2007\" WHERE \"segment_d\"='goalie masks (part 2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_8_2006_2007\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which episode's segment b is s hacksaw?" }, { "role": "assistant", "content": "SELECT \"episode\" FROM \"season_8_2006_2007\" WHERE \"segment_b\"='s hacksaw';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: When was Lachlan Dale born?" }, { "role": "assistant", "content": "SELECT \"d_o_b\" FROM \"player_roster\" WHERE \"surname\"='dale' AND \"first\"='lachlan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which batter played P and was born 18 April 1984?" }, { "role": "assistant", "content": "SELECT \"bats\" FROM \"player_roster\" WHERE \"position\"='p' AND \"d_o_b\"='18 april 1984';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which Surname has Bats of r, and a Position of p, and a DOB of 20 may 1989?" }, { "role": "assistant", "content": "SELECT \"surname\" FROM \"player_roster\" WHERE \"bats\"='r' AND \"position\"='p' AND \"d_o_b\"='20 may 1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: Which Position has Throws of r, and a DOB of 12 february 1983?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"player_roster\" WHERE \"throws\"='r' AND \"d_o_b\"='12 february 1983';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_roster\" (\n \"surname\" text,\n \"first\" text,\n \"d_o_b\" text,\n \"bats\" text,\n \"throws\" text,\n \"position\" text\n);\n\nQuestion: How many throws did Needle have?" }, { "role": "assistant", "content": "SELECT \"throws\" FROM \"player_roster\" WHERE \"surname\"='needle';" } ]