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 \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Round is the highest one that has a Position of running back?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"position\"='running back';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Position has a Pick smaller than 29, and a School/Club Team of arizona?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"pick\"<29 AND \"school_club_team\"='arizona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which Round is the lowest one that has a School/Club Team of alabama, and a Pick larger than 43?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"nfl_draft\" WHERE \"school_club_team\"='alabama' AND \"pick\">43;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2001\" text\n);\n\nQuestion: what is the venue of belshina"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"teams_and_venues\" WHERE \"team\"='belshina';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2001\" text\n);\n\nQuestion: what is the venue of neman"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"teams_and_venues\" WHERE \"team\"='neman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_venues\" (\n \"team\" text,\n \"location\" text,\n \"venue\" text,\n \"capacity\" real,\n \"position_in_2001\" text\n);\n\nQuestion: what is the venue of neman"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"teams_and_venues\" WHERE \"team\"='neman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Name the total number of pick with round less than 6 and overall of 102"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"round\"<6 AND \"overall\"=102;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Outcome has a Score of 4\u20136 3\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_5_2_3\" WHERE \"score\"='4\u20136 3\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Tournament has a Score of 3\u20136 6\u20134 4\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_5_2_3\" WHERE \"score\"='3\u20136 6\u20134 4\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Date has a Score of 6\u20131 7\u20136 (8\u20136)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_5_2_3\" WHERE \"score\"='6\u20131 7\u20136 (8\u20136)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Score has a Date of 26 september 2004?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_5_2_3\" WHERE \"date\"='26 september 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Outcome has a Score of 3\u20136 2\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_5_2_3\" WHERE \"score\"='3\u20136 2\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has an Opponent in the final of daniella dominikovic?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_5_2_3\" WHERE \"opponent_in_the_final\"='daniella dominikovic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance\" (\n \"m_v_ft_s\" real,\n \"shell_lb\" real,\n \"time_to_ft_m_at_25_seconds\" text,\n \"time_to_ft_m_at_40_seconds\" real,\n \"time_to_ft_m_at_55_seconds\" real,\n \"max_height_ft\" real\n);\n\nQuestion: What is the amount of time (sum) at 40\u00b0 that it takes a 16 lb shell to reach a maximum of no more than 22,000 ft?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"time_to_ft_m_at_40_seconds\") FROM \"performance\" WHERE \"shell_lb\"=16 AND \"max_height_ft\"<'22,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance\" (\n \"m_v_ft_s\" real,\n \"shell_lb\" real,\n \"time_to_ft_m_at_25_seconds\" text,\n \"time_to_ft_m_at_40_seconds\" real,\n \"time_to_ft_m_at_55_seconds\" real,\n \"max_height_ft\" real\n);\n\nQuestion: What is the average maximum height of a shell that travels for more than 16.3 seconds at 55\u00b0 and has a maximum velocity of 2200 ft/s?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"max_height_ft\") FROM \"performance\" WHERE \"time_to_ft_m_at_55_seconds\">16.3 AND \"m_v_ft_s\"=2200;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance\" (\n \"m_v_ft_s\" real,\n \"shell_lb\" real,\n \"time_to_ft_m_at_25_seconds\" text,\n \"time_to_ft_m_at_40_seconds\" real,\n \"time_to_ft_m_at_55_seconds\" real,\n \"max_height_ft\" real\n);\n\nQuestion: What is the maximum amount of time a shell travels at 55\u00b0 when it traveled less than 9.6 seconds at 40\u00b0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"time_to_ft_m_at_55_seconds\") FROM \"performance\" WHERE \"time_to_ft_m_at_40_seconds\"<9.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance\" (\n \"m_v_ft_s\" real,\n \"shell_lb\" real,\n \"time_to_ft_m_at_25_seconds\" text,\n \"time_to_ft_m_at_40_seconds\" real,\n \"time_to_ft_m_at_55_seconds\" real,\n \"max_height_ft\" real\n);\n\nQuestion: What is the weight of the shell that reached its maximum height at 40\u00b0 in 12.6 seconds?"
},
{
"role": "assistant",
"content": "SELECT \"shell_lb\" FROM \"performance\" WHERE \"time_to_ft_m_at_40_seconds\"=12.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"performance\" (\n \"m_v_ft_s\" real,\n \"shell_lb\" real,\n \"time_to_ft_m_at_25_seconds\" text,\n \"time_to_ft_m_at_40_seconds\" real,\n \"time_to_ft_m_at_55_seconds\" real,\n \"max_height_ft\" real\n);\n\nQuestion: What is the average maximum height of the shell smaller than 12.5 lb that reached its maximum height at 25\u00b0 in 10.1 seconds?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"max_height_ft\") FROM \"performance\" WHERE \"time_to_ft_m_at_25_seconds\"='10.1' AND \"shell_lb\"<12.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 highest attendance for the game that was before week 6 on October 22, 1967?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"date\"='october 22, 1967' AND \"week\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"state\" text,\n \"name\" text,\n \"hometown\" text,\n \"age_1\" real,\n \"talent\" text\n);\n\nQuestion: What is the state having a contestant with a talent of classical piano and a hometown from Lancaster, NY?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"delegates\" WHERE \"talent\"='classical piano' AND \"hometown\"='lancaster, ny';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"state\" text,\n \"name\" text,\n \"hometown\" text,\n \"age_1\" real,\n \"talent\" text\n);\n\nQuestion: Whose talent was ballet en pointe?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"delegates\" WHERE \"talent\"='ballet en pointe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"state\" text,\n \"name\" text,\n \"hometown\" text,\n \"age_1\" real,\n \"talent\" text\n);\n\nQuestion: What is the state represented by the contestant from Mesa, AZ?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"delegates\" WHERE \"hometown\"='mesa, az';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"state\" text,\n \"name\" text,\n \"hometown\" text,\n \"age_1\" real,\n \"talent\" text\n);\n\nQuestion: What is the talent of the contestant from Lexington, SC?"
},
{
"role": "assistant",
"content": "SELECT \"talent\" FROM \"delegates\" WHERE \"hometown\"='lexington, sc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"state\" text,\n \"name\" text,\n \"hometown\" text,\n \"age_1\" real,\n \"talent\" text\n);\n\nQuestion: What is the age of the contestant from Reno, NV?"
},
{
"role": "assistant",
"content": "SELECT \"age_1\" FROM \"delegates\" WHERE \"hometown\"='reno, nv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_18_1954\" (\n \"episode\" text,\n \"title\" text,\n \"writer_s\" text,\n \"preservation\" text,\n \"original_airdate\" text\n);\n\nQuestion: Which writer wrote episode 18-09 (652)?"
},
{
"role": "assistant",
"content": "SELECT \"writer_s\" FROM \"season_18_1954\" WHERE \"episode\"='18-09 (652)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_18_1954\" (\n \"episode\" text,\n \"title\" text,\n \"writer_s\" text,\n \"preservation\" text,\n \"original_airdate\" text\n);\n\nQuestion: What episode was written by jonathan lewis?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"season_18_1954\" WHERE \"writer_s\"='jonathan lewis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What position does Maryland have a player for Round 3?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"school_club_team\"='maryland' AND \"round\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: How many picks are there for defensive back for rounds larger than 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"position\"='defensive back' AND \"round\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: What is the highest game that has april 21 as the date?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"playoffs\" WHERE \"date\"='april 21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: What score has a game less than 4, and april 19 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"game\"<4 AND \"date\"='april 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: What opponent has a game less than 6, and april 17 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"playoffs\" WHERE \"game\"<6 AND \"date\"='april 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the home team that played Derby County as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fifth_round\" WHERE \"away_team\"='derby county';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fifth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: Which home team is ranked no. 7 by tie no.?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"fifth_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 \"fifth_round\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the score for the game in which Manchester United was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fifth_round\" WHERE \"home_team\"='manchester united';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many golds does the nation having a rank of 8, fewer than 5 bronzes and more than 1 silver have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"bronze\"<5 AND \"silver\">1 AND \"rank\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"award_winners\" (\n \"year\" real,\n \"name\" text,\n \"country\" text,\n \"language_s\" text,\n \"literary_tradition\" text\n);\n\nQuestion: What nation was the film from that was in english and had a Literary tradition of canadian literature?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"award_winners\" WHERE \"language_s\"='english' AND \"literary_tradition\"='canadian literature';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"award_winners\" (\n \"year\" real,\n \"name\" text,\n \"country\" text,\n \"language_s\" text,\n \"literary_tradition\" text\n);\n\nQuestion: What is the literary traidtion for the film in english in 2011?"
},
{
"role": "assistant",
"content": "SELECT \"literary_tradition\" FROM \"award_winners\" WHERE \"language_s\"='english' AND \"year\"=2011;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"award_winners\" (\n \"year\" real,\n \"name\" text,\n \"country\" text,\n \"language_s\" text,\n \"literary_tradition\" text\n);\n\nQuestion: What country was the film made in that was made after 2011?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"award_winners\" WHERE \"year\">2011;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: Which team has 48 rebounds?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"rebounds\" WHERE \"rebounds\"=48;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: What's the lowest amount of 12 games and less than 48 rebounds?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"rebounds\" WHERE \"games\"=12 AND \"rebounds\"<48;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: How many rebounds does Fedor likholitov have with a rank greater than 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rebounds\") FROM \"rebounds\" WHERE \"name\"='fedor likholitov' AND \"rank\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: Which game has more than 112 rebounds and a rank greater than 3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"games\") FROM \"rebounds\" WHERE \"rank\">3 AND \"rebounds\"=112;"
}
] |
[
{
"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 \"nation\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What was the score in a place of t5 in the United States?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"place\"='t5' AND \"nation\"='united states';"
}
] |
[
{
"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 \"nation\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the to par that has more than $122,591 in Sweden and had Annika S\u00f6renstam play?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"money\">'122,591' AND \"nation\"='sweden' AND \"player\"='annika s\u00f6renstam';"
}
] |
[
{
"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 \"nation\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What was the score for a match where Sophie Gustafson played?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"player\"='sophie gustafson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"rebounds\" real\n);\n\nQuestion: with games more than 22 what is the rebound total?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rebounds\") FROM \"rebounds\" WHERE \"games\">22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What is the location of the b.c. open?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"tournament_results\" WHERE \"tournament\"='b.c. open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What is the location of the tallahassee open, with a Score of 269 (\u201319)?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"tournament_results\" WHERE \"score\"='269 (\u201319)' AND \"tournament\"='tallahassee open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What date did Lanny Wadkins (6) win?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"tournament_results\" WHERE \"winner\"='lanny wadkins (6)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" text\n);\n\nQuestion: What is the Location for the buick-goodwrench open?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"tournament_results\" WHERE \"tournament\"='buick-goodwrench open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_6_2005_2006\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: What is the Netflix episode that has a series episode of 6-02?"
},
{
"role": "assistant",
"content": "SELECT \"netflix\" FROM \"season_6_2005_2006\" WHERE \"series_ep\"='6-02';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_6_2005_2006\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which segment A item that has a Segment D of wigs?"
},
{
"role": "assistant",
"content": "SELECT \"segment_a\" FROM \"season_6_2005_2006\" WHERE \"segment_d\"='wigs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_6_2005_2006\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which series episode has a Netflix episode of S03E16?"
},
{
"role": "assistant",
"content": "SELECT \"series_ep\" FROM \"season_6_2005_2006\" WHERE \"netflix\"='s03e16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_6_2005_2006\" (\n \"series_ep\" text,\n \"episode\" real,\n \"netflix\" text,\n \"segment_a\" text,\n \"segment_b\" text,\n \"segment_c\" text,\n \"segment_d\" text\n);\n\nQuestion: Which Netflix episode has an overall episode number under 69 and a Segment D of S Trombone?"
},
{
"role": "assistant",
"content": "SELECT \"netflix\" FROM \"season_6_2005_2006\" WHERE \"episode\"<69 AND \"segment_d\"='s trombone';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inter_molecular_interactions_micro_rna_u\" (\n \"name\" text,\n \"species_specific\" text,\n \"intra_molecular_structure\" text,\n \"comparative\" text,\n \"link\" text\n);\n\nQuestion: Which Species Specific has a Comparative of no, and an Intra-molecular structure of no, and a Link of sourcecode?"
},
{
"role": "assistant",
"content": "SELECT \"species_specific\" FROM \"inter_molecular_interactions_micro_rna_u\" WHERE \"comparative\"='no' AND \"intra_molecular_structure\"='no' AND \"link\"='sourcecode';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inter_molecular_interactions_micro_rna_u\" (\n \"name\" text,\n \"species_specific\" text,\n \"intra_molecular_structure\" text,\n \"comparative\" text,\n \"link\" text\n);\n\nQuestion: Which Intra-molecular structure has a Comparative of no, and a Name of mitarget?"
},
{
"role": "assistant",
"content": "SELECT \"intra_molecular_structure\" FROM \"inter_molecular_interactions_micro_rna_u\" WHERE \"comparative\"='no' AND \"name\"='mitarget';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inter_molecular_interactions_micro_rna_u\" (\n \"name\" text,\n \"species_specific\" text,\n \"intra_molecular_structure\" text,\n \"comparative\" text,\n \"link\" text\n);\n\nQuestion: Which Comparative has a Name of pictar?"
},
{
"role": "assistant",
"content": "SELECT \"comparative\" FROM \"inter_molecular_interactions_micro_rna_u\" WHERE \"name\"='pictar';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inter_molecular_interactions_micro_rna_u\" (\n \"name\" text,\n \"species_specific\" text,\n \"intra_molecular_structure\" text,\n \"comparative\" text,\n \"link\" text\n);\n\nQuestion: Which Name has an Intra-molecular structure of no, and a Link of webserver, and a Comparative of no?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"inter_molecular_interactions_micro_rna_u\" WHERE \"intra_molecular_structure\"='no' AND \"link\"='webserver' AND \"comparative\"='no';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inter_molecular_interactions_micro_rna_u\" (\n \"name\" text,\n \"species_specific\" text,\n \"intra_molecular_structure\" text,\n \"comparative\" text,\n \"link\" text\n);\n\nQuestion: Which Comparative has a Link of sourcecode webserver?"
},
{
"role": "assistant",
"content": "SELECT \"comparative\" FROM \"inter_molecular_interactions_micro_rna_u\" WHERE \"link\"='sourcecode webserver';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inter_molecular_interactions_micro_rna_u\" (\n \"name\" text,\n \"species_specific\" text,\n \"intra_molecular_structure\" text,\n \"comparative\" text,\n \"link\" text\n);\n\nQuestion: Which Species Specific has a Link of server/sourcecode?"
},
{
"role": "assistant",
"content": "SELECT \"species_specific\" FROM \"inter_molecular_interactions_micro_rna_u\" WHERE \"link\"='server/sourcecode';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: What is the 1st leg for Instituto?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"losers_knockout\" WHERE \"home_2nd_leg\"='instituto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: What Aggregate has a 2-1 1st leg, and is from Belgrano?"
},
{
"role": "assistant",
"content": "SELECT \"aggregate\" FROM \"losers_knockout\" WHERE \"1st_leg\"='2-1' AND \"home_1st_leg\"='belgrano';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: What Aggregate has a 0-0 1st leg, and a 0-1 second leg?"
},
{
"role": "assistant",
"content": "SELECT \"aggregate\" FROM \"losers_knockout\" WHERE \"1st_leg\"='0-0' AND \"2nd_leg\"='0-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: What aggregate has a 0-0 1st leg, and is from Instituto?"
},
{
"role": "assistant",
"content": "SELECT \"aggregate\" FROM \"losers_knockout\" WHERE \"1st_leg\"='0-0' AND \"home_2nd_leg\"='instituto';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"losers_knockout\" (\n \"home_1st_leg\" text,\n \"home_2nd_leg\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text,\n \"aggregate\" text\n);\n\nQuestion: What is the home of aggregate's 3-4?"
},
{
"role": "assistant",
"content": "SELECT \"home_2nd_leg\" FROM \"losers_knockout\" WHERE \"aggregate\"='3-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What round did the fight against Sofia Bagherdai go to?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='sofia bagherdai';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the method of fight completion for the Mars: Attack 1 event?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='mars: attack 1';"
}
] |
[
{
"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: what had a score of 70-71-68-72=281?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"score\"='70-71-68-72=281';"
}
] |
[
{
"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: what had a score like roberto devicenzo"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"player\"='roberto devicenzo';"
}
] |
[
{
"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 total number who attended during week 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"week\"=11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the total number of weeks with a result of l 31-21?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"result\"='l 31-21';"
}
] |
[
{
"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 average week of a game attended by 12,985 with a result of W 38-14?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"attendance\">'12,985' AND \"result\"='w 38-14';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_men_s_doubles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: Which 2003 has a 2012 of 1\u20134?"
},
{
"role": "assistant",
"content": "SELECT \"2003\" FROM \"grand_slam_men_s_doubles_performance_tim\" WHERE \"2012\"='1\u20134';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_men_s_doubles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: Which 2007 has a 2008 of 0 / 4?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"grand_slam_men_s_doubles_performance_tim\" WHERE \"2008\"='0 / 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_men_s_doubles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: Which 2007 has a 2003 of 2r, and a 2004 of 1r?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"grand_slam_men_s_doubles_performance_tim\" WHERE \"2003\"='2r' AND \"2004\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_men_s_doubles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: Which 2010 has a 2009 of 0 / 4?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"grand_slam_men_s_doubles_performance_tim\" WHERE \"2009\"='0 / 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_men_s_doubles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: Which 2011 has a 1999 of A, and a 2004 of 2r, and a Career SR of 0 / 10?"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"grand_slam_men_s_doubles_performance_tim\" WHERE \"1999\"='a' AND \"2004\"='2r' AND \"career_sr\"='0 / 10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_men_s_doubles_performance_tim\" (\n \"tournament\" text,\n \"1998\" text,\n \"1999\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: Which 2005 has a 1999 of 0\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"grand_slam_men_s_doubles_performance_tim\" WHERE \"1999\"='0\u20130';"
}
] |
[
{
"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 \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: what is the date of week 7"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visitor in the game that led to a 39-20-6 record?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"march\" WHERE \"record\"='39-20-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game that led to a 48-21-6 record?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"march\" WHERE \"record\"='48-21-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Name the average attendance from june 11"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"playoffs\" WHERE \"date\"='june 11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_and_honorees\" (\n \"year\" real,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"margin_of_victory\" text,\n \"winner_s_share\" real\n);\n\nQuestion: What is south africa's margin of victory?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"winners_and_honorees\" WHERE \"country\"='south africa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_and_honorees\" (\n \"year\" real,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"margin_of_victory\" text,\n \"winner_s_share\" real\n);\n\nQuestion: Which Score has a Year larger than 1980, and a Margin of victory of 2 strokes, and a Country of united states, and a Player of jim furyk?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"winners_and_honorees\" WHERE \"year\">1980 AND \"margin_of_victory\"='2 strokes' AND \"country\"='united states' AND \"player\"='jim furyk';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_and_honorees\" (\n \"year\" real,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"margin_of_victory\" text,\n \"winner_s_share\" real\n);\n\nQuestion: Which average Winner's share ($) has a Score of 281 (\u22127), and a Player of hale irwin, and a Year smaller than 1983?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"winner_s_share\") FROM \"winners_and_honorees\" WHERE \"score\"='281 (\u22127)' AND \"player\"='hale irwin' AND \"year\"<1983;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" real,\n \"champion\" text,\n \"second\" text,\n \"third\" text,\n \"team_champion\" text\n);\n\nQuestion: What was the highest season with Barwa International Campos Team as champion?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season\") FROM \"champions\" WHERE \"team_champion\"='barwa international campos team';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" real,\n \"champion\" text,\n \"second\" text,\n \"third\" text,\n \"team_champion\" text\n);\n\nQuestion: Who was third in Barwa International Campos Team?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"champions\" WHERE \"team_champion\"='barwa international campos team';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"founded\" real,\n \"homeground\" text,\n \"suburb\" text,\n \"seniors\" text,\n \"juniors\" text\n);\n\nQuestion: What year was the Beaudesert suburb club founded"
},
{
"role": "assistant",
"content": "SELECT \"founded\" FROM \"clubs\" WHERE \"suburb\"='beaudesert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"founded\" real,\n \"homeground\" text,\n \"suburb\" text,\n \"seniors\" text,\n \"juniors\" text\n);\n\nQuestion: What year did the Nerang Suburb get founded?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"founded\") FROM \"clubs\" WHERE \"suburb\"='nerang';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the opponent when the Phillies played on April 28?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='april 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_team_totals_in_tests\" (\n \"rank\" real,\n \"score\" text,\n \"overs\" real,\n \"run_rate\" real,\n \"innings\" real,\n \"date\" text,\n \"test_no\" real,\n \"report\" text\n);\n\nQuestion: What is the run rate for rank 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"run_rate\") FROM \"highest_team_totals_in_tests\" WHERE \"rank\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"albumnum\" text,\n \"english_title\" text,\n \"chinese_title\" text,\n \"released\" text,\n \"label\" text\n);\n\nQuestion: Chinese title of \u53cd\u6b63 \u5353\u6587\u8431 had what released?"
},
{
"role": "assistant",
"content": "SELECT \"released\" FROM \"studio_albums\" WHERE \"chinese_title\"='\u53cd\u6b63 \u5353\u6587\u8431';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"albumnum\" text,\n \"english_title\" text,\n \"chinese_title\" text,\n \"released\" text,\n \"label\" text\n);\n\nQuestion: Album # of 5th is what chinese title?"
},
{
"role": "assistant",
"content": "SELECT \"chinese_title\" FROM \"studio_albums\" WHERE \"albumnum\"='5th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"albumnum\" text,\n \"english_title\" text,\n \"chinese_title\" text,\n \"released\" text,\n \"label\" text\n);\n\nQuestion: Album # of 1st was released on what date?"
},
{
"role": "assistant",
"content": "SELECT \"released\" FROM \"studio_albums\" WHERE \"albumnum\"='1st';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"albumnum\" text,\n \"english_title\" text,\n \"chinese_title\" text,\n \"released\" text,\n \"label\" text\n);\n\nQuestion: Album # of 3rd is what chinese title?"
},
{
"role": "assistant",
"content": "SELECT \"chinese_title\" FROM \"studio_albums\" WHERE \"albumnum\"='3rd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"albumnum\" text,\n \"english_title\" text,\n \"chinese_title\" text,\n \"released\" text,\n \"label\" text\n);\n\nQuestion: English title of oxygenie of happiness has what release date?"
},
{
"role": "assistant",
"content": "SELECT \"released\" FROM \"studio_albums\" WHERE \"english_title\"='oxygenie of happiness';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trades\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Which Score has a Home of quebec nordiques on april 16?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"trades\" WHERE \"home\"='quebec nordiques' AND \"date\"='april 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trades\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: WHich Record has a Visitor of quebec nordiques with a Score of 7\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"trades\" WHERE \"visitor\"='quebec nordiques' AND \"score\"='7\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trades\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who is the Visitor on april 8?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"trades\" WHERE \"date\"='april 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"trades\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: When has Score of 4\u20135 and quebec nordiques as Visitor?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"trades\" WHERE \"score\"='4\u20135' AND \"visitor\"='quebec nordiques';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.