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 \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Home Team has a Game of game 1?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"nba_finals\" WHERE \"game\"='game 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Game has a Home Team of san francisco, and a Date of april 22?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"nba_finals\" WHERE \"home_team\"='san francisco' AND \"date\"='april 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Road Team has a Home Team of boston, and a Result of 124-101?" }, { "role": "assistant", "content": "SELECT \"road_team\" FROM \"nba_finals\" WHERE \"home_team\"='boston' AND \"result\"='124-101';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Game has a Home Team of san francisco, and a Date of april 22?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"nba_finals\" WHERE \"home_team\"='san francisco' AND \"date\"='april 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Result has a Road Team of san francisco, and a Game of game 2?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"nba_finals\" WHERE \"road_team\"='san francisco' AND \"game\"='game 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nba_finals\" (\n \"game\" text,\n \"date\" text,\n \"home_team\" text,\n \"result\" text,\n \"road_team\" text\n);\n\nQuestion: Which Home Team has a Result of 124-101?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"nba_finals\" WHERE \"result\"='124-101';" } ]
[ { "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 attendance in a week less than 5 when the result was l 24-20?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"result\"='l 24-20' AND \"week\"<5;" } ]
[ { "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 largest week with the Atlanta Falcons as the opponent?" }, { "role": "assistant", "content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"opponent\"='atlanta falcons';" } ]
[ { "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 attendance in a week greater than 1 with an opponent of Philadelphia Eagles?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"week\">1 AND \"opponent\"='philadelphia eagles';" } ]
[ { "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 \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Score has an Opponent of washington capitals, and a Record of 24-34-17?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"opponent\"='washington capitals' AND \"record\"='24-34-17';" } ]
[ { "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 \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game has an Attendance smaller than 18,277, and Points of 64?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"attendance\"<'18,277' AND \"points\"=64;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: Which Joined has a Nickname of knights, and an Enrollment larger than 2,960?" }, { "role": "assistant", "content": "SELECT SUM(\"joined\") FROM \"members\" WHERE \"nickname\"='knights' AND \"enrollment\">'2,960';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: Which Nickname has an Enrollment smaller than 501, and a Location of clarkesville?" }, { "role": "assistant", "content": "SELECT \"nickname\" FROM \"members\" WHERE \"enrollment\"<501 AND \"location\"='clarkesville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"members\" (\n \"institution\" text,\n \"location\" text,\n \"nickname\" text,\n \"founded\" real,\n \"enrollment\" real,\n \"joined\" real\n);\n\nQuestion: Which Joined has an Institution of abraham baldwin agricultural college, and an Enrollment smaller than 3,284?" }, { "role": "assistant", "content": "SELECT MAX(\"joined\") FROM \"members\" WHERE \"institution\"='abraham baldwin agricultural college' AND \"enrollment\"<'3,284';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"date\" text,\n \"crowd\" real\n);\n\nQuestion: What is Home Team, when Away Team Score is 9.11 (65)?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"group_4\" WHERE \"away_team_score\"='9.11 (65)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"date\" text,\n \"crowd\" real\n);\n\nQuestion: What is Away Team Score, when Ground is Optus Oval, and when Away Team is Fremantle?" }, { "role": "assistant", "content": "SELECT \"away_team_score\" FROM \"group_4\" WHERE \"ground\"='optus oval' AND \"away_team\"='fremantle';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"date\" text,\n \"crowd\" real\n);\n\nQuestion: What is Away Team, when Ground is Colonial Stadium?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"group_4\" WHERE \"ground\"='colonial stadium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"group_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"ground\" text,\n \"date\" text,\n \"crowd\" real\n);\n\nQuestion: What is the sum of Crowd, when Date is Sunday, 4 March, and when Home Team Score is 22.13 (145)?" }, { "role": "assistant", "content": "SELECT SUM(\"crowd\") FROM \"group_4\" WHERE \"date\"='sunday, 4 march' AND \"home_team_score\"='22.13 (145)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: A score of 71-71=142 earned what place?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='71-71=142';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was Jos\u00e9 Mar\u00eda Olaz\u00e1bal's score?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='jos\u00e9 mar\u00eda olaz\u00e1bal';" } ]
[ { "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 team was the opponent on October 15, 1967?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='october 15, 1967';" } ]
[ { "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 lowest attendance when the Green Bay Packers played?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='green bay packers';" } ]
[ { "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 week number when a game was played on November 19, 1967?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"date\"='november 19, 1967';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: If a team has a grid of over 8 with less than 4 points, what's the team name?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"race\" WHERE \"grid\">8 AND \"points\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: When Patrick Carpentier is driving and has less than 19 points with 90 laps, what team is racing?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"race\" WHERE \"laps\"=90 AND \"points\"<19 AND \"driver\"='patrick carpentier';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_scoring_grand_finals\" (\n \"total_points\" real,\n \"score\" text,\n \"premiers\" text,\n \"runners_up\" text,\n \"details\" text\n);\n\nQuestion: What was the score where the total points was 50?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"highest_scoring_grand_finals\" WHERE \"total_points\"=50;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"highest_scoring_grand_finals\" (\n \"total_points\" real,\n \"score\" text,\n \"premiers\" text,\n \"runners_up\" text,\n \"details\" text\n);\n\nQuestion: For the match that had detail of 2001 nrl grand final, what was the lowest total points?" }, { "role": "assistant", "content": "SELECT MIN(\"total_points\") FROM \"highest_scoring_grand_finals\" WHERE \"details\"='2001 nrl grand final';" } ]
[ { "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: Which average Game has a High points of wilson chandler (16)?" }, { "role": "assistant", "content": "SELECT AVG(\"game\") FROM \"game_log\" WHERE \"high_points\"='wilson chandler (16)';" } ]
[ { "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: Which Score has a Game larger than 76, a Location Attendance of madison square garden 19,763, and a High rebounds of wilson chandler (8)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\">76 AND \"location_attendance\"='madison square garden 19,763' AND \"high_rebounds\"='wilson chandler (8)';" } ]
[ { "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: Which Team has a Record of 32\u201350?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"record\"='32\u201350';" } ]
[ { "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: Which Date has a Record of 29\u201347?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='29\u201347';" } ]
[ { "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: Which Date has a Location Attendance of madison square garden 19,763, and a High rebounds of david lee (12)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"location_attendance\"='madison square garden 19,763' AND \"high_rebounds\"='david lee (12)';" } ]
[ { "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: Which Record has a Score of w 107\u2013102 (ot)?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='w 107\u2013102 (ot)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"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: Which Team has a Location Attendance of fedexforum 11,731?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"game_log\" WHERE \"location_attendance\"='fedexforum 11,731';" } ]
[ { "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: Which Record has a Score of l 97\u201399 (ot)?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"score\"='l 97\u201399 (ot)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"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: What is game 34's record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"=34;" } ]
[ { "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: What were the high assist on january 2?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"date\"='january 2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"language_s\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: Who was the director that had a film titled \"Floating Life\"?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='floating life';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Can you tell me the total number of Played that has the Position larger than 5, and the Points of 11, and the Drawn smaller than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"first_round\" WHERE \"position\">5 AND \"points\"=11 AND \"drawn\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: Can you tell me the highest Played that has the Points larger than 11, and the Lost larger than 7?" }, { "role": "assistant", "content": "SELECT MAX(\"played\") FROM \"first_round\" WHERE \"points\">11 AND \"lost\">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 \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was Dave Hill's score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='dave hill';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par of Al Mengert of the United States?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='united states' AND \"player\"='al mengert';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the score of T5 place in the United States?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='united states' AND \"place\"='t5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who was the player from the United States in T10 place with a score of 67-77=144?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"second_round\" WHERE \"country\"='united states' AND \"place\"='t10' AND \"score\"='67-77=144';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was Billy Casper's to par?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='billy casper';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_summary\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: What is the sum of Wins, when Played is less than 5?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"tournament_summary\" WHERE \"played\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_summary\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: What is the highest Wins, when Rank is greater than 2, and when Played is less than 5?" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"tournament_summary\" WHERE \"rank\">2 AND \"played\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_summary\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: What is the sum of Wins, when Team is Sweden, and when Played is less than 5?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"tournament_summary\" WHERE \"team\"='sweden' AND \"played\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_summary\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: What is the highest Points, when Played is greater than 5?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"tournament_summary\" WHERE \"played\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tournament_summary\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"ties\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: What is the average Ties, when Played is greater than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"ties\") FROM \"tournament_summary\" WHERE \"played\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_12\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Date, when Runner(s)-Up is Oliver Wilson?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"european_tour_wins_12\" WHERE \"runner_s_up\"='oliver wilson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_12\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Date, when Margin Of Victory is 4 Strokes?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"european_tour_wins_12\" WHERE \"margin_of_victory\"='4 strokes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_12\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Runner(s)-up, when Date is 21 Jan 2007?" }, { "role": "assistant", "content": "SELECT \"runner_s_up\" FROM \"european_tour_wins_12\" WHERE \"date\"='21 jan 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_tour_wins_12\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is Tournament, when Margin Of Victory is 1 Stroke, and when Date is 18 Jan 2009?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"european_tour_wins_12\" WHERE \"margin_of_victory\"='1 stroke' AND \"date\"='18 jan 2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statewide_tickets_on_which_spitzer_has_r\" (\n \"year\" real,\n \"party\" text,\n \"governor\" text,\n \"lieutenant_governor\" text,\n \"comptroller\" text,\n \"attorney_general\" text,\n \"u_s_senate\" text\n);\n\nQuestion: what is the U.S. senate when the year is after 2002 and the party is working families?" }, { "role": "assistant", "content": "SELECT \"u_s_senate\" FROM \"statewide_tickets_on_which_spitzer_has_r\" WHERE \"year\">2002 AND \"party\"='working families';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statewide_tickets_on_which_spitzer_has_r\" (\n \"year\" real,\n \"party\" text,\n \"governor\" text,\n \"lieutenant_governor\" text,\n \"comptroller\" text,\n \"attorney_general\" text,\n \"u_s_senate\" text\n);\n\nQuestion: How many times what the comptroller alan hevesi and the party working families?" }, { "role": "assistant", "content": "SELECT COUNT(\"year\") FROM \"statewide_tickets_on_which_spitzer_has_r\" WHERE \"comptroller\"='alan hevesi' AND \"party\"='working families';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" 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: What is the highest number of points of the game in Conseco fieldhouse 7,134?" }, { "role": "assistant", "content": "SELECT \"high_points\" FROM \"regular_season\" WHERE \"location_attendance\"='conseco fieldhouse 7,134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" 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: What is the highest number of rebounds of the game with a 6-14 record?" }, { "role": "assistant", "content": "SELECT \"high_rebounds\" FROM \"regular_season\" WHERE \"record\"='6-14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Can you tell me the Record that has the Points larger than 23, and the Attendance larger than 4,017, and the Date of january 18?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"points\">23 AND \"attendance\">'4,017' AND \"date\"='january 18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Can you tell me the Record that has the Visitor of pittsburgh, and the Points smaller than 27, and the Home of boston?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"visitor\"='pittsburgh' AND \"points\"<27 AND \"home\"='boston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Can you tell me the average Points that has the Attendance of 3,806?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"game_log\" WHERE \"attendance\"='3,806';" } ]
[ { "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: Which opponent had 38,642 attendance?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='38,642';" } ]
[ { "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 date had 51,265 attendance?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"attendance\"='51,265';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_cup_top_twenty_finishes\" (\n \"season\" real,\n \"date\" text,\n \"location\" text,\n \"race\" text,\n \"place\" text\n);\n\nQuestion: When 7th place, what is the date?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"world_cup_top_twenty_finishes\" WHERE \"place\"='7th';" } ]
[ { "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_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the score of game 34?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=34;" } ]
[ { "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_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the record of game 33?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"=33;" } ]
[ { "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: What is the Country, when Place is \"T4\", and when Player is \"Scott Simpson\"?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"first_round\" WHERE \"place\"='t4' AND \"player\"='scott simpson';" } ]
[ { "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: What is To Par, when Score is 70, and when Player is \"Craig Stadler\"?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"score\"=70 AND \"player\"='craig stadler';" } ]
[ { "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: What is Player, when Score is less than 69, and when Country is \"United States\"?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"first_round\" WHERE \"score\"<69 AND \"country\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"production\" (\n \"block\" real,\n \"episode_title\" text,\n \"director\" text,\n \"writer\" text,\n \"producer\" text,\n \"code\" text\n);\n\nQuestion: Who was the writer that the director was Alice Troughton and the producer was Phil Collinson?" }, { "role": "assistant", "content": "SELECT \"writer\" FROM \"production\" WHERE \"producer\"='phil collinson' AND \"director\"='alice troughton';" } ]
[ { "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: What is the location and attendance after game 2, and the team New Orleans?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"game\">2 AND \"team\"='new orleans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"season\" real,\n \"director\" text,\n \"teleplay\" text,\n \"first_broadcast\" text\n);\n\nQuestion: What is Teleplay, when Season is greater than 1.1, and when First Broadcast is \"February 20, 1981\"?" }, { "role": "assistant", "content": "SELECT \"teleplay\" FROM \"episodes\" WHERE \"season\">1.1 AND \"first_broadcast\"='february 20, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"season\" real,\n \"director\" text,\n \"teleplay\" text,\n \"first_broadcast\" text\n);\n\nQuestion: What is Title, when Season is less than 1.8, and when First Broadcast is March 6, 1981?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"episodes\" WHERE \"season\"<1.8 AND \"first_broadcast\"='march 6, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"season\" real,\n \"director\" text,\n \"teleplay\" text,\n \"first_broadcast\" text\n);\n\nQuestion: What is Director, when Season is 1.4?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"episodes\" WHERE \"season\"=1.4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"season\" real,\n \"director\" text,\n \"teleplay\" text,\n \"first_broadcast\" text\n);\n\nQuestion: What is Teleplay, when Director is \"George McCowan\", when Season is less than 1.1400000000000001, and when First Broadcast is April 3, 1981?" }, { "role": "assistant", "content": "SELECT \"teleplay\" FROM \"episodes\" WHERE \"director\"='george mccowan' AND \"season\"<1.1400000000000001 AND \"first_broadcast\"='april 3, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"season\" real,\n \"director\" text,\n \"teleplay\" text,\n \"first_broadcast\" text\n);\n\nQuestion: What is the average Season, when First Broadcast is January 23, 1981?" }, { "role": "assistant", "content": "SELECT AVG(\"season\") FROM \"episodes\" WHERE \"first_broadcast\"='january 23, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"title\" text,\n \"season\" real,\n \"director\" text,\n \"teleplay\" text,\n \"first_broadcast\" text\n);\n\nQuestion: What is Teleplay, when First Broadcast is April 10, 1981?" }, { "role": "assistant", "content": "SELECT \"teleplay\" FROM \"episodes\" WHERE \"first_broadcast\"='april 10, 1981';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What the H/A when the opponent is the Bohemians?" }, { "role": "assistant", "content": "SELECT \"h_a\" FROM \"pre_season_and_friendlies\" WHERE \"opponents\"='bohemians';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance when Cork City is the opponent?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"pre_season_and_friendlies\" WHERE \"opponents\"='cork city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the H/A when Cork City is the opponent?" }, { "role": "assistant", "content": "SELECT \"h_a\" FROM \"pre_season_and_friendlies\" WHERE \"opponents\"='cork city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the H/A on 5 August 1990?" }, { "role": "assistant", "content": "SELECT \"h_a\" FROM \"pre_season_and_friendlies\" WHERE \"date\"='5 august 1990';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_and_friendlies\" (\n \"date\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the result F-A on 5 August 1990?" }, { "role": "assistant", "content": "SELECT \"result_f_a\" FROM \"pre_season_and_friendlies\" WHERE \"date\"='5 august 1990';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cromemco_s_100_microcomputer_systems_z_8\" (\n \"system\" text,\n \"year_introduced\" real,\n \"s_100_slots\" real,\n \"internal_floppy_disk\" text,\n \"internal_hard_disk\" text\n);\n\nQuestion: What is the value for internal floppy disk with s-100 slots greater than 8 introduced earlier than 1978?" }, { "role": "assistant", "content": "SELECT \"internal_floppy_disk\" FROM \"cromemco_s_100_microcomputer_systems_z_8\" WHERE \"s_100_slots\">8 AND \"year_introduced\"<1978;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cromemco_s_100_microcomputer_systems_z_8\" (\n \"system\" text,\n \"year_introduced\" real,\n \"s_100_slots\" real,\n \"internal_floppy_disk\" text,\n \"internal_hard_disk\" text\n);\n\nQuestion: Which system introduced earlier than 1981 has an internal hard disk of 11 megabytes and less than 21 s-100 slots?" }, { "role": "assistant", "content": "SELECT \"system\" FROM \"cromemco_s_100_microcomputer_systems_z_8\" WHERE \"s_100_slots\"<21 AND \"year_introduced\"<1981 AND \"internal_hard_disk\"='11 megabytes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college did Marcus Wilson attend?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"player\"='marcus wilson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the player that attended Notre Dame with a pick smaller than 304?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"pick_num\"<304 AND \"college\"='notre dame';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What college did Leon Perry attend?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"nfl_draft\" WHERE \"player\"='leon perry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick_num\" real,\n \"nfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What NFL team did the Tight End position belong to?" }, { "role": "assistant", "content": "SELECT \"nfl_team\" FROM \"nfl_draft\" WHERE \"position\"='tight end';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the total number of weeks that the buffalo bills played against the San Diego Chargers?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"season_schedule\" WHERE \"opponent\"='san diego chargers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance of the game that had a date listed as Bye?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"season_schedule\" WHERE \"date\"='bye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: How many weeks were there games with 41,384 fans in attendance?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"season_schedule\" WHERE \"attendance\"='41,384';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the lowest week number that had a game on December 3, 1967?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"season_schedule\" WHERE \"date\"='december 3, 1967';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game that had 20,627 fans in attendance?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"season_schedule\" WHERE \"attendance\"='20,627';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Who is the rider with 22 laps and a +19.435 time/retired?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"moto_gp_classification\" WHERE \"laps\"='22' AND \"time_retired\"='+19.435';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What is the grid with a yamaha manufacturer and a +19.435 time/retired?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"moto_gp_classification\" WHERE \"manufacturer\"='yamaha' AND \"time_retired\"='+19.435';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What is the grid of rider shinya nakano?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"moto_gp_classification\" WHERE \"rider\"='shinya nakano';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Who is the rider with 22 laps and a +1:44.775 time/retired?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"moto_gp_classification\" WHERE \"laps\"='22' AND \"time_retired\"='+1:44.775';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What is the manufacturer with a 14 grid?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"grid\"='14';" } ]
[ { "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\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Who is the rider with a yamaha manufacturer and a 17 grid?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"moto_gp_classification\" WHERE \"manufacturer\"='yamaha' AND \"grid\"='17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"uefa_champions_league\" (\n \"date\" text,\n \"round\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the total of attendance at Venue h when Auxerre were playing?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"uefa_champions_league\" WHERE \"venue\"='h' AND \"opponent\"='auxerre';" } ]