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 \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What was the score of the game that had more than 8 points?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"points\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"event\" text,\n \"round\" text,\n \"result\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: The round that had the final, what was the result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"results\" WHERE \"round\"='final';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"event\" text,\n \"round\" text,\n \"result\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Opponent of andry laffita had what score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"results\" WHERE \"opponent\"='andry laffita';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"event\" text,\n \"round\" text,\n \"result\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Opponent of igor samoilenco had what result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"results\" WHERE \"opponent\"='igor samoilenco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"event\" text,\n \"round\" text,\n \"result\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Score of 33-22 had what round?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"results\" WHERE \"score\"='33-22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"event\" text,\n \"round\" text,\n \"result\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Round of first had what opponent?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"results\" WHERE \"round\"='first';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"event\" text,\n \"round\" text,\n \"result\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: Result of win, and a Score of 33-22 involved what event?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"results\" WHERE \"result\"='win' AND \"score\"='33-22';" } ]
[ { "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 were the lowest points of game 60?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"regular_season\" WHERE \"game\"=60;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What championship had Francesca Schiavone in the finals?" }, { "role": "assistant", "content": "SELECT \"championship\" FROM \"singles_5_2_3\" WHERE \"opponent_in_the_final\"='francesca schiavone';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"college_sports\" (\n \"school\" text,\n \"mascot\" text,\n \"conference\" text,\n \"national_titles\" real,\n \"founded\" real\n);\n\nQuestion: What is the total number of national titles for the team with doane tigers as the mascot?" }, { "role": "assistant", "content": "SELECT COUNT(\"national_titles\") FROM \"college_sports\" WHERE \"mascot\"='doane tigers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"year\" text,\n \"coach\" text,\n \"crew\" text,\n \"record\" text,\n \"win_pct\" real\n);\n\nQuestion: Which year's crew is varsity 8+ when the record is 7-3?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"season_by_season_results\" WHERE \"crew\"='varsity 8+' AND \"record\"='7-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"year\" text,\n \"coach\" text,\n \"crew\" text,\n \"record\" text,\n \"win_pct\" real\n);\n\nQuestion: What is the total number of win % when John Gartin is coach, the crew is varsity 8+, and the year is 2005?" }, { "role": "assistant", "content": "SELECT SUM(\"win_pct\") FROM \"season_by_season_results\" WHERE \"coach\"='john gartin' AND \"crew\"='varsity 8+' AND \"year\"='2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"year\" text,\n \"coach\" text,\n \"crew\" text,\n \"record\" text,\n \"win_pct\" real\n);\n\nQuestion: What is the largest win percentage when John Gartin is coach, the record is 11-0, and the year is 2009?" }, { "role": "assistant", "content": "SELECT MAX(\"win_pct\") FROM \"season_by_season_results\" WHERE \"coach\"='john gartin' AND \"record\"='11-0' AND \"year\"='2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season_results\" (\n \"year\" text,\n \"coach\" text,\n \"crew\" text,\n \"record\" text,\n \"win_pct\" real\n);\n\nQuestion: What is the total of win percentages when the year is 2008 and the crew is varsity 8+?" }, { "role": "assistant", "content": "SELECT SUM(\"win_pct\") FROM \"season_by_season_results\" WHERE \"year\"='2008' AND \"crew\"='varsity 8+';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the pick number for the tight end who was picked after round 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"round\">6 AND \"position\"='tight end';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the lowest round for the player whose position is guard and had a pick number smaller than 144?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"position\"='guard' AND \"pick\"<144;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What was the position of terry jones whose pick number was after 256?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick\">256 AND \"player\"='terry jones';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Loss has a Record of 30-32?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='30-32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Attendance is the highest one that has a Record of 37-38?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"record\"='37-38';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which Score has a Loss of buehrle (7-2)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='buehrle (7-2)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall is the average one that has a Pick # larger than 7, and a Round larger than 4, and a Name of glen howe?" }, { "role": "assistant", "content": "SELECT AVG(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\">7 AND \"round\">4 AND \"name\"='glen howe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round is the lowest one that has a Pick # larger than 10, and a Position of tight end, and an Overall smaller than 132?" }, { "role": "assistant", "content": "SELECT MIN(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\">10 AND \"position\"='tight end' AND \"overall\"<132;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round is the highest one that has an Overall of 32, and a Pick # smaller than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"overall\"=32 AND \"pick_num\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many Picks have a Round larger than 8, and a College of fresno state?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"round\">8 AND \"college\"='fresno state';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Overall is the highest one that has a College of oklahoma, and a Pick # smaller than 4?" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='oklahoma' AND \"pick_num\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"under_23\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the result of the match on 30 July 2004?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"under_23\" WHERE \"date\"='30 july 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"under_23\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the result of the match on 3 March 2004?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"under_23\" WHERE \"date\"='3 march 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"under_23\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the score of the friendly match?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"under_23\" WHERE \"competition\"='friendly match';" } ]
[ { "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: Which Week had a Result of w 10-0, and an Attendance smaller than 58,571?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"result\"='w 10-0' AND \"attendance\"<'58,571';" } ]
[ { "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: Which Week had a Result of w 23-17?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"result\"='w 23-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: What was the Attendance on october 2, 1977?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='october 2, 1977';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Bronze of 2, and a Silver smaller than 0 then what is the sum of the gold?" }, { "role": "assistant", "content": "SELECT SUM(\"gold\") FROM \"medal_table\" WHERE \"bronze\"=2 AND \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Smaller than 4, and a Silver larger than 0, and a Rank of 3, and a Bronze smaller than 6 then what is the sum of the gold?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"medal_table\" WHERE \"gold\"<4 AND \"silver\">0 AND \"rank\"='3' AND \"bronze\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Total larger than 3, and a Rank of 4, and a Silver larger than 0 has what average gold?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"total\">3 AND \"rank\"='4' AND \"silver\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Total smaller than 10, and a Gold larger than 1 then what is the lowest silver?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"total\"<10 AND \"gold\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the date of the week 9 game?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_schedule\" WHERE \"week\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What class has over 0 wins and 42 points?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"grand_prix_motorcycle_racing_results\" WHERE \"wins\">0 AND \"points\"=42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What team was the bike with a 350cc class, over 2 points, and 1 win?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"grand_prix_motorcycle_racing_results\" WHERE \"class\"='350cc' AND \"points\">2 AND \"wins\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the earliest year associated with 0 wins and 42 points?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"wins\">0 AND \"points\"=42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_of_the_year\" (\n \"season\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text\n);\n\nQuestion: What Nationality has the Player of Marcus Walker?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"player_of_the_year\" WHERE \"player\"='marcus walker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_of_the_year\" (\n \"season\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text\n);\n\nQuestion: What Season is listed for the Player of Jon Stefansson?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"player_of_the_year\" WHERE \"player\"='jon stefansson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_of_the_year\" (\n \"season\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text\n);\n\nQuestion: Which Team has the Player of A.J. Moye?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"player_of_the_year\" WHERE \"player\"='a.j. moye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"player_of_the_year\" (\n \"season\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text\n);\n\nQuestion: What Position does the Team of KR and the Player of Marcus Walker have listed?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"player_of_the_year\" WHERE \"team\"='kr' AND \"player\"='marcus walker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_proposed\" (\n \"rank\" real,\n \"name\" text,\n \"location\" text,\n \"height_feet_metres\" text,\n \"floors\" text,\n \"year_proposed\" text\n);\n\nQuestion: What building is in ljubljana, proposed in 2010, and has 15 floors?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"tallest_proposed\" WHERE \"location\"='ljubljana' AND \"year_proposed\"='2010' AND \"floors\"='15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_federal_taxation_and_spending_b\" (\n \"state\" text,\n \"revenue_millions\" text,\n \"population\" real,\n \"revenue_per_capita\" text,\n \"spending_millions\" text,\n \"spending_per_capita\" text,\n \"net_contribution_per_capita\" text\n);\n\nQuestion: What is the Revenue of the population of more than 1,499,402, with Spending (millions) of $13,986?" }, { "role": "assistant", "content": "SELECT \"revenue_millions\" FROM \"table_of_federal_taxation_and_spending_b\" WHERE \"population\">'1,499,402' AND \"spending_millions\"='$13,986';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_federal_taxation_and_spending_b\" (\n \"state\" text,\n \"revenue_millions\" text,\n \"population\" real,\n \"revenue_per_capita\" text,\n \"spending_millions\" text,\n \"spending_per_capita\" text,\n \"net_contribution_per_capita\" text\n);\n\nQuestion: What is the Revenue per capita for Vermont?" }, { "role": "assistant", "content": "SELECT \"revenue_per_capita\" FROM \"table_of_federal_taxation_and_spending_b\" WHERE \"state\"='vermont';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_federal_taxation_and_spending_b\" (\n \"state\" text,\n \"revenue_millions\" text,\n \"population\" real,\n \"revenue_per_capita\" text,\n \"spending_millions\" text,\n \"spending_per_capita\" text,\n \"net_contribution_per_capita\" text\n);\n\nQuestion: What state has a Net contribution per capita of $-171?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"table_of_federal_taxation_and_spending_b\" WHERE \"net_contribution_per_capita\"='$-171';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Who is the PBA team with Mlqu college?" }, { "role": "assistant", "content": "SELECT \"pba_team\" FROM \"round_2\" WHERE \"college\"='mlqu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Which country of origin corresponds to Far Eastern college?" }, { "role": "assistant", "content": "SELECT \"country_of_origin\" FROM \"round_2\" WHERE \"college\"='far eastern';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Who is the player with the PBA team of Barangay Ginebra Kings?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_2\" WHERE \"pba_team\"='barangay ginebra kings';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"stadium\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the opponent on April 28?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='april 28';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_10_albums\" (\n \"issue_date\" real,\n \"album_title\" text,\n \"artist\" text,\n \"sales\" real,\n \"highest_position\" real\n);\n\nQuestion: What is the highest position the album Where we belong, which had an issue date higher than 9, had?" }, { "role": "assistant", "content": "SELECT COUNT(\"highest_position\") FROM \"top_10_albums\" WHERE \"issue_date\"<9 AND \"album_title\"='where we belong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_10_albums\" (\n \"issue_date\" real,\n \"album_title\" text,\n \"artist\" text,\n \"sales\" real,\n \"highest_position\" real\n);\n\nQuestion: What is the biggest issue date Madonna, who had less than 1,060,000 sales, had?" }, { "role": "assistant", "content": "SELECT MAX(\"issue_date\") FROM \"top_10_albums\" WHERE \"artist\"='madonna' AND \"sales\"<'1,060,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_10_albums\" (\n \"issue_date\" real,\n \"album_title\" text,\n \"artist\" text,\n \"sales\" real,\n \"highest_position\" real\n);\n\nQuestion: What is the highest position Talk on Corners, which had an issue date greater than 1, had?" }, { "role": "assistant", "content": "SELECT COUNT(\"highest_position\") FROM \"top_10_albums\" WHERE \"album_title\"='talk on corners' AND \"issue_date\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_10_albums\" (\n \"issue_date\" real,\n \"album_title\" text,\n \"artist\" text,\n \"sales\" real,\n \"highest_position\" real\n);\n\nQuestion: What is the highest sales All Saints had?" }, { "role": "assistant", "content": "SELECT MAX(\"sales\") FROM \"top_10_albums\" WHERE \"album_title\"='all saints';" } ]
[ { "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 \"team\" text,\n \"manufacturer\" text,\n \"car_model\" text,\n \"engine\" text,\n \"driver\" text\n);\n\nQuestion: Who is the Driver that has Car Model Commodore VS?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"car_model\"='commodore vs';" } ]
[ { "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 \"team\" text,\n \"manufacturer\" text,\n \"car_model\" text,\n \"engine\" text,\n \"driver\" text\n);\n\nQuestion: What Car Model has the Manufacturer of Saab, and Driver Dean Randle?" }, { "role": "assistant", "content": "SELECT \"car_model\" FROM \"teams_and_drivers\" WHERE \"manufacturer\"='saab' AND \"driver\"='dean randle';" } ]
[ { "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 \"team\" text,\n \"manufacturer\" text,\n \"car_model\" text,\n \"engine\" text,\n \"driver\" text\n);\n\nQuestion: Who is the Driver with the Team of P & L Mechanical Services?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"team\"='p & l mechanical services';" } ]
[ { "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 \"team\" text,\n \"manufacturer\" text,\n \"car_model\" text,\n \"engine\" text,\n \"driver\" text\n);\n\nQuestion: What Car Model has the Engine of Ford 6.0 V8?" }, { "role": "assistant", "content": "SELECT \"car_model\" FROM \"teams_and_drivers\" WHERE \"engine\"='ford 6.0 v8';" } ]
[ { "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 \"team\" text,\n \"manufacturer\" text,\n \"car_model\" text,\n \"engine\" text,\n \"driver\" text\n);\n\nQuestion: What Team has the Engine of Chevrolet 6.0 V8, the Manufacturer of Opel, and the Driver Chris Jackson?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"teams_and_drivers\" WHERE \"engine\"='chevrolet 6.0 v8' AND \"manufacturer\"='opel' AND \"driver\"='chris jackson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_21_2013\" (\n \"series_ep\" text,\n \"episode\" real,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: What is the Segment A entry for the episode that has an entry of Diesel filters for Segment D?" }, { "role": "assistant", "content": "SELECT \"segment_a\" FROM \"season_21_2013\" WHERE \"segment_d\"='diesel filters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_21_2013\" (\n \"series_ep\" text,\n \"episode\" real,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: What is the series episode number that is larger than 262 and has a Segment A entry of Aluminium s canoe?" }, { "role": "assistant", "content": "SELECT \"series_ep\" FROM \"season_21_2013\" WHERE \"episode\">262 AND \"segment_a\"='aluminium s canoe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: Which First elected has a District of south carolina 2?" }, { "role": "assistant", "content": "SELECT MIN(\"first_elected\") FROM \"south_carolina\" WHERE \"district\"='south carolina 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south_carolina\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"result\" text\n);\n\nQuestion: Which Incumbent has a First elected larger than 1884?" }, { "role": "assistant", "content": "SELECT \"incumbent\" FROM \"south_carolina\" WHERE \"first_elected\">1884;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: What is the English title with a Director named ang lee?" }, { "role": "assistant", "content": "SELECT \"english_title\" FROM \"2000s\" WHERE \"director\"='ang lee';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"year\" real,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: What is the Original title with a Country that is canada?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"2000s\" WHERE \"country\"='canada';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"editions_feature_grid\" (\n \"product\" text,\n \"extensions\" text,\n \"projects_templates\" text,\n \"msdn_integration\" text,\n \"debugging\" text,\n \"profiling\" text,\n \"intelli_trace\" text,\n \"unit_test\" text,\n \"code_coverage\" text,\n \"test_impact_analysis\" text,\n \"load_testing\" text,\n \"lab_management\" text,\n \"architecture_and_modelling\" text,\n \"windows_phone_development\" text\n);\n\nQuestion: Which Architecture and modelling has a Unit test of no, and a Projects templates of limited?" }, { "role": "assistant", "content": "SELECT \"architecture_and_modelling\" FROM \"editions_feature_grid\" WHERE \"unit_test\"='no' AND \"projects_templates\"='limited';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"editions_feature_grid\" (\n \"product\" text,\n \"extensions\" text,\n \"projects_templates\" text,\n \"msdn_integration\" text,\n \"debugging\" text,\n \"profiling\" text,\n \"intelli_trace\" text,\n \"unit_test\" text,\n \"code_coverage\" text,\n \"test_impact_analysis\" text,\n \"load_testing\" text,\n \"lab_management\" text,\n \"architecture_and_modelling\" text,\n \"windows_phone_development\" text\n);\n\nQuestion: which MSDN integration has a Load testing of no, and a Test impact analysis of no?" }, { "role": "assistant", "content": "SELECT \"msdn_integration\" FROM \"editions_feature_grid\" WHERE \"load_testing\"='no' AND \"test_impact_analysis\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"editions_feature_grid\" (\n \"product\" text,\n \"extensions\" text,\n \"projects_templates\" text,\n \"msdn_integration\" text,\n \"debugging\" text,\n \"profiling\" text,\n \"intelli_trace\" text,\n \"unit_test\" text,\n \"code_coverage\" text,\n \"test_impact_analysis\" text,\n \"load_testing\" text,\n \"lab_management\" text,\n \"architecture_and_modelling\" text,\n \"windows_phone_development\" text\n);\n\nQuestion: Which Unit test has a MSDN integration of full, and a Projects templates of yes?" }, { "role": "assistant", "content": "SELECT \"unit_test\" FROM \"editions_feature_grid\" WHERE \"msdn_integration\"='full' AND \"projects_templates\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"editions_feature_grid\" (\n \"product\" text,\n \"extensions\" text,\n \"projects_templates\" text,\n \"msdn_integration\" text,\n \"debugging\" text,\n \"profiling\" text,\n \"intelli_trace\" text,\n \"unit_test\" text,\n \"code_coverage\" text,\n \"test_impact_analysis\" text,\n \"load_testing\" text,\n \"lab_management\" text,\n \"architecture_and_modelling\" text,\n \"windows_phone_development\" text\n);\n\nQuestion: Which Intelli Trace has a No Extension and Windows Phone development of no?" }, { "role": "assistant", "content": "SELECT \"intelli_trace\" FROM \"editions_feature_grid\" WHERE \"extensions\"='no' AND \"windows_phone_development\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"editions_feature_grid\" (\n \"product\" text,\n \"extensions\" text,\n \"projects_templates\" text,\n \"msdn_integration\" text,\n \"debugging\" text,\n \"profiling\" text,\n \"intelli_trace\" text,\n \"unit_test\" text,\n \"code_coverage\" text,\n \"test_impact_analysis\" text,\n \"load_testing\" text,\n \"lab_management\" text,\n \"architecture_and_modelling\" text,\n \"windows_phone_development\" text\n);\n\nQuestion: Which Projects template has an IntelliTrace of no, and a Windows Phone development of yes, and a Test impact analysis of no?" }, { "role": "assistant", "content": "SELECT \"projects_templates\" FROM \"editions_feature_grid\" WHERE \"intelli_trace\"='no' AND \"windows_phone_development\"='yes' AND \"test_impact_analysis\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"editions_feature_grid\" (\n \"product\" text,\n \"extensions\" text,\n \"projects_templates\" text,\n \"msdn_integration\" text,\n \"debugging\" text,\n \"profiling\" text,\n \"intelli_trace\" text,\n \"unit_test\" text,\n \"code_coverage\" text,\n \"test_impact_analysis\" text,\n \"load_testing\" text,\n \"lab_management\" text,\n \"architecture_and_modelling\" text,\n \"windows_phone_development\" text\n);\n\nQuestion: Which MSDN integration has a IntelliTrace of yes?" }, { "role": "assistant", "content": "SELECT \"msdn_integration\" FROM \"editions_feature_grid\" WHERE \"intelli_trace\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_list_of_princeton_eating_club\" (\n \"name\" text,\n \"years_of_operation\" text,\n \"location\" text,\n \"historical_photos\" text,\n \"year_clubhouse_constructed\" text,\n \"sign_in_bicker\" text,\n \"year_co_ed\" text\n);\n\nQuestion: During what Years of Operation was the location prospect 33 prospect ave?" }, { "role": "assistant", "content": "SELECT \"years_of_operation\" FROM \"historical_list_of_princeton_eating_club\" WHERE \"location\"='prospect 33 prospect ave';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_list_of_princeton_eating_club\" (\n \"name\" text,\n \"years_of_operation\" text,\n \"location\" text,\n \"historical_photos\" text,\n \"year_clubhouse_constructed\" text,\n \"sign_in_bicker\" text,\n \"year_co_ed\" text\n);\n\nQuestion: What is the location of the ivy club?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"historical_list_of_princeton_eating_club\" WHERE \"name\"='the ivy club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_list_of_princeton_eating_club\" (\n \"name\" text,\n \"years_of_operation\" text,\n \"location\" text,\n \"historical_photos\" text,\n \"year_clubhouse_constructed\" text,\n \"sign_in_bicker\" text,\n \"year_co_ed\" text\n);\n\nQuestion: What is the Sign-in/Bicker at wash50 on washington rd?" }, { "role": "assistant", "content": "SELECT \"sign_in_bicker\" FROM \"historical_list_of_princeton_eating_club\" WHERE \"location\"='wash50 on washington rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_list_of_princeton_eating_club\" (\n \"name\" text,\n \"years_of_operation\" text,\n \"location\" text,\n \"historical_photos\" text,\n \"year_clubhouse_constructed\" text,\n \"sign_in_bicker\" text,\n \"year_co_ed\" text\n);\n\nQuestion: When was the Clubhouse built with a Sign-in/Bicker of bicker, and Named cannon club?" }, { "role": "assistant", "content": "SELECT \"year_clubhouse_constructed\" FROM \"historical_list_of_princeton_eating_club\" WHERE \"sign_in_bicker\"='bicker' AND \"name\"='cannon club';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_list_of_princeton_eating_club\" (\n \"name\" text,\n \"years_of_operation\" text,\n \"location\" text,\n \"historical_photos\" text,\n \"year_clubhouse_constructed\" text,\n \"sign_in_bicker\" text,\n \"year_co_ed\" text\n);\n\nQuestion: Which Sign-in/Bicker is at of wash50 on washington rd?" }, { "role": "assistant", "content": "SELECT \"sign_in_bicker\" FROM \"historical_list_of_princeton_eating_club\" WHERE \"location\"='wash50 on washington rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_list_of_princeton_eating_club\" (\n \"name\" text,\n \"years_of_operation\" text,\n \"location\" text,\n \"historical_photos\" text,\n \"year_clubhouse_constructed\" text,\n \"sign_in_bicker\" text,\n \"year_co_ed\" text\n);\n\nQuestion: Which Historical Photos were taken at prospect 43 prospect ave?" }, { "role": "assistant", "content": "SELECT \"historical_photos\" FROM \"historical_list_of_princeton_eating_club\" WHERE \"location\"='prospect 43 prospect ave';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_knockout_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 1st leg of team 1 Lyon?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"first_knockout_round\" WHERE \"team_1\"='lyon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_knockout_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 1st leg of team 1 Liverpool?" }, { "role": "assistant", "content": "SELECT \"1st_leg\" FROM \"first_knockout_round\" WHERE \"team_1\"='liverpool';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many events resulted in a top-25 less than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"events\") FROM \"summary\" WHERE \"top_25\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the smallest number of wins for a top-25 value greater than 5 and more than 38 cuts?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"summary\" WHERE \"top_25\">5 AND \"cuts_made\">38;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronze medals did Chinese Taipei win with less than 0 gold?" }, { "role": "assistant", "content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='chinese taipei' AND \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver medals had a rank of 3 with bronze larger than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"rank\"=3 AND \"bronze\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver medals does China have?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"nation\"='china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: Which Position has Losses of 11, and a Played larger than 22?" }, { "role": "assistant", "content": "SELECT SUM(\"position\") FROM \"torneo_apertura\" WHERE \"losses\"=11 AND \"played\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: How many Wins have a Scored smaller than 24, and a Conceded larger than 25, and Draws larger than 5, and a Position smaller than 9?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"torneo_apertura\" WHERE \"scored\"<24 AND \"conceded\">25 AND \"draws\">5 AND \"position\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: How many Points has a Position of 8?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"torneo_apertura\" WHERE \"position\"=8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: How many Wins has a Scored of 27 and Draws smaller than 5?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"torneo_apertura\" WHERE \"scored\"=27 AND \"draws\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: Which Position has Draws smaller than 7 and a Played larger than 22?" }, { "role": "assistant", "content": "SELECT AVG(\"position\") FROM \"torneo_apertura\" WHERE \"draws\"<7 AND \"played\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_apertura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: Which Played has a Scored larger than 25 and a Position of 1, and Draws smaller than 5?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"torneo_apertura\" WHERE \"scored\">25 AND \"position\"=1 AND \"draws\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008_six_nations_championship_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: When was the player with 51 caps from a Club/province of clermont born?" }, { "role": "assistant", "content": "SELECT \"date_of_birth_age\" FROM \"2008_six_nations_championship_squads\" WHERE \"caps\"=51 AND \"club_province\"='clermont';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overview_of_main_characters\" (\n \"character\" text,\n \"actor\" text,\n \"years\" text,\n \"series\" text,\n \"episode_count\" real\n);\n\nQuestion: How many Episode Counts have an Actor of liz carr?" }, { "role": "assistant", "content": "SELECT COUNT(\"episode_count\") FROM \"overview_of_main_characters\" WHERE \"actor\"='liz carr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overview_of_main_characters\" (\n \"character\" text,\n \"actor\" text,\n \"years\" text,\n \"series\" text,\n \"episode_count\" real\n);\n\nQuestion: Which Years have a Character of dr trevor stewart?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"overview_of_main_characters\" WHERE \"character\"='dr trevor stewart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"overview_of_main_characters\" (\n \"character\" text,\n \"actor\" text,\n \"years\" text,\n \"series\" text,\n \"episode_count\" real\n);\n\nQuestion: Which Series has an Actor of tom ward?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"overview_of_main_characters\" WHERE \"actor\"='tom ward';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: How many picks involved the player Joe Germanese?" }, { "role": "assistant", "content": "SELECT SUM(\"pick_num\") FROM \"round_two\" WHERE \"player\"='joe germanese';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_two\" (\n \"pick_num\" real,\n \"mls_team\" text,\n \"player\" text,\n \"position\" text,\n \"affiliation\" text\n);\n\nQuestion: Which player's pick number was 25?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_two\" WHERE \"pick_num\"=25;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What team did the Montreal Canadiens visit when the record was 0-3?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"visitor\"='montreal canadiens' AND \"record\"='0-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score on April 23?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"date\"='april 23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montreal_canadiens_4_chicago_black_hawks\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What team did the Chicago Black Hawks visit on April 20?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"montreal_canadiens_4_chicago_black_hawks\" WHERE \"visitor\"='chicago black hawks' AND \"date\"='april 20';" } ]