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 \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What city is Jaffna Airport in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"destinations\" WHERE \"airport\"='jaffna airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which city has an ICAO of TBA?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"destinations\" WHERE \"icao\"='tba';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: Which player went to the College of Wyoming?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft\" WHERE \"college\"='wyoming';"
}
] |
[
{
"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: What was the smallest crowd at a game when Richmond was the away team?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_14\" 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_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: Who was the home team at the game that had a crowd of over 24,520?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_14\" WHERE \"crowd\">'24,520';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" real,\n \"goals\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Name the total number of since for belletti"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"since\") FROM \"squad_information\" WHERE \"name\"='belletti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"squad_information\" (\n \"nat\" text,\n \"name\" text,\n \"since\" real,\n \"goals\" real,\n \"transfer_fee\" text\n);\n\nQuestion: Name the highest goals for youth system and ita"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals\") FROM \"squad_information\" WHERE \"nat\"='ita' AND \"transfer_fee\"='youth system';"
}
] |
[
{
"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: What is the time/retired for eddie irvine with a grid of greater than 3?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\">3 AND \"driver\"='eddie irvine';"
}
] |
[
{
"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 laps had a grid of greater than 17 and retired due to collision?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"classification\" WHERE \"grid\">17 AND \"time_retired\"='collision';"
}
] |
[
{
"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 silvers for south korea with under 1 gold medal?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"silver\") FROM \"medal_table\" WHERE \"nation\"='south korea' AND \"gold\"<1;"
}
] |
[
{
"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 for uganda with under 3 total medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"nation\"='uganda' AND \"total\"<3;"
}
] |
[
{
"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 bronzes for nations ranked above 7, under 3 golds, and under 10 total medals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"bronze\") FROM \"medal_table\" WHERE \"rank\"<7 AND \"gold\"<3 AND \"total\"<10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which week has a result showing L 24-10?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"result\"='l 24-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which week has a Kickoff time of 1:00 with a record of 4-5-1?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"kickoff_a\"='1:00' AND \"record\"='4-5-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Which week has a record of 5-7-1?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"schedule\" WHERE \"record\"='5-7-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"kickoff_a\" text,\n \"game_site\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who is the opponent on the game that will be played at metropolitan stadium?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"game_site\"='metropolitan stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\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: Who was the home team at Victoria Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_18\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 did the away team score at Kardinia Park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_18\" 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 \"round_18\" (\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 away team's score in Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_18\" 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_11\" (\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 did the away team score 11.7 (73)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_11\" WHERE \"away_team_score\"='11.7 (73)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 home team scored 12.11 (83)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_11\" WHERE \"home_team_score\"='12.11 (83)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 did the away team score at Moorabbin Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_11\" WHERE \"venue\"='moorabbin oval';"
}
] |
[
{
"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: Who constructed the car that has a Time/Retired of engine, and over 50 laps?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"classification\" WHERE \"time_retired\"='engine' AND \"laps\">50;"
}
] |
[
{
"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: What is the time/retired for ronnie peterson with under 75 laps and a grid under 15?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"laps\"<75 AND \"grid\"<15 AND \"driver\"='ronnie peterson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2013_schedule\" (\n \"dates\" text,\n \"tournament\" text,\n \"location\" text,\n \"prize_fund_krw\" text,\n \"winner\" text,\n \"owgr_points\" real\n);\n\nQuestion: What is the location of the tournament with more than 6 OWGR points and Ryu Hyun-Woo as the winner?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"2013_schedule\" WHERE \"owgr_points\">6 AND \"winner\"='ryu hyun-woo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\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: Who was the away team at Arden Street Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_15\" WHERE \"venue\"='arden street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\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 Collingwood play their home game with an attendance of 14,962?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_15\" WHERE \"crowd\">'14,962' AND \"home_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_15\" (\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: How many people attended the game with an away team score of 10.8 (68)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_15\" WHERE \"away_team_score\"='10.8 (68)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"assists\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"assists\" real\n);\n\nQuestion: I want the team with assists greater than 118 and rank less than 2"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"assists\" WHERE \"assists\">118 AND \"rank\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_easternmost_high_summits_of_the_rock\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"region\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: What region has a 5 rank?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"the_easternmost_high_summits_of_the_rock\" WHERE \"rank\"=5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_easternmost_high_summits_of_the_rock\" (\n \"rank\" real,\n \"mountain_peak\" text,\n \"region\" text,\n \"mountain_range\" text,\n \"location\" text\n);\n\nQuestion: Which mountain peak has spanish peaks?"
},
{
"role": "assistant",
"content": "SELECT \"mountain_peak\" FROM \"the_easternmost_high_summits_of_the_rock\" WHERE \"mountain_range\"='spanish peaks';"
}
] |
[
{
"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: Who was the home team at Junction Oval when attendance was over 16,000?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_17\" WHERE \"crowd\">'16,000' AND \"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_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 date did Essendon play as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_17\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"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 the attendance at Windy Hill?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_17\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 smallest crowd of vfl park?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_20\" WHERE \"venue\"='vfl park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 away team score at kardinia park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_20\" 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 \"round_20\" (\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: Who was the away team at the home game of north melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_20\" WHERE \"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 \"round_20\" (\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 average crowd size at a home game that had a score of 14.15 (99)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_20\" WHERE \"home_team_score\"='14.15 (99)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"course_detail\" (\n \"hole\" text,\n \"yards_red_tees\" real,\n \"par_red_tees\" real,\n \"yards_white_tees\" real,\n \"par_white_tees\" real\n);\n\nQuestion: What is the average number of yards on a red tee that has a hole of 1 and a par above 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"yards_red_tees\") FROM \"course_detail\" WHERE \"hole\"='1' AND \"par_white_tees\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" real\n);\n\nQuestion: How many bronzes did netherlands win?"
},
{
"role": "assistant",
"content": "SELECT \"bronze\" FROM \"medal_count\" WHERE \"nation\"='netherlands';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" real\n);\n\nQuestion: What is the nation for 6 total?"
},
{
"role": "assistant",
"content": "SELECT \"nation\" FROM \"medal_count\" WHERE \"total\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" real\n);\n\nQuestion: What is the bronze when silver is 4 and gold is 1 and the total is more than 2"
},
{
"role": "assistant",
"content": "SELECT \"bronze\" FROM \"medal_count\" WHERE \"total\">2 AND \"gold\"='1' AND \"silver\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"nation\" text,\n \"gold\" text,\n \"silver\" text,\n \"bronze\" text,\n \"total\" real\n);\n\nQuestion: Tell me the gold for netherlands"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medal_count\" WHERE \"nation\"='netherlands';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 Away team score has a Home team of richmond?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_20\" WHERE \"home_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 a Home team score of 17.16 (118)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_20\" WHERE \"home_team_score\"='17.16 (118)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 score of 13.12 (90)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_20\" WHERE \"away_team_score\"='13.12 (90)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_20\" (\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 Home team score has an Away team of carlton?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_20\" 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 \"season_7_1998_1999\" (\n \"no_in_series\" real,\n \"no_in_season\" real,\n \"title\" text,\n \"director\" text,\n \"writer_s\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: What is the total series numbers that is directed by Jefferson Kibbee and has a production code of 2398191?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"no_in_series\") FROM \"season_7_1998_1999\" WHERE \"director\"='jefferson kibbee' AND \"production_code\"='2398191';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"viewing_figures\" (\n \"episode\" text,\n \"1st_edition\" text,\n \"2nd_edition\" text,\n \"3rd_edition\" text,\n \"4th_edition\" text\n);\n\nQuestion: What is the 1st Edition for the Episode 4?"
},
{
"role": "assistant",
"content": "SELECT \"1st_edition\" FROM \"viewing_figures\" WHERE \"episode\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"viewing_figures\" (\n \"episode\" text,\n \"1st_edition\" text,\n \"2nd_edition\" text,\n \"3rd_edition\" text,\n \"4th_edition\" text\n);\n\nQuestion: What is the 1st Edition for Episode 11?"
},
{
"role": "assistant",
"content": "SELECT \"1st_edition\" FROM \"viewing_figures\" WHERE \"episode\"='11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"viewing_figures\" (\n \"episode\" text,\n \"1st_edition\" text,\n \"2nd_edition\" text,\n \"3rd_edition\" text,\n \"4th_edition\" text\n);\n\nQuestion: What is the 3rd Edition for Episode 4?"
},
{
"role": "assistant",
"content": "SELECT \"3rd_edition\" FROM \"viewing_figures\" WHERE \"episode\"='4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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 home teams had crowds larger than 4,000?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"crowd\">'4,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 to know the date for western oval venue"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_5\" WHERE \"venue\"='western oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"3901_4000\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: What is the declination with a right ascension of 11h53m41.9s?"
},
{
"role": "assistant",
"content": "SELECT \"declination_j2000\" FROM \"3901_4000\" WHERE \"right_ascension_j2000\"='11h53m41.9s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_knockout_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 1st leg when team 1 is Chelsea?"
},
{
"role": "assistant",
"content": "SELECT \"1st_leg\" FROM \"first_knockout_round\" WHERE \"team_1\"='chelsea';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the name of the home team, when the score for home team was 10.17 (77)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"home_team_score\"='10.17 (77)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the away team score, when the away team was Fitzroy?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_13\" 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_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the name of the home team when the away team was Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"away_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the name of the home team that has a venue called EMCG?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_13\" WHERE \"venue\"='emcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What is the name of the venue where the game played had an away team of Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_13\" WHERE \"away_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura_opening_tournament\" (\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"diff\" real\n);\n\nQuestion: What is the average number lost with a difference of -16, 19 points, and more than 24 against?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lost\") FROM \"torneo_apertura_opening_tournament\" WHERE \"diff\">-16 AND \"points\"=19 AND \"against\">24;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura_opening_tournament\" (\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"diff\" real\n);\n\nQuestion: What is the highest number of losses with 25 points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"torneo_apertura_opening_tournament\" WHERE \"points\"=25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura_opening_tournament\" (\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"diff\" real\n);\n\nQuestion: What is the sum of the difference for 9 draws and over 18 played?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"diff\") FROM \"torneo_apertura_opening_tournament\" WHERE \"drawn\"=9 AND \"played\">18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura_opening_tournament\" (\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"diff\" real\n);\n\nQuestion: What is the lowest number drawn with less than 2 lost?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"torneo_apertura_opening_tournament\" WHERE \"lost\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_apertura_opening_tournament\" (\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"diff\" real\n);\n\nQuestion: What is the sum of all points when number played is less than 18?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points\") FROM \"torneo_apertura_opening_tournament\" WHERE \"played\"<18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_21_13_8\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which date has a Score of 6\u20134, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"doubles_21_13_8\" WHERE \"score\"='6\u20134, 6\u20133';"
}
] |
[
{
"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: What is the total PI GP that a Reg GP has larger than 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"reg_gp\">3;"
}
] |
[
{
"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: What average Reg GP has a pick # larger than 210?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"reg_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pick_num\">210;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which result has a Goal of deacon 2/5?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2004_fixtures_and_results\" WHERE \"goals\"='deacon 2/5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which date has a Goal of deacon 4/4, withers 1 dg?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2004_fixtures_and_results\" WHERE \"goals\"='deacon 4/4, withers 1 dg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: What are the goals for 8/4/04?"
},
{
"role": "assistant",
"content": "SELECT \"goals\" FROM \"2004_fixtures_and_results\" WHERE \"date\"='8/4/04';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which venue has a Result of w, and a Goal of deacon 5/5?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"2004_fixtures_and_results\" WHERE \"result\"='w' AND \"goals\"='deacon 5/5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which result has a Goal of deacon 3/5, bridge 2/2?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"2004_fixtures_and_results\" WHERE \"goals\"='deacon 3/5, bridge 2/2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_fixtures_and_results\" (\n \"date\" text,\n \"competition\" text,\n \"venue\" text,\n \"result\" text,\n \"score\" text,\n \"goals\" text\n);\n\nQuestion: Which competition has a Goal of deacon 10/10, and a Score of 40\u201312?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"2004_fixtures_and_results\" WHERE \"goals\"='deacon 10/10' AND \"score\"='40\u201312';"
}
] |
[
{
"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: What is the total number of playoff games played by the Seattle Thunderbirds team where the number of regular games played is less than 5 and pick number is less than 131?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"pl_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"reg_gp\"<5 AND \"team_league\"='seattle thunderbirds' AND \"pick_num\"<131;"
}
] |
[
{
"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: What player has a number of playoff games played greater than 0?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pl_gp\">0;"
}
] |
[
{
"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: What is the sum of the number of regular games played by Morgan Clark with the number of road games less than 7?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"reg_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='morgan clark' AND \"rd_num\"<7;"
}
] |
[
{
"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: What player has a number of playoff games played greater than 0?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pl_gp\">0;"
}
] |
[
{
"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: What is the pick number for the player from higher than round 3 and a PI GP bigger than 0?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"rd_num\">3 AND \"pl_gp\">0;"
}
] |
[
{
"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: What is the lowest regular GP Larry Courville, who has a PI GP smaller than 0, has?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"reg_gp\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"player\"='larry courville' AND \"pl_gp\"<0;"
}
] |
[
{
"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 Essendon's opponents away score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_17\" WHERE \"home_team\"='essendon';"
}
] |
[
{
"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 the attendance at Corio Oval?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"round_17\" WHERE \"venue\"='corio oval';"
}
] |
[
{
"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 scored 6.7 (43), what was the away teams score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"home_team_score\"='6.7 (43)';"
}
] |
[
{
"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 collingwood played as the away team what did they score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_12\" 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_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: What was the away team playing when the home team scored 16.18 (114)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_12\" WHERE \"home_team_score\"='16.18 (114)';"
}
] |
[
{
"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 was it at when 10.14 (74) was the home teams score?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_12\" WHERE \"home_team_score\"='10.14 (74)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hardtack_ii_tests\" (\n \"name\" text,\n \"location\" text,\n \"elevation_height\" text,\n \"delivery\" text,\n \"purpose\" text,\n \"yield\" text\n);\n\nQuestion: What was the locaction of the Evans test blast?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"hardtack_ii_tests\" WHERE \"name\"='evans';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hardtack_ii_tests\" (\n \"name\" text,\n \"location\" text,\n \"elevation_height\" text,\n \"delivery\" text,\n \"purpose\" text,\n \"yield\" text\n);\n\nQuestion: What was the yield for a blast that was in nts area 3s?"
},
{
"role": "assistant",
"content": "SELECT \"yield\" FROM \"hardtack_ii_tests\" WHERE \"location\"='nts area 3s';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hardtack_ii_tests\" (\n \"name\" text,\n \"location\" text,\n \"elevation_height\" text,\n \"delivery\" text,\n \"purpose\" text,\n \"yield\" text\n);\n\nQuestion: What was the purpose of the Quay test blast?"
},
{
"role": "assistant",
"content": "SELECT \"purpose\" FROM \"hardtack_ii_tests\" WHERE \"name\"='quay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"3601_3700\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: For an apparent magnitude greater than 11.8 what Right ascension value is assigned?"
},
{
"role": "assistant",
"content": "SELECT \"right_ascension_j2000\" FROM \"3601_3700\" WHERE \"apparent_magnitude\">11.8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"3601_3700\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: What is the least apparent magnitude for all constellations from hydra?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"apparent_magnitude\") FROM \"3601_3700\" WHERE \"constellation\"='hydra';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"running_backs\" (\n \"player\" text,\n \"car\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: What is the highest Car with more than 155 yards?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"car\") FROM \"running_backs\" WHERE \"yards\">155;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_longest_novels\" (\n \"book_title\" text,\n \"author\" text,\n \"edition_publisher\" text,\n \"page_count\" text,\n \"page_size\" text,\n \"language\" text\n);\n\nQuestion: How many pages were in the book by Stefano D'Arrigo?"
},
{
"role": "assistant",
"content": "SELECT \"page_count\" FROM \"list_of_longest_novels\" WHERE \"author\"='stefano d''arrigo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_longest_novels\" (\n \"book_title\" text,\n \"author\" text,\n \"edition_publisher\" text,\n \"page_count\" text,\n \"page_size\" text,\n \"language\" text\n);\n\nQuestion: Which author wrote Sironia, Texas in English?"
},
{
"role": "assistant",
"content": "SELECT \"author\" FROM \"list_of_longest_novels\" WHERE \"language\"='english' AND \"book_title\"='sironia, texas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_longest_novels\" (\n \"book_title\" text,\n \"author\" text,\n \"edition_publisher\" text,\n \"page_count\" text,\n \"page_size\" text,\n \"language\" text\n);\n\nQuestion: Who is the edition/publisher for Xavier Herbert?"
},
{
"role": "assistant",
"content": "SELECT \"edition_publisher\" FROM \"list_of_longest_novels\" WHERE \"author\"='xavier herbert';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_longest_novels\" (\n \"book_title\" text,\n \"author\" text,\n \"edition_publisher\" text,\n \"page_count\" text,\n \"page_size\" text,\n \"language\" text\n);\n\nQuestion: What language is the book Miss Macintosh, My Darling in?"
},
{
"role": "assistant",
"content": "SELECT \"language\" FROM \"list_of_longest_novels\" WHERE \"book_title\"='miss macintosh, my darling';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_longest_novels\" (\n \"book_title\" text,\n \"author\" text,\n \"edition_publisher\" text,\n \"page_count\" text,\n \"page_size\" text,\n \"language\" text\n);\n\nQuestion: Who published in Italian with a page size of 8 inches (20cm) x 5.4 inches (14cm)?"
},
{
"role": "assistant",
"content": "SELECT \"edition_publisher\" FROM \"list_of_longest_novels\" WHERE \"language\"='italian' AND \"page_size\"='8 inches (20cm) x 5.4 inches (14cm)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real,\n \"long\" real\n);\n\nQuestion: What is the total average for long 10?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"avg\") FROM \"wide_receivers\" WHERE \"long\"=10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_picks\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: Name the college that has 7 rounds and boston celtics team"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"other_picks\" WHERE \"team\"='boston celtics' AND \"round\"='7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_picks\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: Name the position that has baltimore bullets and college of texas tech"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"other_picks\" WHERE \"team\"='baltimore bullets' AND \"college\"='texas tech';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.