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 \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the opponent before week 8 when the result was l 28-17?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<8 AND \"result\"='l 28-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: In which week was the game played on October 12, 1975 and the crowd was larger than 44,043?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='october 12, 1975' AND \"attendance\">'44,043';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_of_pre_bundesliga_oberligen\" (\n \"year\" real,\n \"nord\" text,\n \"west\" text,\n \"s_dwest\" text,\n \"berlin\" text\n);\n\nQuestion: What was Berlin when fk pirmasens was S\u00fcdwest and westfalia herne was west?" }, { "role": "assistant", "content": "SELECT \"berlin\" FROM \"champions_of_pre_bundesliga_oberligen\" WHERE \"s_dwest\"='fk pirmasens' AND \"west\"='westfalia herne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_of_pre_bundesliga_oberligen\" (\n \"year\" real,\n \"nord\" text,\n \"west\" text,\n \"s_dwest\" text,\n \"berlin\" text\n);\n\nQuestion: What is the earliest year borussia dortmund was west and bfc viktoria 1889 was Berlin?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"champions_of_pre_bundesliga_oberligen\" WHERE \"west\"='borussia dortmund' AND \"berlin\"='bfc viktoria 1889';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"champions_of_pre_bundesliga_oberligen\" (\n \"year\" real,\n \"nord\" text,\n \"west\" text,\n \"s_dwest\" text,\n \"berlin\" text\n);\n\nQuestion: What is the Nord in 1952, when tennis borussia berlin was Berlin?" }, { "role": "assistant", "content": "SELECT \"nord\" FROM \"champions_of_pre_bundesliga_oberligen\" WHERE \"berlin\"='tennis borussia berlin' AND \"year\"=1952;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Where did Japan place?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"country\"='japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the away team when the attendance was 206?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"second_round\" WHERE \"attendance\"='206';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the away team when the Tie no was 34?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"second_round\" WHERE \"tie_no\"='34';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the away team when the attendance was 76?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"second_round\" WHERE \"attendance\"='76';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the home team when the Tie no was 7?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"second_round\" WHERE \"tie_no\"='7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Tie no when the away team was east thurrock united?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"second_round\" WHERE \"away_team\"='east thurrock united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plebiscite\" (\n \"constituency\" text,\n \"electorate\" real,\n \"votes\" real,\n \"turnout\" real,\n \"spoilt\" real,\n \"percent_yes\" real\n);\n\nQuestion: WHAT IS THE LOWEST TURNOUT FOR AN ELECTORATE LARGER THAN 47,822 AND SPOILT OF 2,333?" }, { "role": "assistant", "content": "SELECT MIN(\"turnout\") FROM \"plebiscite\" WHERE \"electorate\">'47,822' AND \"spoilt\"='2,333';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plebiscite\" (\n \"constituency\" text,\n \"electorate\" real,\n \"votes\" real,\n \"turnout\" real,\n \"spoilt\" real,\n \"percent_yes\" real\n);\n\nQuestion: WHAT IS THE AVERAGE VOTE FOR DUBLIN SOUTH, AND SPOILT SMALLER THAN 3,387?" }, { "role": "assistant", "content": "SELECT AVG(\"votes\") FROM \"plebiscite\" WHERE \"constituency\"='dublin south' AND \"spoilt\"<'3,387';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plebiscite\" (\n \"constituency\" text,\n \"electorate\" real,\n \"votes\" real,\n \"turnout\" real,\n \"spoilt\" real,\n \"percent_yes\" real\n);\n\nQuestion: WHAT IS AN AVERAGE ELECTORATE WITH VOTES OF 28,475 AND SPOILT SMALLER THAN 5,779?" }, { "role": "assistant", "content": "SELECT AVG(\"electorate\") FROM \"plebiscite\" WHERE \"votes\"='28,475' AND \"spoilt\"<'5,779';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"plebiscite\" (\n \"constituency\" text,\n \"electorate\" real,\n \"votes\" real,\n \"turnout\" real,\n \"spoilt\" real,\n \"percent_yes\" real\n);\n\nQuestion: WHAT IS THE LOWEST ELECTORATE WITH 31,511 VOTES, AND PERCENT YES SMALLER THAN 57.2?" }, { "role": "assistant", "content": "SELECT MIN(\"electorate\") FROM \"plebiscite\" WHERE \"votes\"='31,511' AND \"percent_yes\"<57.2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_friendlies\" (\n \"match\" real,\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: Where was the game played on January 23, 2008?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"pre_season_friendlies\" WHERE \"date\"='january 23, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_friendlies\" (\n \"match\" real,\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: Where was the Singapore Charity Shield tournament played?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"pre_season_friendlies\" WHERE \"tournament\"='singapore charity shield';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_friendlies\" (\n \"match\" real,\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: Where was the game located on January 23, 2008?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"pre_season_friendlies\" WHERE \"date\"='january 23, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_friendlies\" (\n \"match\" real,\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: Where is the location of the friendly match larger than 1 where the Super Reds were the opponent?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"pre_season_friendlies\" WHERE \"match\">1 AND \"tournament\"='friendly' AND \"opponent_team\"='super reds';" } ]
[ { "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 \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: When the team is @ Milwaukee, what is the name of the location where the game is played?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"team\"='@ milwaukee';" } ]
[ { "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 \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: For the game with team of @ Chicago, what was the final score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"team\"='@ chicago';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: How long was Volume:Issue 12:4-6 at the top?" }, { "role": "assistant", "content": "SELECT COUNT(\"weeks_on_top\") FROM \"see_also\" WHERE \"volume_issue\"='12:4-6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_u_s\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: What rank did Best Friends receive?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"highest_grossing_films_u_s\" WHERE \"title\"='best friends';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: How many points are for the Fall Bay RFC club?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"league_table\" WHERE \"club\"='fall bay rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What was drawn for 6 bonus points and is against 410 points?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"league_table\" WHERE \"bonus_points\"='6' AND \"points_against\"='410';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What is the club had 431 points against them?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"league_table\" WHERE \"points_against\"='431';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What are the points against with a points difference?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"league_table\" WHERE \"points_difference\"='points difference';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"points_difference\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What are the played points difference?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"league_table\" WHERE \"points_difference\"='points difference';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"time\" text\n);\n\nQuestion: When the Home Team was Sydney, what did the Away team score?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"round_of_16\" WHERE \"home_team\"='sydney';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"time\" text\n);\n\nQuestion: What was the Home team Carlton's Ground?" }, { "role": "assistant", "content": "SELECT \"ground\" FROM \"round_of_16\" WHERE \"home_team\"='carlton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"crowd\" real,\n \"date\" text,\n \"time\" text\n);\n\nQuestion: When Essendon scored 8.14 (62), what was the Home team score?" }, { "role": "assistant", "content": "SELECT \"home_team_score\" FROM \"round_of_16\" WHERE \"away_team_score\"='8.14 (62)' AND \"away_team\"='essendon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which player scored 71?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"first_round\" WHERE \"score\"=71;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is the circuit on 19 Apr with Craig Lowndes as the winner?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"race_calendar\" WHERE \"winner\"='craig lowndes' AND \"date\"='19 apr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What circuit has volvo cars australia as the team?" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"race_calendar\" WHERE \"team\"='volvo cars australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What series was Dick Johnson Racing the team?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"race_calendar\" WHERE \"team\"='dick johnson racing';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"date\" text,\n \"series\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What is the city/state of the circuit where Russell Ingall Larry Perkins was the winner?" }, { "role": "assistant", "content": "SELECT \"city_state\" FROM \"race_calendar\" WHERE \"winner\"='russell ingall larry perkins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date was the away team, team Gillingham?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"first_round_proper\" WHERE \"away_team\"='gillingham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score for a no. 21 tie?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"tie_no\"='21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the date for the away team, team Southport?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"first_round_proper\" WHERE \"away_team\"='southport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score for the away team, southport?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round_proper\" WHERE \"away_team\"='southport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result when the attendance was 47,971?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='47,971';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result when the attendance was 46,456?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='46,456';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent on september 27, 1998?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='september 27, 1998';" } ]
[ { "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: Which Venue has a Score of 0:0, a Season larger than 2010, and a Team 1 of t&t hanoi?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"results\" WHERE \"score\"='0:0' AND \"season\">2010 AND \"team_1\"='t&t hanoi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_csl_teams\" (\n \"team\" text,\n \"city\" text,\n \"total_seasons\" real,\n \"seasons\" text,\n \"highest_league\" text\n);\n\nQuestion: What's the highest league of the Nova Scotia Clippers with a total season of less than 4?" }, { "role": "assistant", "content": "SELECT \"highest_league\" FROM \"list_of_csl_teams\" WHERE \"total_seasons\"<4 AND \"team\"='nova scotia clippers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_csl_teams\" (\n \"team\" text,\n \"city\" text,\n \"total_seasons\" real,\n \"seasons\" text,\n \"highest_league\" text\n);\n\nQuestion: What is the season that has fewer than 5 total seasons and is in Ottawa, Ontario?" }, { "role": "assistant", "content": "SELECT \"seasons\" FROM \"list_of_csl_teams\" WHERE \"total_seasons\"<5 AND \"city\"='ottawa, ontario';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_csl_teams\" (\n \"team\" text,\n \"city\" text,\n \"total_seasons\" real,\n \"seasons\" text,\n \"highest_league\" text\n);\n\nQuestion: What is the least total seasons of the Vancouver 86ers?" }, { "role": "assistant", "content": "SELECT MIN(\"total_seasons\") FROM \"list_of_csl_teams\" WHERE \"team\"='vancouver 86ers';" } ]
[ { "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 week 14?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=14;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_4\" (\n \"date\" text,\n \"city\" text,\n \"event\" text,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is Date, when City is \"Punta Del Este\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_4\" WHERE \"city\"='punta del este';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_4\" (\n \"date\" text,\n \"city\" text,\n \"event\" text,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is City, when Prize is \"$146,000\"?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"season_4\" WHERE \"prize\"='$146,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_4\" (\n \"date\" text,\n \"city\" text,\n \"event\" text,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is Date, when Winner is \"Murilo Figueiredo\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"season_4\" WHERE \"winner\"='murilo figueiredo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: What Aspect has a Programming of Saigon Network Television?" }, { "role": "assistant", "content": "SELECT \"aspect\" FROM \"digital_channels\" WHERE \"programming\"='saigon network television';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which Aspect has a Programming of latv?" }, { "role": "assistant", "content": "SELECT \"aspect\" FROM \"digital_channels\" WHERE \"programming\"='latv';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which Programming has a Channel greater than 51.2 and a PSIP Short Name of kyaz-5?" }, { "role": "assistant", "content": "SELECT \"programming\" FROM \"digital_channels\" WHERE \"channel\">51.2 AND \"psip_short_name\"='kyaz-5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: What is the PSIP Short name for the Channel that is less than 51.6?" }, { "role": "assistant", "content": "SELECT \"psip_short_name\" FROM \"digital_channels\" WHERE \"channel\"<51.6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"beer_name\" text,\n \"prize\" text,\n \"category\" text,\n \"competition\" text\n);\n\nQuestion: What year did maggs magnificent mild bear win overall at the camra reading branch beer festival?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"awards\" WHERE \"beer_name\"='maggs magnificent mild' AND \"competition\"='camra reading branch beer festival' AND \"category\"='overall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"beer_name\" text,\n \"prize\" text,\n \"category\" text,\n \"competition\" text\n);\n\nQuestion: What prize did good old boy win in 2002 at the camra london and south east regional competition?" }, { "role": "assistant", "content": "SELECT \"prize\" FROM \"awards\" WHERE \"year\">2002 AND \"competition\"='camra london and south east regional competition' AND \"beer_name\"='good old boy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"beer_name\" text,\n \"prize\" text,\n \"category\" text,\n \"competition\" text\n);\n\nQuestion: What year did maggs magnificent mild win a gold medal in the mild and porter category at the siba south east region beer competition?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"awards\" WHERE \"beer_name\"='maggs magnificent mild' AND \"prize\"='gold medal' AND \"category\"='mild and porter' AND \"competition\"='siba south east region beer competition';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"beer_name\" text,\n \"prize\" text,\n \"category\" text,\n \"competition\" text\n);\n\nQuestion: What beer won a silver medal at the camra reading branch beer festival in 2008?" }, { "role": "assistant", "content": "SELECT \"beer_name\" FROM \"awards\" WHERE \"prize\"='silver medal' AND \"competition\"='camra reading branch beer festival' AND \"year\"=2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"45_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"gpu_frequency\" text,\n \"l2_cache\" text,\n \"i_o_bus\" text,\n \"memory\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What is Model Number, when Part Number(s) is AY80609003987AB?" }, { "role": "assistant", "content": "SELECT \"model_number\" FROM \"45_nm\" WHERE \"part_number_s\"='ay80609003987ab';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"45_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"gpu_frequency\" text,\n \"l2_cache\" text,\n \"i_o_bus\" text,\n \"memory\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What is Frequency, when Part Number(s) is AY80609004002AC?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"45_nm\" WHERE \"part_number_s\"='ay80609004002ac';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"45_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"gpu_frequency\" text,\n \"l2_cache\" text,\n \"i_o_bus\" text,\n \"memory\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What is sSpec Number, when Frequency is 1 GHZ?" }, { "role": "assistant", "content": "SELECT \"s_spec_number\" FROM \"45_nm\" WHERE \"frequency\"='1 ghz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"45_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"gpu_frequency\" text,\n \"l2_cache\" text,\n \"i_o_bus\" text,\n \"memory\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What is Release Date, when sSpec Number is SLBZE(C0)SLBR8?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"45_nm\" WHERE \"s_spec_number\"='slbze(c0)slbr8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"45_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"gpu_frequency\" text,\n \"l2_cache\" text,\n \"i_o_bus\" text,\n \"memory\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text\n);\n\nQuestion: What is L2 Cache, when Model Number is Atom Z625?" }, { "role": "assistant", "content": "SELECT \"l2_cache\" FROM \"45_nm\" WHERE \"model_number\"='atom z625';" } ]
[ { "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 \"college\" text\n);\n\nQuestion: Which Pick has a Player of renaldo wynn, and a Round smaller than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"player\"='renaldo wynn' AND \"round\"<1;" } ]
[ { "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 \"college\" text\n);\n\nQuestion: Which Round has a Player of damon jones?" }, { "role": "assistant", "content": "SELECT SUM(\"round\") FROM \"nfl_draft\" WHERE \"player\"='damon jones';" } ]
[ { "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 \"college\" text\n);\n\nQuestion: Which College has a Round smaller than 2?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"round\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_jay_nixon\" text,\n \"republican_kenny_hulshof\" text,\n \"lead_margin\" real\n);\n\nQuestion: What was the lead margin when Nixon had 48% and reporting was done by Rasmussen Reports?" }, { "role": "assistant", "content": "SELECT COUNT(\"lead_margin\") FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"democrat_jay_nixon\"='48%' AND \"poll_source\"='rasmussen reports';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_gu\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_jay_nixon\" text,\n \"republican_kenny_hulshof\" text,\n \"lead_margin\" real\n);\n\nQuestion: What are the dates where Hulshof had 37% and Nixon had 48%?" }, { "role": "assistant", "content": "SELECT \"dates_administered\" FROM \"opinion_polling_for_the_united_states_gu\" WHERE \"republican_kenny_hulshof\"='37%' AND \"democrat_jay_nixon\"='48%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"date\" text,\n \"distance\" text,\n \"handler\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: Which event is located in Northfield, Mn?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"records\" WHERE \"location\"='northfield, mn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"date\" text,\n \"distance\" text,\n \"handler\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: Which event has a distance of ft10in (m)?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"records\" WHERE \"distance\"='ft10in (m)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"date\" text,\n \"distance\" text,\n \"handler\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: What distance does the Bass Pro Shops event have?" }, { "role": "assistant", "content": "SELECT \"distance\" FROM \"records\" WHERE \"event\"='bass pro shops';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"date\" text,\n \"distance\" text,\n \"handler\" text,\n \"event\" text,\n \"location\" text\n);\n\nQuestion: On what date was Mike Jackson a handler at the Indianapolis Boat, Sport & Travel Show?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"records\" WHERE \"handler\"='mike jackson' AND \"event\"='indianapolis boat, sport & travel show';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: Who did they play when there were only 751 in attendance?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"january\" WHERE \"attendance\"<751;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: When did they play the swindon wildcats away?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"january\" WHERE \"venue\"='away' AND \"opponent\"='swindon wildcats';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real,\n \"competition\" text,\n \"man_of_the_match\" text\n);\n\nQuestion: Who was the Man of the Match when they played the Romford Raiders at home?" }, { "role": "assistant", "content": "SELECT \"man_of_the_match\" FROM \"january\" WHERE \"venue\"='home' AND \"opponent\"='romford raiders';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_out_on_loan\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"app_l_c_e\" text,\n \"goals_l_c_e\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"notes\" text\n);\n\nQuestion: What is the Nationality of the player named Yahaya, who has as App(L/C/E) of 0 (0/0/0)?" }, { "role": "assistant", "content": "SELECT \"nat\" FROM \"players_out_on_loan\" WHERE \"app_l_c_e\"='0 (0/0/0)' AND \"name\"='yahaya';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"players_out_on_loan\" (\n \"nat\" text,\n \"name\" text,\n \"since\" text,\n \"app_l_c_e\" text,\n \"goals_l_c_e\" text,\n \"ends\" real,\n \"transfer_fee\" text,\n \"notes\" text\n);\n\nQuestion: What was the transfer fee for the player who had an App(L/C/E) of 0 (0/0/0) and notes of to anagennisi karditsa?" }, { "role": "assistant", "content": "SELECT \"transfer_fee\" FROM \"players_out_on_loan\" WHERE \"app_l_c_e\"='0 (0/0/0)' AND \"notes\"='to anagennisi karditsa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variations\" (\n \"american_name\" text,\n \"british_name\" text,\n \"value\" text,\n \"dotted_value\" text,\n \"double_dotted_value\" text,\n \"triple_dotted_value\" text\n);\n\nQuestion: what is the american name when the triple dotted value is 15/2 or 7 1/2?" }, { "role": "assistant", "content": "SELECT \"american_name\" FROM \"variations\" WHERE \"triple_dotted_value\"='15/2 or 7 1/2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variations\" (\n \"american_name\" text,\n \"british_name\" text,\n \"value\" text,\n \"dotted_value\" text,\n \"double_dotted_value\" text,\n \"triple_dotted_value\" text\n);\n\nQuestion: what is the british name when the american name is sixteenth note?" }, { "role": "assistant", "content": "SELECT \"british_name\" FROM \"variations\" WHERE \"american_name\"='sixteenth note';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variations\" (\n \"american_name\" text,\n \"british_name\" text,\n \"value\" text,\n \"dotted_value\" text,\n \"double_dotted_value\" text,\n \"triple_dotted_value\" text\n);\n\nQuestion: what is the value when the british name is quaver?" }, { "role": "assistant", "content": "SELECT \"value\" FROM \"variations\" WHERE \"british_name\"='quaver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variations\" (\n \"american_name\" text,\n \"british_name\" text,\n \"value\" text,\n \"dotted_value\" text,\n \"double_dotted_value\" text,\n \"triple_dotted_value\" text\n);\n\nQuestion: what is the british name when the double dotted value is 7/32?" }, { "role": "assistant", "content": "SELECT \"british_name\" FROM \"variations\" WHERE \"double_dotted_value\"='7/32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variations\" (\n \"american_name\" text,\n \"british_name\" text,\n \"value\" text,\n \"dotted_value\" text,\n \"double_dotted_value\" text,\n \"triple_dotted_value\" text\n);\n\nQuestion: what is the double dotted value when the triple dotted value is 15/128?" }, { "role": "assistant", "content": "SELECT \"double_dotted_value\" FROM \"variations\" WHERE \"triple_dotted_value\"='15/128';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"variations\" (\n \"american_name\" text,\n \"british_name\" text,\n \"value\" text,\n \"dotted_value\" text,\n \"double_dotted_value\" text,\n \"triple_dotted_value\" text\n);\n\nQuestion: what is the value when the british name is maxima?" }, { "role": "assistant", "content": "SELECT \"value\" FROM \"variations\" WHERE \"british_name\"='maxima';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Home Team, when Date is \"28 January 1984\", and when Tie No is \"4\"?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"date\"='28 january 1984' AND \"tie_no\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Date, when Away Team is \"Gillingham\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"away_team\"='gillingham';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Home Team, when Date is \"1 February 1984\", and when Tie No is \"5\"?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"fourth_round_proper\" WHERE \"date\"='1 february 1984' AND \"tie_no\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Away Team, when Home Team is \"Sheffield Wednesday\"?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"fourth_round_proper\" WHERE \"home_team\"='sheffield wednesday';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is Date, when Tie No is \"Replay\", and when Away Team is \"Crystal Palace\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"fourth_round_proper\" WHERE \"tie_no\"='replay' AND \"away_team\"='crystal palace';" } ]
[ { "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: What to par has tom kite as the player?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"player\"='tom kite';" } ]
[ { "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: What player has a t57 as the finish?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"finish\"='t57';" } ]
[ { "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: What is the lowest total that has 1992 as the year (s) won?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"made_the_cut\" WHERE \"year_s_won\"='1992';" } ]
[ { "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: What player has +21 as the to par?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"to_par\"='+21';" } ]
[ { "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: Which to par has a total less than 296?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"total\"<296;" } ]
[ { "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: What finish has +21 as the to par?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"to_par\"='+21';" } ]
[ { "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 total number of events that had 34 cuts and 3 in the top 10?" }, { "role": "assistant", "content": "SELECT COUNT(\"events\") FROM \"summary\" WHERE \"cuts_made\"<34 AND \"top_10\">3;" } ]
[ { "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: Who played with more than 51,901 attendance and resulted in t 13-13?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\">'51,901' AND \"result\"='t 13-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the most rebounds on January 3?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='january 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_finals_53_26_27\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Which surface had a date after 1982 and partner of Guy Forget?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_finals_53_26_27\" WHERE \"date\">1982 AND \"partner\"='guy forget';" } ]
[ { "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 result of the week 9 game?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=9;" } ]