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 \"players_who_made_their_debut_for_the_gee\" (\n \"debut_year\" real,\n \"player\" text,\n \"date_of_birth\" text,\n \"games\" real,\n \"goals\" real,\n \"years_at_club\" text\n);\n\nQuestion: How many games for keith j. miller, who debuted after 1974 with less than 1 goal?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"games\") FROM \"players_who_made_their_debut_for_the_gee\" WHERE \"goals\"<1 AND \"player\"='keith j. miller' AND \"debut_year\">1974;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the highest crowd when carlton is the away team?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_9\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the highest crowd at mcg?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_9\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many grids are associated with a Time/Retired of +1.837?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"classification\" WHERE \"time_retired\"='+1.837';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the hometown of the player that attends UCLA?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"2011_boys_team\" WHERE \"college\"='ucla';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What college is getting a player that attends Wichita Heights High School?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"2011_boys_team\" WHERE \"school\"='wichita heights high school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the hometown of Cody Zeller?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"2011_boys_team\" WHERE \"player\"='cody zeller';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What player's hometown is Washington, IN?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2011_boys_team\" WHERE \"hometown\"='washington, in';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"community_council\" (\n \"parties_and_voter_communities\" text,\n \"pct_2006\" real,\n \"seats_2006\" real,\n \"pct_2001\" real,\n \"seats_2001\" real\n);\n\nQuestion: What is the %2006 that has fewer seats than 23 in Seats 2001, more seats than 4 in 2006 Seats, and a % in 2001 of 25.4?"
},
{
"role": "assistant",
"content": "SELECT \"pct_2006\" FROM \"community_council\" WHERE \"seats_2001\"<23 AND \"seats_2006\">4 AND \"pct_2001\"=25.4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"community_council\" (\n \"parties_and_voter_communities\" text,\n \"pct_2006\" real,\n \"seats_2006\" real,\n \"pct_2001\" real,\n \"seats_2001\" real\n);\n\nQuestion: When the %2001 is more than 61.4, and the %2006 fewer than 54.1, how many Seats in 2001 were there?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"seats_2001\") FROM \"community_council\" WHERE \"pct_2001\">61.4 AND \"pct_2006\"<54.1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"community_council\" (\n \"parties_and_voter_communities\" text,\n \"pct_2006\" real,\n \"seats_2006\" real,\n \"pct_2001\" real,\n \"seats_2001\" real\n);\n\nQuestion: What is the highest number of Seats 2006 held by the Christian Democratic Union of Germany Party/Voter Community, with a %2006 higher than 24.6?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"seats_2006\") FROM \"community_council\" WHERE \"parties_and_voter_communities\"='christian democratic union of germany' AND \"pct_2006\">24.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"community_council\" (\n \"parties_and_voter_communities\" text,\n \"pct_2006\" real,\n \"seats_2006\" real,\n \"pct_2001\" real,\n \"seats_2001\" real\n);\n\nQuestion: What is the highest number of Seats 2006 held by the communities of B\u00fcrger F\u00fcr Gro\u00df-Rohrheim Party/Voter Community, with a %2006 less than 21.3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"seats_2006\") FROM \"community_council\" WHERE \"parties_and_voter_communities\"='b\u00fcrger f\u00fcr gro\u00df-rohrheim' AND \"pct_2006\"<21.3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"community_council\" (\n \"parties_and_voter_communities\" text,\n \"pct_2006\" real,\n \"seats_2006\" real,\n \"pct_2001\" real,\n \"seats_2001\" real\n);\n\nQuestion: What is the %2006 when the %2001 was more than 62.5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pct_2006\") FROM \"community_council\" WHERE \"pct_2001\">62.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: What is the sum of the losses by the Montreal Hockey Club, who have more than 15 Goals Against?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"losses\") FROM \"final_standing\" WHERE \"team\"='montreal hockey club' AND \"goals_against\">15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: What is the largest Goals For by a team that has more than 0 ties?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_for\") FROM \"final_standing\" WHERE \"ties\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: How many ties do teams with 25 Goals For and more than 5 wins have?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"ties\") FROM \"final_standing\" WHERE \"goals_for\"=25 AND \"wins\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: What is the lowest Goals Against by a team with more than 5 wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_against\") FROM \"final_standing\" WHERE \"wins\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: What is the total number of ties a team with less than 3 losses have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"ties\") FROM \"final_standing\" WHERE \"losses\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_races_review\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the race name where stirling moss won on 16 april"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"non_championship_races_review\" WHERE \"winning_driver\"='stirling moss' AND \"date\"='16 april';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_races_review\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the report for circuit of modena"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"non_championship_races_review\" WHERE \"circuit\"='modena';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_races_review\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Tell me the race name for ferrari on 25 april"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"non_championship_races_review\" WHERE \"constructor\"='ferrari' AND \"date\"='25 april';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_races_review\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Name the constructor for vii kanonloppet"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"non_championship_races_review\" WHERE \"race_name\"='vii kanonloppet';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"r\" (\n \"player\" text,\n \"pos\" text,\n \"from\" real,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: How many players from bethel?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"from\") FROM \"r\" WHERE \"school_country\"='bethel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: I want the date for crowd larger than 12,425 for north melbourne"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_14\" WHERE \"crowd\">'12,425' AND \"home_team\"='north melbourne';"
}
] |
[
{
"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);\n\nQuestion: Who is the opponent on May 7?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='may 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the Home team was Carlton, what was the Away team score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_2\" WHERE \"home_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Who was the constructor for a FW20 chassis?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='fw20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"drivers_and_constructors\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What engine did David Coulthard have in his mp4-13 chassis?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"drivers_and_constructors\" WHERE \"chassis\"='mp4-13' AND \"driver\"='david coulthard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_titles_3_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which date has an Outcome of runner-up, and an Opponent in the final of gilles simon?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_5_2_titles_3_runners_up\" WHERE \"outcome\"='runner-up' AND \"opponent_in_the_final\"='gilles simon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_titles_3_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who was the opponent on the 28 july 2013 final?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_5_2_titles_3_runners_up\" WHERE \"date\"='28 july 2013';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_2_titles_3_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which date has a Score in the final of 4\u20136, 3\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_5_2_titles_3_runners_up\" WHERE \"score_in_the_final\"='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 \"groups_containing_sulfur\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text\n);\n\nQuestion: What is the prefix for the formula of Rsor'?"
},
{
"role": "assistant",
"content": "SELECT \"prefix\" FROM \"groups_containing_sulfur\" WHERE \"formula\"='rsor''';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_sulfur\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text\n);\n\nQuestion: Which group has the RNCS formula?"
},
{
"role": "assistant",
"content": "SELECT \"group\" FROM \"groups_containing_sulfur\" WHERE \"formula\"='rncs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_sulfur\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text\n);\n\nQuestion: Which formula has a thial as a chemical class?"
},
{
"role": "assistant",
"content": "SELECT \"formula\" FROM \"groups_containing_sulfur\" WHERE \"chemical_class\"='thial';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_sulfur\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text\n);\n\nQuestion: Which suffix has the prefix of isothiocyanato- (-ncs)?"
},
{
"role": "assistant",
"content": "SELECT \"suffix\" FROM \"groups_containing_sulfur\" WHERE \"prefix\"='isothiocyanato- (-ncs)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_sulfur\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text\n);\n\nQuestion: Which item has the suffix containing thiocyanato- (-scn) as a prefix?"
},
{
"role": "assistant",
"content": "SELECT \"suffix\" FROM \"groups_containing_sulfur\" WHERE \"prefix\"='thiocyanato- (-scn)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_containing_sulfur\" (\n \"chemical_class\" text,\n \"group\" text,\n \"formula\" text,\n \"prefix\" text,\n \"suffix\" text\n);\n\nQuestion: Which formula has thial as a chemical class?"
},
{
"role": "assistant",
"content": "SELECT \"formula\" FROM \"groups_containing_sulfur\" WHERE \"chemical_class\"='thial';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: If fitzroy is the Away team, what Date did they play?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_12\" WHERE \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: When the Away team is fitzroy on the Date of 15 july 1967, what was the Home team playing?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_12\" WHERE \"date\"='15 july 1967' AND \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Venue has an Away team of st kilda?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_12\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: If the Away team scored 5.22 (52) on the Date of 15 july 1967, what was the Away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_12\" WHERE \"date\"='15 july 1967' AND \"away_team_score\"='5.22 (52)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: If the Home team had a score of 3.15 (33), what was the Date of the game played?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_12\" WHERE \"home_team_score\"='3.15 (33)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"festival_da_can_o_1999_8_march_1999\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: What place has a draw smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"place\") FROM \"festival_da_can_o_1999_8_march_1999\" WHERE \"draw\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"satellites\" (\n \"name\" text,\n \"cospar_id_satcat\" text,\n \"launch_date_utc\" text,\n \"launch_vehicle\" text,\n \"launch_site\" text,\n \"launch_designation\" text,\n \"longitude\" text\n);\n\nQuestion: What is the launch date of the satellite with a COSPAR ID of 1995-022a?"
},
{
"role": "assistant",
"content": "SELECT \"launch_date_utc\" FROM \"satellites\" WHERE \"cospar_id_satcat\"='1995-022a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"satellites\" (\n \"name\" text,\n \"cospar_id_satcat\" text,\n \"launch_date_utc\" text,\n \"launch_vehicle\" text,\n \"launch_site\" text,\n \"launch_designation\" text,\n \"longitude\" text\n);\n\nQuestion: What is the COSPAR ID of the satellite with a titan iv(401)a launch vehicle?"
},
{
"role": "assistant",
"content": "SELECT \"cospar_id_satcat\" FROM \"satellites\" WHERE \"launch_vehicle\"='titan iv(401)a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"satellites\" (\n \"name\" text,\n \"cospar_id_satcat\" text,\n \"launch_date_utc\" text,\n \"launch_vehicle\" text,\n \"launch_site\" text,\n \"launch_designation\" text,\n \"longitude\" text\n);\n\nQuestion: What is the launch designation of the satellite with a 2009-001a COSPAR ID?"
},
{
"role": "assistant",
"content": "SELECT \"launch_designation\" FROM \"satellites\" WHERE \"cospar_id_satcat\"='2009-001a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"satellites\" (\n \"name\" text,\n \"cospar_id_satcat\" text,\n \"launch_date_utc\" text,\n \"launch_vehicle\" text,\n \"launch_site\" text,\n \"launch_designation\" text,\n \"longitude\" text\n);\n\nQuestion: What is the launch site of the satellite with a 2003-041a COSPAR ID?"
},
{
"role": "assistant",
"content": "SELECT \"launch_site\" FROM \"satellites\" WHERE \"cospar_id_satcat\"='2003-041a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What construction has a CERCLIS ID of ard092916188?"
},
{
"role": "assistant",
"content": "SELECT \"construction_completed\" FROM \"superfund_sites\" WHERE \"cerclis_id\"='ard092916188';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What CERCLIS ID is Deleted of 04/07/2008?"
},
{
"role": "assistant",
"content": "SELECT \"cerclis_id\" FROM \"superfund_sites\" WHERE \"deleted\"='04/07/2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What construction has a Listed 09/08/1983, and a Deleted of \u2013, and a Name of mid-south wood products?"
},
{
"role": "assistant",
"content": "SELECT \"construction_completed\" FROM \"superfund_sites\" WHERE \"listed\"='09/08/1983' AND \"deleted\"='\u2013' AND \"name\"='mid-south wood products';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superfund_sites\" (\n \"cerclis_id\" text,\n \"name\" text,\n \"county\" text,\n \"proposed\" text,\n \"listed\" text,\n \"construction_completed\" text,\n \"partially_deleted\" text,\n \"deleted\" text\n);\n\nQuestion: What is the Construction that has a Listed 09/08/1983, and a Name of cecil lindsey?"
},
{
"role": "assistant",
"content": "SELECT \"construction_completed\" FROM \"superfund_sites\" WHERE \"listed\"='09/08/1983' AND \"name\"='cecil lindsey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the attendance at Kardinia Park?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_1\" WHERE \"venue\"='kardinia park';"
}
] |
[
{
"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 \"time_et\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"match_report\" text\n);\n\nQuestion: What was the Date of Week 16?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=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 \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What date was Colorado the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"home\"='colorado';"
}
] |
[
{
"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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record for the game on November 28 when the decision was Backstrom?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"decision\"='backstrom' AND \"date\"='november 28';"
}
] |
[
{
"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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What team was the home team when the record was 11\u20138\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"record\"='11\u20138\u20132';"
}
] |
[
{
"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 \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when Edmonton was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"home\"='edmonton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: Tell me the highest PI GP with pick # greater than 159 and reg GP more than 0"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pick_num\">159 AND \"reg_gp\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In the match where the home team scored 9.13 (67) what was the crowd attendance?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_7\" WHERE \"home_team_score\"='9.13 (67)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In the match where south melbourne was the away team, who was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_7\" WHERE \"away_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_7\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the date of the match where the home team scored 14.13 (97)"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_7\" WHERE \"home_team_score\"='14.13 (97)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_qualifying_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which Team 2 faced Team 1 from Barcelona?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"third_qualifying_round\" WHERE \"team_1\"='barcelona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_qualifying_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: Which first leg had Galatasaray as Team 1?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"third_qualifying_round\" WHERE \"team_1\"='galatasaray';"
}
] |
[
{
"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 name of the Event with a time of 2:19?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='2:19';"
}
] |
[
{
"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: Where was match which had Joe Lauzon as an opponent?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='joe lauzon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"city\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" real,\n \"years_as_tallest\" text\n);\n\nQuestion: What is the name of the building that was the tallest from 1990\u20131997 in Frankfurt?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"timeline_of_tallest_buildings\" WHERE \"city\"='frankfurt' AND \"years_as_tallest\"='1990\u20131997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"city\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" real,\n \"years_as_tallest\" text\n);\n\nQuestion: For a height less than 122 meters, what is the greatest height in feet?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"height_ft\") FROM \"timeline_of_tallest_buildings\" WHERE \"height_m\"<122;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"city\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" real,\n \"years_as_tallest\" text\n);\n\nQuestion: How high was the highest building in feet in the city of cologne?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"height_ft\") FROM \"timeline_of_tallest_buildings\" WHERE \"city\"='cologne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"city\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" real,\n \"years_as_tallest\" text\n);\n\nQuestion: What is the smallest height (ft) of a building in Frankfurt with a height (m) of 257 and less than 55 floors?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"height_ft\") FROM \"timeline_of_tallest_buildings\" WHERE \"city\"='frankfurt' AND \"height_m\"=257 AND \"floors\"<55;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"city\" text,\n \"height_m\" real,\n \"height_ft\" real,\n \"floors\" real,\n \"years_as_tallest\" text\n);\n\nQuestion: What is the height in meters for a building in Frankfurt that is 850 feet tall?"
},
{
"role": "assistant",
"content": "SELECT \"height_m\" FROM \"timeline_of_tallest_buildings\" WHERE \"city\"='frankfurt' AND \"height_ft\"=850;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nhl_coins\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" text,\n \"issue_price\" real,\n \"special_notes\" text\n);\n\nQuestion: What is the mintage of the coin with a Toronto Maple Leafs theme and an issue price below 24.95?"
},
{
"role": "assistant",
"content": "SELECT \"mintage\" FROM \"nhl_coins\" WHERE \"theme\"='toronto maple leafs' AND \"issue_price\"<24.95;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was Collingwood's score in their away game?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_17\" WHERE \"away_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_17\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where did Geelong play as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_17\" WHERE \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"east_german_championship\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: On what date was the I Dessau Autobahnspinne race?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"east_german_championship\" WHERE \"race_name\"='i dessau autobahnspinne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"east_german_championship\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who was the winning driver in the Sachsenring circuit?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"east_german_championship\" WHERE \"circuit\"='sachsenring';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1986_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Where is Terry Mills from?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"1986_boys_team\" WHERE \"player\"='terry mills';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: When is the Mexican grand prix?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"race\"='mexican grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: The person with a Height of 6-8 went to which School?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2011_boys_team\" WHERE \"height\"='6-8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What College did Player Dorian Finney-Smith play for?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"2011_boys_team\" WHERE \"player\"='dorian finney-smith';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which Player has a height of 6-10, and went to College at LSU?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2011_boys_team\" WHERE \"height\"='6-10' AND \"college\"='lsu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which School did Player Tyrone Johnson attend?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2011_boys_team\" WHERE \"player\"='tyrone johnson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: Which School did Player Tyrone Johnson attend?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2011_boys_team\" WHERE \"player\"='tyrone johnson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ultra_lightweight_manx_grand_prix_revise\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: Who had the time of 1:23.32.41?"
},
{
"role": "assistant",
"content": "SELECT \"rider\" FROM \"ultra_lightweight_manx_grand_prix_revise\" WHERE \"time\"='1:23.32.41';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ultra_lightweight_manx_grand_prix_revise\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the time of the rider who has a rank smaller than 8 and speed of 104.567mph?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"ultra_lightweight_manx_grand_prix_revise\" WHERE \"rank\"<8 AND \"speed\"='104.567mph';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team at the Junction Oval venue?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_21\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the date where the away team is Richmond?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_21\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the largest crowd where the home team scored 17.13 (115)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_21\" WHERE \"home_team_score\"='17.13 (115)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What day did the away team score 10.16 (76)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_21\" WHERE \"away_team_score\"='10.16 (76)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Name the circuit when the fastest lap was john surtees and the winning driver was john surtees."
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"season_review\" WHERE \"fastest_lap\"='john surtees' AND \"winning_driver\"='john surtees';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Name the winning driver with circuit of monza"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"season_review\" WHERE \"circuit\"='monza';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Name the pole position for 8 september"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"season_review\" WHERE \"date\"='8 september';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Name the winning driver for belgian grand prix"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"season_review\" WHERE \"race\"='belgian grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Name the circuit for italian grand prix"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"season_review\" WHERE \"race\"='italian grand prix';"
}
] |
[
{
"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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many grid numbers were there for the driver Giancarlo Fisichella?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"driver\"='giancarlo fisichella';"
}
] |
[
{
"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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the mean number of laps for the constructor Ferrari when the time/retired was fuel pressure?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"constructor\"='ferrari' AND \"time_retired\"='fuel pressure';"
}
] |
[
{
"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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid when the driver was Michael Schumacher?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"race\" WHERE \"driver\"='michael schumacher';"
}
] |
[
{
"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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps had a grid number of 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"race\" WHERE \"grid\"=7;"
}
] |
[
{
"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 \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which lap number had a grid number of less than 17 when the driver was Giancarlo Fisichella?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"grid\"<17 AND \"driver\"='giancarlo fisichella';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Name the winning driver for circuit of monza"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"championship_review\" WHERE \"circuit\"='monza';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: Tell me the date for jody scheckter being the fastest lap at the french grand prix"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"championship_review\" WHERE \"fastest_lap\"='jody scheckter' AND \"race\"='french grand prix';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.