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 \"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 South Melbourne's away team opponents?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_17\" WHERE \"home_team\"='south melbourne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the leading scorer on November 2, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"november\" WHERE \"date\"='november 2, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the attendance when the Hawks played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"november\" WHERE \"home\"='hawks';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many bronzes are there for the total nation with 112 silver and a total of 72?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"total\">72 AND \"nation\"='total' AND \"silver\"<112;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the highest bronze for San Marino with less than 82 total and less than 3 golds?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"bronze\") FROM \"medal_table\" WHERE \"total\"<82 AND \"nation\"='san marino' AND \"gold\"<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 \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many golds were there when there was more than 11 bronze and 29 in total?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"bronze\">11 AND \"total\"=29;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was Montenegro's average bronze with less than 7 silver and more than 4 golds?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"silver\"<7 AND \"nation\"='montenegro' AND \"gold\">4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many golds were there for Iceland with more than 15 silver?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"silver\">15 AND \"nation\"='iceland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was Andorra's total with less than 10 silver and more than 5 bronze?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"medal_table\" WHERE \"silver\"<10 AND \"nation\"='andorra' AND \"bronze\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"whangarei\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" text\n);\n\nQuestion: What is the roll number of Poroti school, which has a 6 decile?"
},
{
"role": "assistant",
"content": "SELECT \"roll\" FROM \"whangarei\" WHERE \"decile\"='6' AND \"name\"='poroti school';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"whangarei\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" text\n);\n\nQuestion: What is the roll number of the school with a state authority in Waiotira?"
},
{
"role": "assistant",
"content": "SELECT \"roll\" FROM \"whangarei\" WHERE \"authority\"='state' AND \"area\"='waiotira';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"whangarei\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" text\n);\n\nQuestion: What is the area of the school with a decile of 2 and a roll number 222?"
},
{
"role": "assistant",
"content": "SELECT \"area\" FROM \"whangarei\" WHERE \"decile\"='2' AND \"roll\"='222';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"whangarei\" (\n \"name\" text,\n \"years\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" text,\n \"roll\" text\n);\n\nQuestion: WHat is the decile of the school in Purua?"
},
{
"role": "assistant",
"content": "SELECT \"decile\" FROM \"whangarei\" WHERE \"area\"='purua';"
}
]
|
[
{
"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: what is the away team score when the home team is essendon?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_5\" 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_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: what is the venue when the crowd is more than 11,131 and the home team is essendon?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_5\" WHERE \"crowd\">'11,131' AND \"home_team\"='essendon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_fbs_football_win_loss_re\" (\n \"lost\" real,\n \"tied\" real,\n \"pct\" real,\n \"years\" real,\n \"total_games\" real\n);\n\nQuestion: How many total ties had less than 1183 total games, 121 years, and more than 541 losses?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tied\") FROM \"ncaa_division_i_fbs_football_win_loss_re\" WHERE \"total_games\"<1183 AND \"years\"=121 AND \"lost\">541;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_fbs_football_win_loss_re\" (\n \"lost\" real,\n \"tied\" real,\n \"pct\" real,\n \"years\" real,\n \"total_games\" real\n);\n\nQuestion: How many losses had more than 122 years and more than 1244 total games?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"lost\") FROM \"ncaa_division_i_fbs_football_win_loss_re\" WHERE \"years\">122 AND \"total_games\">1244;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What is the lowest earnings for a player with over 24 wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"earnings\") FROM \"leaders\" WHERE \"wins\">24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: Who has the most wins from new zealand with over $1,910,413?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"leaders\" WHERE \"country\"='new zealand' AND \"earnings\">'1,910,413';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"grid\" real,\n \"driver\" text,\n \"constructor\" text,\n \"qual\" real,\n \"rank\" real,\n \"laps\" real,\n \"time_retired\" text\n);\n\nQuestion: Which constructor has Chuck Weyant as a driver, 45 laps, and a qual of less than 142.29?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"classification\" WHERE \"laps\"=45 AND \"qual\"<142.29 AND \"driver\"='chuck weyant';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"grid\" real,\n \"driver\" text,\n \"constructor\" text,\n \"qual\" real,\n \"rank\" real,\n \"laps\" real,\n \"time_retired\" text\n);\n\nQuestion: Which time/retired has a qual of 144.02?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"qual\"=144.02;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Which rounds did Vic Elford with a Ford cosworth dfv 3.0 v8 engine have?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"driver\"='vic elford' AND \"engine\"='ford cosworth dfv 3.0 v8';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: What is the chassis for Bruce Mclaren with all rounds and a g tyre?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"teams_and_drivers\" WHERE \"rounds\"='all' AND \"tyre\"='g' AND \"driver\"='bruce mclaren';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"nationality\" text,\n \"nhl_team\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the NHL team that has a team (League) of Mississauga Icedogs (ohl)?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='mississauga icedogs (ohl)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"round\" text,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"crowd\" real,\n \"stadium\" text,\n \"match_details\" text\n);\n\nQuestion: Im the match where the home team is Melbourne Victory, what was the crowd attendance?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"fixtures\" WHERE \"home_team\"='melbourne victory';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"round\" text,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"crowd\" real,\n \"stadium\" text,\n \"match_details\" text\n);\n\nQuestion: What was the score of the match that took place in the playoff round?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fixtures\" WHERE \"round\"='playoff';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"round\" text,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"crowd\" real,\n \"stadium\" text,\n \"match_details\" text\n);\n\nQuestion: In the match where newcastle jets was the away team, what was the crown attendance?"
},
{
"role": "assistant",
"content": "SELECT \"crowd\" FROM \"fixtures\" WHERE \"away_team\"='newcastle jets';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"venue\" text,\n \"attendance\" text\n);\n\nQuestion: What team was the opponent on 1990-10-21?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='1990-10-21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"placed\" text,\n \"event\" text\n);\n\nQuestion: What was the competition earlier than 1987?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"achievements\" WHERE \"year\"<1987;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"placed\" text,\n \"event\" text\n);\n\nQuestion: What event placed bronze earlier than 1987?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"achievements\" WHERE \"placed\"='bronze' AND \"year\"<1987;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_12_9_titles_3_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What was the score for the match on November 13, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_12_9_titles_3_runners_up\" WHERE \"date\"='november 13, 2005';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_12_9_titles_3_runners_up\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What tournament took place on July 17, 2005, with a clay surface?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_12_9_titles_3_runners_up\" WHERE \"surface\"='clay' AND \"date\"='july 17, 2005';"
}
]
|
[
{
"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 highest Grid with over 72 laps?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"race\" WHERE \"laps\">72;"
}
]
|
[
{
"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 average number of laps associated with a Time/Retired of +1:14.801?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"time_retired\"='+1:14.801';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What date is the circuit at wanneroo park?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"race_calendar\" WHERE \"circuit\"='wanneroo park';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_calendar\" (\n \"race_title\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner\" text,\n \"team\" text\n);\n\nQuestion: What team has a title of calder?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"race_calendar\" WHERE \"race_title\"='calder';"
}
]
|
[
{
"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: Tell me the Laps for time/retired of +1:08.491"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"race\" WHERE \"time_retired\"='+1:08.491';"
}
]
|
[
{
"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: Tell me the highest laps for toyota and grid of 13"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race\" WHERE \"constructor\"='toyota' AND \"grid\"=13;"
}
]
|
[
{
"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: I want the Driver with Laps of 20"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\"=20;"
}
]
|
[
{
"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: Tell me the sum of Grid for giancarlo fisichella"
},
{
"role": "assistant",
"content": "SELECT SUM(\"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 \"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: What date was the venue at VFL park?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_16\" 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_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: What was the crowd attendance when the home team was Melbourne?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_16\" WHERE \"home_team\"='melbourne';"
}
]
|
[
{
"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: What was the crowd attendance when the home team scored 13.17 (95)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_16\" WHERE \"home_team_score\"='13.17 (95)';"
}
]
|
[
{
"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: What was the away team's score when the home team scored 15.16 (106)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_16\" WHERE \"home_team_score\"='15.16 (106)';"
}
]
|
[
{
"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: What was the away team when the venue was Lake Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"venue\"='lake oval';"
}
]
|
[
{
"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: What was the away team when the home team was Carlton?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"home_team\"='carlton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"pick\" real,\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What player is picked 302 in round 11?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"round\"=11 AND \"pick\"=302;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_results\" (\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"purse\" real,\n \"winner\" text,\n \"score\" text,\n \"1st_prize\" real\n);\n\nQuestion: What is the biggest purse with a 1st prize of $26,000?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"purse\") FROM \"tournament_results\" WHERE \"1st_prize\"='26,000';"
}
]
|
[
{
"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 did Jackie Oliver do?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"classification\" WHERE \"driver\"='jackie oliver';"
}
]
|
[
{
"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 with a grid larger than 7 did a Lotus - Ford do with a Time/Retired of + 2 laps?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"classification\" WHERE \"grid\">7 AND \"constructor\"='lotus - ford' AND \"time_retired\"='+ 2 laps';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"5401_5500\" (\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 name of the constellation that has a NGC number smaller tha 5457?"
},
{
"role": "assistant",
"content": "SELECT \"constellation\" FROM \"5401_5500\" WHERE \"ngc_number\"<5457;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"5401_5500\" (\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 Apparent magnitude of a Declination (J2000) of \u00b039\u203245\u2033?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"apparent_magnitude\") FROM \"5401_5500\" WHERE \"declination_j2000\"='\u00b039\u203245\u2033';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"specifications_for_different_r_985_wasp_\" (\n \"engine\" text,\n \"power_continuous\" text,\n \"power_takeoff\" text,\n \"compression_ratio\" text,\n \"supercharger_gear_ratio\" text,\n \"octane_rating\" text,\n \"dry_weight\" text\n);\n\nQuestion: Which supercharger gear ratio has a Octane rating of 68?"
},
{
"role": "assistant",
"content": "SELECT \"supercharger_gear_ratio\" FROM \"specifications_for_different_r_985_wasp_\" WHERE \"octane_rating\"='68';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_by_conference\" (\n \"conference\" text,\n \"num_of_bids\" real,\n \"record\" text,\n \"win_pct\" text,\n \"round_of_32\" text,\n \"sweet_sixteen\" text,\n \"elite_eight\" text,\n \"final_four\" text,\n \"championship_game\" text\n);\n\nQuestion: What is the elite eight result for the big west?"
},
{
"role": "assistant",
"content": "SELECT \"elite_eight\" FROM \"record_by_conference\" WHERE \"conference\"='big west';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"candidate\" text,\n \"party\" text,\n \"votes_num\" real,\n \"votes_pct\" text,\n \"ballots_pct\" text,\n \"elected\" text,\n \"appointed\" text\n);\n\nQuestion: What is the vote percentage when the number is more than 241,306 appointed on July 10, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"votes_pct\" FROM \"results\" WHERE \"votes_num\">'241,306' AND \"appointed\"='july 10, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"candidate\" text,\n \"party\" text,\n \"votes_num\" real,\n \"votes_pct\" text,\n \"ballots_pct\" text,\n \"elected\" text,\n \"appointed\" text\n);\n\nQuestion: What is the vote % for Cliff Breitkreuz?"
},
{
"role": "assistant",
"content": "SELECT \"votes_pct\" FROM \"results\" WHERE \"candidate\"='cliff breitkreuz';"
}
]
|
[
{
"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 time/retired for damon hill?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"driver\"='damon hill';"
}
]
|
[
{
"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: Who constructed olivier panis' car that retired after +1 lap?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"time_retired\"='+1 lap' AND \"driver\"='olivier panis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is the high assists of Hamilton (24)?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"playoffs\" WHERE \"high_points\"='hamilton (24)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What series had a high points of Prince (23)?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"playoffs\" WHERE \"high_points\"='prince (23)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"awards\" text,\n \"year\" real,\n \"category\" text,\n \"result\" text,\n \"production\" text,\n \"roll\" text\n);\n\nQuestion: What category of the British Soap Awards resulted in nominated?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"television\" WHERE \"awards\"='british soap awards' AND \"result\"='nominated';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"television\" (\n \"awards\" text,\n \"year\" real,\n \"category\" text,\n \"result\" text,\n \"production\" text,\n \"roll\" text\n);\n\nQuestion: What category was nominated in 2010 fo the British Soap Awards?"
},
{
"role": "assistant",
"content": "SELECT \"category\" FROM \"television\" WHERE \"year\"=2010 AND \"result\"='nominated' AND \"awards\"='british soap awards';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text\n);\n\nQuestion: Which country is Dyer from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"in\" WHERE \"name\"='dyer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"in\" (\n \"name\" text,\n \"country\" text,\n \"type\" text,\n \"moving_from\" text,\n \"transfer_window\" text\n);\n\nQuestion: What country is the athlete moving from Everton from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"in\" WHERE \"moving_from\"='everton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the tournament for 2009 2r"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"grand_slam_doubles_performance_timeline\" WHERE \"2009\"='2r';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2011 for 2009 being 2r at wimbledon"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"grand_slam_doubles_performance_timeline\" WHERE \"2009\"='2r' AND \"tournament\"='wimbledon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2012 for 2009 of 1r"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"grand_slam_doubles_performance_timeline\" WHERE \"2009\"='1r';"
}
]
|
[
{
"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: Who was the away team when the home team was South Melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"home_team\"='south melbourne';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"pos\" text,\n \"from\" text,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What is the high assist total for players from 2010 and under 76 rebounds?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"asts\") FROM \"p\" WHERE \"from\"='2010' AND \"rebs\"<76;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the total swimsuit number with gowns larger than 9.48 with interviews larger than 8.94 in florida?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"swimsuit\") FROM \"scores\" WHERE \"evening_gown\">9.48 AND \"country\"='florida' AND \"interview\">8.94;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"scores\" (\n \"country\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the total average for swimsuits smaller than 9.62 in Colorado?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"average\") FROM \"scores\" WHERE \"swimsuit\"<9.62 AND \"country\"='colorado';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was the bronze medal count of the team that finished with 47 total medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"bronze\") FROM \"medal_count\" WHERE \"total\"=47;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_count\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the silver medal count of the team that finished with 8 bronze medals?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"silver\") FROM \"medal_count\" WHERE \"bronze\"=8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"athlete\" text,\n \"country\" text,\n \"from\" real,\n \"gold\" real,\n \"silver\" real,\n \"total\" real,\n \"status\" text\n);\n\nQuestion: What is the status of ren\u00e9 hoppe?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"individual\" WHERE \"athlete\"='ren\u00e9 hoppe';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"athlete\" text,\n \"country\" text,\n \"from\" real,\n \"gold\" real,\n \"silver\" real,\n \"total\" real,\n \"status\" text\n);\n\nQuestion: How many times does Switzerland have under 7 golds and less than 3 silvers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"individual\" WHERE \"country\"='switzerland' AND \"gold\"<7 AND \"silver\"<3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"athlete\" text,\n \"country\" text,\n \"from\" real,\n \"gold\" real,\n \"silver\" real,\n \"total\" real,\n \"status\" text\n);\n\nQuestion: What athlete has less than 7 gold and 14 total medals?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"individual\" WHERE \"gold\"<7 AND \"total\"=14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\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 average crowd size for the home team hawthorn?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_19\" WHERE \"home_team\"='hawthorn';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\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 the away team score 8.13 (61)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_19\" WHERE \"away_team_score\"='8.13 (61)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\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 home team score 9.13 (67)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_19\" 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: Where does St Kilda play?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_7\" WHERE \"home_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_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: Who was the home team when Fitzroy was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_16\" 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_4\" (\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 home team score at Kardinia Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_4\" 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_4\" (\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 lowest crowd size for the Carlton at home?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_4\" 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 \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Name the engine with rounds of 7 with geki driver"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"rounds\"='7' AND \"driver\"='geki';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"entrant\" text,\n \"constructor\" text,\n \"chassis\" text,\n \"engine\" text,\n \"tyre\" text,\n \"driver\" text,\n \"rounds\" text\n);\n\nQuestion: Name the driver for 3 rounds"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"teams_and_drivers\" WHERE \"rounds\"='3';"
}
]
|
[
{
"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 attendance of the North Melbourne's home game?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") 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 attendance at the Fitzroy home game?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_20\" WHERE \"home_team\"='fitzroy';"
}
]
|
[
{
"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 Richmond's highest attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") 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 \"friendly\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: Which ground is match 4 held on?"
},
{
"role": "assistant",
"content": "SELECT \"ground\" FROM \"friendly\" WHERE \"match\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Which game number did they play the Chicago team?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"team\"='chicago';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the season record when the location attendance was Air Canada Centre 19,800?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"location_attendance\"='air canada centre 19,800';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Name the visitor for home of ny rangers"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"january\" WHERE \"home\"='ny rangers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"versions\" (\n \"country\" text,\n \"label\" text,\n \"cat_no\" text,\n \"media\" text,\n \"release_date\" real\n);\n\nQuestion: What is the label for a CD released in 2004?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"versions\" WHERE \"media\"='cd' AND \"release_date\"=2004;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"versions\" (\n \"country\" text,\n \"label\" text,\n \"cat_no\" text,\n \"media\" text,\n \"release_date\" real\n);\n\nQuestion: Who made a release in the US in 1982?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"versions\" WHERE \"release_date\"=1982 AND \"country\"='us';"
}
]
|
[
{
"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: On which date did a home team score 6.17 (53)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_9\" WHERE \"home_team_score\"='6.17 (53)';"
}
]
|
[
{
"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: In the match where the venue was arden street oval, what was the crowd attendance?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_9\" 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_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 was the crowd attendance in the match at punt road oval?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_9\" WHERE \"venue\"='punt road 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: What team played st kilda at their home with a crowd larger than 12,528?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_12\" WHERE \"crowd\">'12,528' AND \"home_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: What was the score when the home team had a crowd larger than 21,188?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"crowd\">'21,188';"
}
]
|
[
{
"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: Where did north melbourne play while away?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_12\" WHERE \"away_team\"='north melbourne';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.