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 \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What was the To par for United States golfer fred couples?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"player\"='fred couples';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"date\" text,\n \"ship\" text,\n \"type\" text,\n \"nationality\" text,\n \"tonnage_grt\" real,\n \"fate\" text\n);\n\nQuestion: what is the fate when the nationality is french and the ship is pierre lott?" }, { "role": "assistant", "content": "SELECT \"fate\" FROM \"table\" WHERE \"nationality\"='french' AND \"ship\"='pierre lott';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"date\" text,\n \"ship\" text,\n \"type\" text,\n \"nationality\" text,\n \"tonnage_grt\" real,\n \"fate\" text\n);\n\nQuestion: what is the ship with the date of 28.1.1915?" }, { "role": "assistant", "content": "SELECT \"ship\" FROM \"table\" WHERE \"date\"='28.1.1915';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"date\" text,\n \"ship\" text,\n \"type\" text,\n \"nationality\" text,\n \"tonnage_grt\" real,\n \"fate\" text\n);\n\nQuestion: what is the nationality when the ship is willerby?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"table\" WHERE \"ship\"='willerby';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"date\" text,\n \"ship\" text,\n \"type\" text,\n \"nationality\" text,\n \"tonnage_grt\" real,\n \"fate\" text\n);\n\nQuestion: what is the least tonnage grt when the nationality is british and the ship is kidalton?" }, { "role": "assistant", "content": "SELECT MIN(\"tonnage_grt\") FROM \"table\" WHERE \"nationality\"='british' AND \"ship\"='kidalton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: Can you tell me the Season that has the Team 2 of hanoi acb?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"results\" WHERE \"team_2\"='hanoi acb';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: Can you tell me the Team 2 that has the Venue of binh duong stadium, vietnam?" }, { "role": "assistant", "content": "SELECT \"team_2\" FROM \"results\" WHERE \"venue\"='binh duong stadium, vietnam';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"season\" real,\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"venue\" text\n);\n\nQuestion: Can you tell me the total number of Season that has the Team 2 of chonburi, and the Score of 0:1?" }, { "role": "assistant", "content": "SELECT COUNT(\"season\") FROM \"results\" WHERE \"team_2\"='chonburi' AND \"score\"='0:1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: Which Score has a Place of t6, and a Player of raymond floyd?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_round_leaderboard\" WHERE \"place\"='t6' AND \"player\"='raymond floyd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: How much To par has a Place of t1, and a Score of 70-70-71-71=282?" }, { "role": "assistant", "content": "SELECT COUNT(\"to_par\") FROM \"final_round_leaderboard\" WHERE \"place\"='t1' AND \"score\"='70-70-71-71=282';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: What is tony lema's to par?" }, { "role": "assistant", "content": "SELECT SUM(\"to_par\") FROM \"final_round_leaderboard\" WHERE \"player\"='tony lema';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_round_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" text\n);\n\nQuestion: What was gary player's score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_round_leaderboard\" WHERE \"player\"='gary player';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_and_current_programs\" (\n \"year\" real,\n \"program_title\" text,\n \"placement\" text,\n \"score\" real,\n \"class\" text\n);\n\nQuestion: What was the total number for the PIW Class' The Adventures Of... and had a score bigger than 94.6?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"past_and_current_programs\" WHERE \"class\"='piw' AND \"program_title\"='the adventures of...' AND \"score\">94.6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_and_current_programs\" (\n \"year\" real,\n \"program_title\" text,\n \"placement\" text,\n \"score\" real,\n \"class\" text\n);\n\nQuestion: What class had a score of 95.1?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"past_and_current_programs\" WHERE \"score\"=95.1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_and_current_programs\" (\n \"year\" real,\n \"program_title\" text,\n \"placement\" text,\n \"score\" real,\n \"class\" text\n);\n\nQuestion: What is the lowest score for a year before 2008 and had 3rd place?" }, { "role": "assistant", "content": "SELECT MIN(\"score\") FROM \"past_and_current_programs\" WHERE \"year\"<2008 AND \"placement\"='3rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_and_current_programs\" (\n \"year\" real,\n \"program_title\" text,\n \"placement\" text,\n \"score\" real,\n \"class\" text\n);\n\nQuestion: What was the latest year placement for Taboo with a score smaller than 96.125?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"past_and_current_programs\" WHERE \"program_title\"='taboo' AND \"score\"<96.125;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"wins_8\" (\n \"year\" real,\n \"championship\" text,\n \"winning_score\" text,\n \"margin\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the winning score before 1959, with runner-up Jackie Pung?" }, { "role": "assistant", "content": "SELECT \"winning_score\" FROM \"wins_8\" WHERE \"year\"<1959 AND \"runner_s_up\"='jackie pung';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_4_1999_2000\" (\n \"series_num\" real,\n \"season_num\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: Which Directed by has an Original air date of april 29, 2000?" }, { "role": "assistant", "content": "SELECT \"directed_by\" FROM \"season_4_1999_2000\" WHERE \"original_air_date\"='april 29, 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game from September 10, 2000?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='september 10, 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_ceremonies\" (\n \"ceremony\" text,\n \"date\" text,\n \"host_s\" text,\n \"venue\" text,\n \"film_of_the_year\" text\n);\n\nQuestion: Which award ceremony took place on May 15, 1965?" }, { "role": "assistant", "content": "SELECT \"ceremony\" FROM \"awards_ceremonies\" WHERE \"date\"='may 15, 1965';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_ceremonies\" (\n \"ceremony\" text,\n \"date\" text,\n \"host_s\" text,\n \"venue\" text,\n \"film_of_the_year\" text\n);\n\nQuestion: Which movie was awarded Film of the Year on May 8, 1964?" }, { "role": "assistant", "content": "SELECT \"film_of_the_year\" FROM \"awards_ceremonies\" WHERE \"date\"='may 8, 1964';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_watford_west_watford_and_oxhey\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: Can you tell me the highest DCSF number that has the Name of field, and the Ofsted number larger than 117160?" }, { "role": "assistant", "content": "SELECT MAX(\"dcsf_number\") FROM \"central_watford_west_watford_and_oxhey\" WHERE \"name\"='field' AND \"ofsted_number\">117160;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_watford_west_watford_and_oxhey\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: Can you tell me the sum of Intake that has the Faith of rc, and the DCSF number larger than 2428?" }, { "role": "assistant", "content": "SELECT SUM(\"intake\") FROM \"central_watford_west_watford_and_oxhey\" WHERE \"faith\"='rc' AND \"dcsf_number\">2428;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_watford_west_watford_and_oxhey\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: Can you tell me the Name that has the DCSF number of 2117?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"central_watford_west_watford_and_oxhey\" WHERE \"dcsf_number\"=2117;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"central_watford_west_watford_and_oxhey\" (\n \"name\" text,\n \"faith\" text,\n \"type\" text,\n \"intake\" real,\n \"dcsf_number\" real,\n \"ofsted_number\" real\n);\n\nQuestion: Can you tell me the highest Ofsted number that has the Type of infants, and the Intake larger than 60?" }, { "role": "assistant", "content": "SELECT MAX(\"ofsted_number\") FROM \"central_watford_west_watford_and_oxhey\" WHERE \"type\"='infants' AND \"intake\">60;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the total number of Week, when Opponent is At Chicago Bears, and when Attendance is greater than 49,070?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='at chicago bears' AND \"attendance\">'49,070';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is Date, when Week is 11?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the lowest Week, when Attendance is 38,624?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"='38,624';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaded_unloaded_freight_and_mail_tons_tu\" (\n \"year\" real,\n \"domestic_freight\" real,\n \"domestic_mail\" real,\n \"international_freight\" real,\n \"international_mail\" real,\n \"total_freight_and_mail\" real,\n \"change\" text\n);\n\nQuestion: How much international mail has a change of +35,7% later than 2008?" }, { "role": "assistant", "content": "SELECT SUM(\"international_mail\") FROM \"loaded_unloaded_freight_and_mail_tons_tu\" WHERE \"change\"='+35,7%' AND \"year\">2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaded_unloaded_freight_and_mail_tons_tu\" (\n \"year\" real,\n \"domestic_freight\" real,\n \"domestic_mail\" real,\n \"international_freight\" real,\n \"international_mail\" real,\n \"total_freight_and_mail\" real,\n \"change\" text\n);\n\nQuestion: How much international mail has 4,650 international freight and more than 0 domestic mail?" }, { "role": "assistant", "content": "SELECT SUM(\"international_mail\") FROM \"loaded_unloaded_freight_and_mail_tons_tu\" WHERE \"international_freight\"='4,650' AND \"domestic_mail\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaded_unloaded_freight_and_mail_tons_tu\" (\n \"year\" real,\n \"domestic_freight\" real,\n \"domestic_mail\" real,\n \"international_freight\" real,\n \"international_mail\" real,\n \"total_freight_and_mail\" real,\n \"change\" text\n);\n\nQuestion: What is the most domestic freight with a change of +9,8% and a total freight and mail of more than 3,278?" }, { "role": "assistant", "content": "SELECT MAX(\"domestic_freight\") FROM \"loaded_unloaded_freight_and_mail_tons_tu\" WHERE \"change\"='+9,8%' AND \"total_freight_and_mail\">'3,278';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaded_unloaded_freight_and_mail_tons_tu\" (\n \"year\" real,\n \"domestic_freight\" real,\n \"domestic_mail\" real,\n \"international_freight\" real,\n \"international_mail\" real,\n \"total_freight_and_mail\" real,\n \"change\" text\n);\n\nQuestion: How much international freight has a change of +0,2% with more than 0 international mail?" }, { "role": "assistant", "content": "SELECT COUNT(\"international_freight\") FROM \"loaded_unloaded_freight_and_mail_tons_tu\" WHERE \"change\"='+0,2%' AND \"international_mail\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaded_unloaded_freight_and_mail_tons_tu\" (\n \"year\" real,\n \"domestic_freight\" real,\n \"domestic_mail\" real,\n \"international_freight\" real,\n \"international_mail\" real,\n \"total_freight_and_mail\" real,\n \"change\" text\n);\n\nQuestion: What is the international mail with the highest number that has a change of +0,2% and less than 0 domestic mail?" }, { "role": "assistant", "content": "SELECT MAX(\"international_mail\") FROM \"loaded_unloaded_freight_and_mail_tons_tu\" WHERE \"change\"='+0,2%' AND \"domestic_mail\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"loaded_unloaded_freight_and_mail_tons_tu\" (\n \"year\" real,\n \"domestic_freight\" real,\n \"domestic_mail\" real,\n \"international_freight\" real,\n \"international_mail\" real,\n \"total_freight_and_mail\" real,\n \"change\" text\n);\n\nQuestion: What is the international mail with the lowest number to have less than 72 domestic freight, 0 domestic mail later than 2012 with total freight and mail more than 4,695?" }, { "role": "assistant", "content": "SELECT MIN(\"international_mail\") FROM \"loaded_unloaded_freight_and_mail_tons_tu\" WHERE \"domestic_freight\"<72 AND \"domestic_mail\"=0 AND \"year\"<2012 AND \"total_freight_and_mail\">'4,695';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: what is the venue when the date is 16 january 1996?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='16 january 1996';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: what is the competition when the date is 16 january 1996?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"date\"='16 january 1996';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: WHAT IS THE RECORD FOR FEBRUARY 11?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='february 11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"nominated_work\" text,\n \"award\" text,\n \"category\" text,\n \"result\" text\n);\n\nQuestion: What was the award before 2001?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"year\"<2001;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the highest week for a game that was located at the Molson Stadium?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"regular_season\" WHERE \"location\"='molson stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the average week number for games that had 28,800 fans in attendance?" }, { "role": "assistant", "content": "SELECT AVG(\"week\") FROM \"regular_season\" WHERE \"attendance\"='28,800';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"final_score\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who did the argonauts play against during the game that had 19,423 fans in attendance?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"regular_season\" WHERE \"attendance\"='19,423';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_31\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was Juli's winning margin on Aug 24, 1986?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"lpga_tour_wins_31\" WHERE \"date\"='aug 24, 1986';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"lpga_tour_wins_31\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the margin of victory at the LPGA Championship?" }, { "role": "assistant", "content": "SELECT \"margin_of_victory\" FROM \"lpga_tour_wins_31\" WHERE \"tournament\"='lpga championship';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_record\" (\n \"season\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"ivy_lg_record\" text\n);\n\nQuestion: What is the highest value for Ties, when Losses is less than 8?" }, { "role": "assistant", "content": "SELECT MAX(\"ties\") FROM \"coaching_record\" WHERE \"losses\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaching_record\" (\n \"season\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"ivy_lg_record\" text\n);\n\nQuestion: What is the total number of Losses, when Ties is 2, and when Wins is greater than 8?" }, { "role": "assistant", "content": "SELECT COUNT(\"losses\") FROM \"coaching_record\" WHERE \"ties\"=2 AND \"wins\">8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"country\" text,\n \"mark\" text,\n \"react\" real\n);\n\nQuestion: What is the highest React that has a 7.61 Mark and a heat bigger than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"react\") FROM \"heats\" WHERE \"mark\"='7.61' AND \"heat\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"officers\" (\n \"rank\" text,\n \"badge_serial_number\" text,\n \"tenure\" text,\n \"date_of_death\" text,\n \"cause_of_death\" text\n);\n\nQuestion: What is the Cause of death of the Officer with a Date of death of 1956-09-07?" }, { "role": "assistant", "content": "SELECT \"cause_of_death\" FROM \"officers\" WHERE \"date_of_death\"='1956-09-07';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"officers\" (\n \"rank\" text,\n \"badge_serial_number\" text,\n \"tenure\" text,\n \"date_of_death\" text,\n \"cause_of_death\" text\n);\n\nQuestion: What is the Tenure of the Officer who died in a helicopter accident with Badge/Serial Number 16805?" }, { "role": "assistant", "content": "SELECT \"tenure\" FROM \"officers\" WHERE \"cause_of_death\"='helicopter accident' AND \"badge_serial_number\"='16805';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"officers\" (\n \"rank\" text,\n \"badge_serial_number\" text,\n \"tenure\" text,\n \"date_of_death\" text,\n \"cause_of_death\" text\n);\n\nQuestion: What is the Badge/Serial Number of the Policeman who died in Gunfire on 1919-02-18?" }, { "role": "assistant", "content": "SELECT \"badge_serial_number\" FROM \"officers\" WHERE \"rank\"='policeman' AND \"cause_of_death\"='gunfire' AND \"date_of_death\"='1919-02-18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"officers\" (\n \"rank\" text,\n \"badge_serial_number\" text,\n \"tenure\" text,\n \"date_of_death\" text,\n \"cause_of_death\" text\n);\n\nQuestion: What is the Rank of the Officer with Badge/Serial Number 11755 who died in Gunfire?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"officers\" WHERE \"cause_of_death\"='gunfire' AND \"badge_serial_number\"='11755';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_1\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is Team, when Tries Against is 8?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"pool_1\" WHERE \"tries_against\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_1\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is Tries Against, when Tries For is 20?" }, { "role": "assistant", "content": "SELECT \"tries_against\" FROM \"pool_1\" WHERE \"tries_for\"='20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_1\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is Tries Against, when Points For is 98?" }, { "role": "assistant", "content": "SELECT \"tries_against\" FROM \"pool_1\" WHERE \"points_for\"='98';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_1\" (\n \"team\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_diff\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_diff\" text\n);\n\nQuestion: What is Points Against, when Try Diff is +22?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"pool_1\" WHERE \"try_diff\"='+22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is Record, when Event is \"Independent Event\", and when Method is \"Submission (Peruvian Necktie)\"?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='independent event' AND \"method\"='submission (peruvian necktie)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is Event, when Method is \"Submission (Armbar)\", and when Opponent is \"Jason St. Louis\"?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='submission (armbar)' AND \"opponent\"='jason st. louis';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What is Res., when Event is \"KOTC 11 - Domination\"?" }, { "role": "assistant", "content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='kotc 11 - domination';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: How many were in attendance with a Result of l 17\u201310?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='l 17\u201310';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: How many were in attendance in a week lower than 5 with a Bye result?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"<5 AND \"result\"='bye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: On what date was the result w 26\u201320?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='w 26\u201320';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent in a week below 14 on October 10, 1993?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<14 AND \"date\"='october 10, 1993';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: Name the average Top 5 which has a Position of 52nd with a Year smaller than 2000?" }, { "role": "assistant", "content": "SELECT AVG(\"top_5\") FROM \"nascar_nationwide_series\" WHERE \"position\"='52nd' AND \"year\"<2000;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nascar_nationwide_series\" (\n \"year\" real,\n \"starts\" real,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"poles\" real,\n \"avg_start\" real,\n \"avg_finish\" real,\n \"winnings\" text,\n \"position\" text,\n \"team_s\" text\n);\n\nQuestion: Name the average Wins which has a Top 10 smaller than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"nascar_nationwide_series\" WHERE \"top_10\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: Which Points Classification does the General Classification of Cyril Dessel have?" }, { "role": "assistant", "content": "SELECT \"points_classification\" FROM \"jersey_progress\" WHERE \"general_classification\"='cyril dessel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is the Team Classification if the Winner is Cyril Dessel?" }, { "role": "assistant", "content": "SELECT \"team_classification\" FROM \"jersey_progress\" WHERE \"winner\"='cyril dessel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: In the final Stage with a Mountains Classification of Christophe Moreau, what is the Team Classification?" }, { "role": "assistant", "content": "SELECT \"team_classification\" FROM \"jersey_progress\" WHERE \"mountains_classification\"='christophe moreau' AND \"stage\"='final';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is the Mountains Classification for Winner Thor hushovd with Sprints Classification of no award?" }, { "role": "assistant", "content": "SELECT \"mountains_classification\" FROM \"jersey_progress\" WHERE \"winner\"='thor hushovd' AND \"sprints_classification\"='no award';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"jersey_progress\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"mountains_classification\" text,\n \"points_classification\" text,\n \"sprints_classification\" text,\n \"team_classification\" text\n);\n\nQuestion: What is the Mountains Classification for Winner jos\u00e9 luis carrasco?" }, { "role": "assistant", "content": "SELECT \"mountains_classification\" FROM \"jersey_progress\" WHERE \"winner\"='jos\u00e9 luis carrasco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"channel\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"studio_host\" text,\n \"studio_analysts\" text\n);\n\nQuestion: Which channel has Joel Meyers as the Play by play commentator?" }, { "role": "assistant", "content": "SELECT \"channel\" FROM \"2000s\" WHERE \"play_by_play\"='joel meyers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"channel\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"studio_host\" text,\n \"studio_analysts\" text\n);\n\nQuestion: Who is the studio host for the game that has Paul Sunderland as play by play commentator and Jack Haley as the Studio Analyst?" }, { "role": "assistant", "content": "SELECT \"studio_host\" FROM \"2000s\" WHERE \"play_by_play\"='paul sunderland' AND \"studio_analysts\"='jack haley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"channel\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"studio_host\" text,\n \"studio_analysts\" text\n);\n\nQuestion: Who is the studio host for the game broadcasted by Fox Sports Net west and has Chick Hearn as the play by play commentator ?" }, { "role": "assistant", "content": "SELECT \"studio_host\" FROM \"2000s\" WHERE \"channel\"='fox sports net west' AND \"play_by_play\"='chick hearn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"channel\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"studio_host\" text,\n \"studio_analysts\" text\n);\n\nQuestion: Who is the play by play commentator for the game that has Alan Massengale as Studio Host?" }, { "role": "assistant", "content": "SELECT \"play_by_play\" FROM \"2000s\" WHERE \"studio_host\"='alan massengale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"channel\" text,\n \"play_by_play\" text,\n \"color_commentator_s\" text,\n \"studio_host\" text,\n \"studio_analysts\" text\n);\n\nQuestion: which channel will have play by play commentator Paul Sunderland, Studio Host Bill Macdonald and Studi Analysty Jack Haley?" }, { "role": "assistant", "content": "SELECT \"channel\" FROM \"2000s\" WHERE \"play_by_play\"='paul sunderland' AND \"studio_host\"='bill macdonald' AND \"studio_analysts\"='jack haley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"player\" text,\n \"club\" text,\n \"games\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: How many Assists have a Club of adler mannheim, and Points larger than 57?" }, { "role": "assistant", "content": "SELECT SUM(\"assists\") FROM \"regular_season\" WHERE \"club\"='adler mannheim' AND \"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 \"player\" text,\n \"club\" text,\n \"games\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: How many points have 41 assists?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"regular_season\" WHERE \"assists\"=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 \"player\" text,\n \"club\" text,\n \"games\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: Which Goals have a Player of david mcllwain, and Games larger than 52?" }, { "role": "assistant", "content": "SELECT MAX(\"goals\") FROM \"regular_season\" WHERE \"player\"='david mcllwain' AND \"games\">52;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"platforms\" (\n \"stop_no\" text,\n \"platform\" text,\n \"line\" text,\n \"stopping_pattern\" text,\n \"destination\" text\n);\n\nQuestion: Which Platform is the one that has a Stop number of 99014?" }, { "role": "assistant", "content": "SELECT \"platform\" FROM \"platforms\" WHERE \"stop_no\"='99014';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"platforms\" (\n \"stop_no\" text,\n \"platform\" text,\n \"line\" text,\n \"stopping_pattern\" text,\n \"destination\" text\n);\n\nQuestion: Which Line has a Platform of 3?" }, { "role": "assistant", "content": "SELECT \"line\" FROM \"platforms\" WHERE \"platform\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"platforms\" (\n \"stop_no\" text,\n \"platform\" text,\n \"line\" text,\n \"stopping_pattern\" text,\n \"destination\" text\n);\n\nQuestion: Which Destination has a Stopping pattern of [2777] mciver station platforms?" }, { "role": "assistant", "content": "SELECT \"destination\" FROM \"platforms\" WHERE \"stopping_pattern\"='[2777] mciver station platforms';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"platforms\" (\n \"stop_no\" text,\n \"platform\" text,\n \"line\" text,\n \"stopping_pattern\" text,\n \"destination\" text\n);\n\nQuestion: Which Stop # has a Platform of [2777] mciver station platforms?" }, { "role": "assistant", "content": "SELECT \"stop_no\" FROM \"platforms\" WHERE \"platform\"='[2777] mciver station platforms';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"platforms\" (\n \"stop_no\" text,\n \"platform\" text,\n \"line\" text,\n \"stopping_pattern\" text,\n \"destination\" text\n);\n\nQuestion: Which Line has a Stopping pattern of all stations, A, b, p?" }, { "role": "assistant", "content": "SELECT \"line\" FROM \"platforms\" WHERE \"stopping_pattern\"='all stations, a, b, p';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"platforms\" (\n \"stop_no\" text,\n \"platform\" text,\n \"line\" text,\n \"stopping_pattern\" text,\n \"destination\" text\n);\n\nQuestion: Which Stopping pattern has a Platform of [2777] mciver station platforms?" }, { "role": "assistant", "content": "SELECT \"stopping_pattern\" FROM \"platforms\" WHERE \"platform\"='[2777] mciver station platforms';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german_championship_finals_under_the_gau\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"result\" text,\n \"date\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: Who was runner-up at Berlin when the result was 2-0 with 100,000 fans in attendance?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"german_championship_finals_under_the_gau\" WHERE \"venue\"='berlin' AND \"result\"='2-0' AND \"attendance\"='100,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german_championship_finals_under_the_gau\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"result\" text,\n \"date\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the champion at berlin when the result was 2-0 with 100,000 fans in attendance?" }, { "role": "assistant", "content": "SELECT \"champion\" FROM \"german_championship_finals_under_the_gau\" WHERE \"venue\"='berlin' AND \"attendance\"='100,000' AND \"result\"='2-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german_championship_finals_under_the_gau\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"result\" text,\n \"date\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What year had an attendance of 90,000?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"german_championship_finals_under_the_gau\" WHERE \"attendance\"='90,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german_championship_finals_under_the_gau\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"result\" text,\n \"date\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What is the sum of the years where the attendance was 95,000 and the runner-up was dresdner sc?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"german_championship_finals_under_the_gau\" WHERE \"attendance\"='95,000' AND \"runner_up\"='dresdner sc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german_championship_finals_under_the_gau\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"result\" text,\n \"date\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the champion when the attendance was 70,000?" }, { "role": "assistant", "content": "SELECT \"champion\" FROM \"german_championship_finals_under_the_gau\" WHERE \"attendance\"='70,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_completed_buildings_and_structur\" (\n \"rank\" text,\n \"name\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" text\n);\n\nQuestion: What is the Height (ft) of the Churchill House with a Height (m) less than 59?" }, { "role": "assistant", "content": "SELECT COUNT(\"height_ft\") FROM \"tallest_completed_buildings_and_structur\" WHERE \"name\"='churchill house' AND \"height_m\"<59;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_completed_buildings_and_structur\" (\n \"rank\" text,\n \"name\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" text\n);\n\nQuestion: What is the Height of the Canterbury House with 12 Floors and a Rank of 75=?" }, { "role": "assistant", "content": "SELECT AVG(\"height_ft\") FROM \"tallest_completed_buildings_and_structur\" WHERE \"floors\"='12' AND \"rank\"='75=' AND \"name\"='canterbury house';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_completed_buildings_and_structur\" (\n \"rank\" text,\n \"name\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" text\n);\n\nQuestion: What is the Height (m) of the 32= Rank Building with 18 Floors and Height (ft) greater than 171?" }, { "role": "assistant", "content": "SELECT AVG(\"height_m\") FROM \"tallest_completed_buildings_and_structur\" WHERE \"floors\"='18' AND \"height_ft\">171 AND \"rank\"='32=';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Total for 1994, 1997 years won?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"made_the_cut\" WHERE \"year_s_won\"='1994, 1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Player than won in 2003?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"year_s_won\"='2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Average total for jim furyk?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"made_the_cut\" WHERE \"player\"='jim furyk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_jersey_devils_4_boston_bruins_1\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which record had a visitor of New Jersey Devils on May 7?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"new_jersey_devils_4_boston_bruins_1\" WHERE \"visitor\"='new jersey devils' AND \"date\"='may 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"new_jersey_devils_4_boston_bruins_1\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the record on May 8?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"new_jersey_devils_4_boston_bruins_1\" WHERE \"date\"='may 8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"provinces\" (\n \"province\" text,\n \"provincial_capital\" text,\n \"largest_city\" text,\n \"area_km_2\" real,\n \"population_2013\" real\n);\n\nQuestion: What is Nelspruit's population?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_2013\") FROM \"provinces\" WHERE \"largest_city\"='nelspruit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"play_off_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: When Hapoel tel aviv was team 2 and 1st leg was 1\u20132, what was the 2nd leg?" }, { "role": "assistant", "content": "SELECT \"2nd_leg\" FROM \"play_off_round\" WHERE \"1st_leg\"='1\u20132' AND \"team_2\"='hapoel tel aviv';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Which Time has a Round of 3, and a Record of 2\u20130?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=3 AND \"record\"='2\u20130';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What were the average laps on a grid of 11?" }, { "role": "assistant", "content": "SELECT AVG(\"laps\") FROM \"moto_gp_classification\" WHERE \"grid\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Where is the location with a record of 50-19?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"game_log\" WHERE \"record\"='50-19';" } ]