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 \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: Who was the Home team in Tie #23?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"ties\" WHERE \"tie_no\"=23;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What was the final score in Tie #28?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"ties\" WHERE \"tie_no\"=28;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What score has a to par greater than 15, money ($) greater than 116, with billy burke as the player?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"to_par\">15 AND \"money\">116 AND \"player\"='billy burke';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What player has t3 as the place, with england united states as the country?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"place\"='t3' AND \"country\"='england united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What is the lowest money ($) that has t8 as the place, with a to par greater than 19?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"money\") FROM \"final_leaderboard\" WHERE \"place\"='t8' AND \"to_par\">19;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" real,\n \"money\" real\n);\n\nQuestion: What score has money ($) greater than 400, with gene sarazen as the player?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"money\">400 AND \"player\"='gene sarazen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which Country has a To par smaller than 7, and a Total of 148?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"to_par\"<7 AND \"total\"=148;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which player is from south africa?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"missed_the_cut\" WHERE \"country\"='south africa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: Which Year(s) won has a Total larger than 148, and a To par smaller than 17, and a Country of new zealand?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"missed_the_cut\" WHERE \"total\">148 AND \"to_par\"<17 AND \"country\"='new zealand';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medallists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: In what Event did Dorcus Inzikuru compete?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"list_of_medallists\" WHERE \"name\"='dorcus inzikuru';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medallists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: In what Games did Patrick Etolu compete?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"list_of_medallists\" WHERE \"name\"='patrick etolu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medallists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What Medal did James Odwori receive for Boxing in the 1970 Edinburgh Games?"
},
{
"role": "assistant",
"content": "SELECT \"medal\" FROM \"list_of_medallists\" WHERE \"sport\"='boxing' AND \"games\"='1970 edinburgh' AND \"name\"='james odwori';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medallists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: What is the Medal for the Player in the Light Heavyweight event?"
},
{
"role": "assistant",
"content": "SELECT \"medal\" FROM \"list_of_medallists\" WHERE \"event\"='light heavyweight';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_medallists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: At what Games did the competitor win a Silver medal in the light heavyweight event?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"list_of_medallists\" WHERE \"medal\"='silver' AND \"event\"='light heavyweight';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Tie no for Away Team Ipswich Town?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"sixth_round_proper\" WHERE \"away_team\"='ipswich town';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Date of the Middlesbrough Home game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"sixth_round_proper\" WHERE \"home_team\"='middlesbrough';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Home team in the Game with a Score of 1\u20130?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"sixth_round_proper\" WHERE \"score\"='1\u20130';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sixth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Date of the Everton Away game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"sixth_round_proper\" WHERE \"away_team\"='everton';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: When the finish was t31 what was the To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"finish\"='t31';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Who had a finish of t15?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"finish\"='t15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: When the total was 290 what was the To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"total\"=290;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the Total for Seve Ballesteros?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"made_the_cut\" WHERE \"player\"='seve ballesteros';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1993_london_revival\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What was the result of Declan Donnellan's nomination?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"1993_london_revival\" WHERE \"nominee\"='declan donnellan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1993_london_revival\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What was the result of the Best Actor in a Musical category?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"1993_london_revival\" WHERE \"category\"='best actor in a musical';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: WHAT IS THE PLAYER WITH 287?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\"=287;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: WHAT COUNTRY HAS A PLAYER NAMED JACK NICKLAUS?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"player\"='jack nicklaus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is Player, when Country is \"United States\", and when Place is \"6\"?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"country\"='united states' AND \"place\"='6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the average Money ( $ ), when Score is \"69-69-76-69=283\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"money\") FROM \"final_leaderboard\" WHERE \"score\"='69-69-76-69=283';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is Country, when To par is \"+1\", and when Score is \"72-71-70-72=285\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_leaderboard\" WHERE \"to_par\"='+1' AND \"score\"='72-71-70-72=285';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is Place, when Score is \"70-70-68-70=278\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"score\"='70-70-68-70=278';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"pregame_host\" text\n);\n\nQuestion: For which network was Chris Walby the color commentator after 1990?"
},
{
"role": "assistant",
"content": "SELECT \"network\" FROM \"1990s\" WHERE \"year\">1990 AND \"colour_commentator_s\"='chris walby';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1990s\" (\n \"year\" real,\n \"network\" text,\n \"play_by_play\" text,\n \"colour_commentator_s\" text,\n \"pregame_host\" text\n);\n\nQuestion: Who was the pregame host before 1992 when there was a play by play of Bob Irving?"
},
{
"role": "assistant",
"content": "SELECT \"pregame_host\" FROM \"1990s\" WHERE \"year\"<1992 AND \"play_by_play\"='bob irving';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_won\" real,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the total of the player who won before 1991 and has a to par less than 14?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"missed_the_cut\" WHERE \"year_won\"<1991 AND \"to_par\"<14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_won\" real,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the total to par of player jeff sluman, who won before 1993 and has a total greater than 154?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"to_par\") FROM \"missed_the_cut\" WHERE \"year_won\"<1993 AND \"player\"='jeff sluman' AND \"total\">154;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_won\" real,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the sum of the total of player rich beem, who has a to par greater than 17?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"missed_the_cut\" WHERE \"player\"='rich beem' AND \"to_par\">17;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_cup_history\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: Who was the away team in the semifinals?"
},
{
"role": "assistant",
"content": "SELECT \"away\" FROM \"european_cup_history\" WHERE \"round\"='semifinals';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_cup_history\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: What is the home record for the Auxerre club?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"european_cup_history\" WHERE \"club\"='auxerre';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"european_cup_history\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"home\" text,\n \"away\" text,\n \"aggregate\" text\n);\n\nQuestion: What is the home record for the Maccabi Tel-Aviv club?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"european_cup_history\" WHERE \"club\"='maccabi tel-aviv';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the total number of Against, when Date is \"16/03/1996\"?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"against\") FROM \"1996\" WHERE \"date\"='16/03/1996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Venue, when Against is greater than 9, and when Date is \"03/02/1996\"?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1996\" WHERE \"against\">9 AND \"date\"='03/02/1996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Status, when Opposing Teams is \"Scotland\"?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"1996\" WHERE \"opposing_teams\"='scotland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is Venue, when Date is \"14/12/1996\"?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1996\" WHERE \"date\"='14/12/1996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the average Against, when Status is \"Five Nations\", and when Date is \"16/03/1996\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"1996\" WHERE \"status\"='five nations' AND \"date\"='16/03/1996';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: In what year did the team of aston martin racing have a position of 6th?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"24_hours_of_le_mans_results\" WHERE \"team\"='aston martin racing' AND \"pos\"='6th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Which year did the team of pescarolo sport have a Class Position of 7th?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"24_hours_of_le_mans_results\" WHERE \"team\"='pescarolo sport' AND \"class_pos\"='7th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Who were the co-drivers of the vehicle that had both a Class position and position of 7th?"
},
{
"role": "assistant",
"content": "SELECT \"co_drivers\" FROM \"24_hours_of_le_mans_results\" WHERE \"class_pos\"='7th' AND \"pos\"='7th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"slowest_progress_to_top_division\" (\n \"name\" text,\n \"tournaments\" real,\n \"pro_debut\" text,\n \"top_division_debut\" text,\n \"highest_rank\" text\n);\n\nQuestion: Which Rank is Highest for Yoshiazuma?"
},
{
"role": "assistant",
"content": "SELECT \"highest_rank\" FROM \"slowest_progress_to_top_division\" WHERE \"name\"='yoshiazuma';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"slowest_progress_to_top_division\" (\n \"name\" text,\n \"tournaments\" real,\n \"pro_debut\" text,\n \"top_division_debut\" text,\n \"highest_rank\" text\n);\n\nQuestion: Which Top Division debut for Kitazakura has Tournaments less than 88?"
},
{
"role": "assistant",
"content": "SELECT \"top_division_debut\" FROM \"slowest_progress_to_top_division\" WHERE \"tournaments\"<88 AND \"name\"='kitazakura';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"slowest_progress_to_top_division\" (\n \"name\" text,\n \"tournaments\" real,\n \"pro_debut\" text,\n \"top_division_debut\" text,\n \"highest_rank\" text\n);\n\nQuestion: What is the lowest Tournaments with Highest Rank of Maegashira 13?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"tournaments\") FROM \"slowest_progress_to_top_division\" WHERE \"highest_rank\"='maegashira 13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"year\" real,\n \"winner\" text,\n \"finalist\" text,\n \"result\" text,\n \"city\" text,\n \"stadium\" text\n);\n\nQuestion: What was the city where Hallescher FC won in 2008?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"finals\" WHERE \"winner\"='hallescher fc' AND \"year\"=2008;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"year\" real,\n \"winner\" text,\n \"finalist\" text,\n \"result\" text,\n \"city\" text,\n \"stadium\" text\n);\n\nQuestion: Who was the winner of fc gr\u00fcn-wei\u00df wolfen?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"finals\" WHERE \"finalist\"='fc gr\u00fcn-wei\u00df wolfen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"year\" real,\n \"winner\" text,\n \"finalist\" text,\n \"result\" text,\n \"city\" text,\n \"stadium\" text\n);\n\nQuestion: What was the stadium past 2012?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"finals\" WHERE \"year\">2012;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"workplace_killings\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"injured\" text\n);\n\nQuestion: What is the average Year, when Country is \"U.S.\", and when Location is \"Edmond , OK\"?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"workplace_killings\" WHERE \"country\"='u.s.' AND \"location\"='edmond , ok';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"workplace_killings\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"injured\" text\n);\n\nQuestion: What is the lowest Killed, when Perpetrator is \"Sherrill, Patrick Henry , 44\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"killed\") FROM \"workplace_killings\" WHERE \"perpetrator\"='sherrill, patrick henry , 44';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What was the highest goals with fewer than 16 losses, fewer than 11 wins, and a goal difference greater than -9?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_for\") FROM \"group_i\" WHERE \"losses\"<16 AND \"wins\"<11 AND \"goal_difference\">-9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the highest wins entry with fewer than 51 goals, more than 39 points, and a goal difference smaller than 13?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"group_i\" WHERE \"goals_against\"<51 AND \"points\">39 AND \"goal_difference\"<13;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the lowest wins entry that has a goal difference less than 33, position higher than 13, and 42 goals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"group_i\" WHERE \"goal_difference\"<33 AND \"position\"<13 AND \"goals_for\"=42;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the total number of goals for entries that have more than 7 draws, 8 wins, and more than 5 losses?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_for\") FROM \"group_i\" WHERE \"draws\">7 AND \"wins\">8 AND \"losses\">5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2002_2003_season\" text\n);\n\nQuestion: What city is the Stadium est\u00e1dio dr. magalh\u00e3es pessoa in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"team_summaries\" WHERE \"stadium\"='est\u00e1dio dr. magalh\u00e3es pessoa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2002_2003_season\" text\n);\n\nQuestion: What city is the Stadium est\u00e1dio cidade de barcelos in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"team_summaries\" WHERE \"stadium\"='est\u00e1dio cidade de barcelos';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2002_2003_season\" text\n);\n\nQuestion: Head Coach casemiro mior is at which Club?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"team_summaries\" WHERE \"head_coach\"='casemiro mior';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2002_2003_season\" text\n);\n\nQuestion: What City is the Club braga in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"team_summaries\" WHERE \"club\"='braga';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_summaries\" (\n \"club\" text,\n \"head_coach\" text,\n \"city\" text,\n \"stadium\" text,\n \"2002_2003_season\" text\n);\n\nQuestion: What place is listed in the 2002-2003 season for the City of Aveiro?"
},
{
"role": "assistant",
"content": "SELECT \"2002_2003_season\" FROM \"team_summaries\" WHERE \"city\"='aveiro';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What is the 1st round with fc nantes (d1) as team 1?"
},
{
"role": "assistant",
"content": "SELECT \"1st_round\" FROM \"round_of_16\" WHERE \"team_1\"='fc nantes (d1)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"score\" text,\n \"team_2\" text,\n \"1st_round\" text,\n \"2nd_round\" text\n);\n\nQuestion: What is the team 1 with n\u00eemes olympique (d2) as team 2?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"round_of_16\" WHERE \"team_2\"='n\u00eemes olympique (d2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog_number\" text,\n \"lyrics\" text\n);\n\nQuestion: In what language is the Lyrics of the release on August 10, 2005 with Catalog number of TOCP-66427?"
},
{
"role": "assistant",
"content": "SELECT \"lyrics\" FROM \"release_history\" WHERE \"date\"='august 10, 2005' AND \"catalog_number\"='tocp-66427';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog_number\" text,\n \"lyrics\" text\n);\n\nQuestion: What is the Label of the CD released in Germany on June 6, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='june 6, 2005' AND \"region\"='germany' AND \"format\"='cd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog_number\" text,\n \"lyrics\" text\n);\n\nQuestion: What is the Region of the EMI 4 x vinyl release bearing Catalog number 560 6111?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"label\"='emi' AND \"format\"='4 x vinyl' AND \"catalog_number\"='560 6111';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog_number\" text,\n \"lyrics\" text\n);\n\nQuestion: What language is the Lyrics of the release with Catalog number 560 6111?"
},
{
"role": "assistant",
"content": "SELECT \"lyrics\" FROM \"release_history\" WHERE \"catalog_number\"='560 6111';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalog_number\" text,\n \"lyrics\" text\n);\n\nQuestion: What is the Region of the release with Catalog number 3 12046 2?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"catalog_number\"='3 12046 2';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"format_s\" text,\n \"edition_s\" text,\n \"label\" text\n);\n\nQuestion: What is the Label of the September 19, 2008 release in Germany?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"date\"='september 19, 2008' AND \"region\"='germany';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"format_s\" text,\n \"edition_s\" text,\n \"label\" text\n);\n\nQuestion: What is the Edition of the release in Germany?"
},
{
"role": "assistant",
"content": "SELECT \"edition_s\" FROM \"release_history\" WHERE \"region\"='germany';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"format_s\" text,\n \"edition_s\" text,\n \"label\" text\n);\n\nQuestion: What is the Format(s) of the release on September 23, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"format_s\" FROM \"release_history\" WHERE \"date\"='september 23, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"format_s\" text,\n \"edition_s\" text,\n \"label\" text\n);\n\nQuestion: What is the Label of the release on April 24, 2009 in Germany?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"region\"='germany' AND \"date\"='april 24, 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ultra_low_voltage_processors\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l1_cache\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"clock_multiplier\" text,\n \"idle_power\" text,\n \"socket\" text,\n \"cores\" real,\n \"release_date\" text\n);\n\nQuestion: What is the L2 Cache for Model Number nano u3400 with an Idle Power of 100mw?"
},
{
"role": "assistant",
"content": "SELECT \"l2_cache\" FROM \"ultra_low_voltage_processors\" WHERE \"idle_power\"='100mw' AND \"model_number\"='nano u3400';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ultra_low_voltage_processors\" (\n \"model_number\" text,\n \"clock_speed\" text,\n \"l1_cache\" text,\n \"l2_cache\" text,\n \"fsb_speed\" text,\n \"clock_multiplier\" text,\n \"idle_power\" text,\n \"socket\" text,\n \"cores\" real,\n \"release_date\" text\n);\n\nQuestion: What is the total Cores with a Clock Speed of 1.3ghz?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"cores\") FROM \"ultra_low_voltage_processors\" WHERE \"clock_speed\"='1.3ghz';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What's the to par for the score of 68-74-71-77=290?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"score\"='68-74-71-77=290';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What's the money ($) for the t3 place and the score of 74-74-71-69=288?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_leaderboard\" WHERE \"place\"='t3' AND \"score\"='74-74-71-69=288';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What's the score for $22,500?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"money\"='22,500';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What's the to par for the t1 place with a score of 70-72-73-72=287?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"place\"='t1' AND \"score\"='70-72-73-72=287';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"railway_station\" text,\n \"annual_entry_exit_millions_2011_12\" real,\n \"annual_interchanges_millions_2011_12\" real,\n \"total_passengers_millions_2011_12\" real,\n \"location\" text,\n \"number_of_platforms\" real\n);\n\nQuestion: What's the average annual interchange for a rank over 26 in liverpool with an annual entry/exit less than 14.209 and more than 10 platforms?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"annual_interchanges_millions_2011_12\") FROM \"references\" WHERE \"rank\">26 AND \"location\"='liverpool' AND \"annual_entry_exit_millions_2011_12\"<14.209 AND \"number_of_platforms\">10;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"railway_station\" text,\n \"annual_entry_exit_millions_2011_12\" real,\n \"annual_interchanges_millions_2011_12\" real,\n \"total_passengers_millions_2011_12\" real,\n \"location\" text,\n \"number_of_platforms\" real\n);\n\nQuestion: What's the highest annual interchange for wimbledon railway station?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"annual_interchanges_millions_2011_12\") FROM \"references\" WHERE \"railway_station\"='wimbledon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"railway_station\" text,\n \"annual_entry_exit_millions_2011_12\" real,\n \"annual_interchanges_millions_2011_12\" real,\n \"total_passengers_millions_2011_12\" real,\n \"location\" text,\n \"number_of_platforms\" real\n);\n\nQuestion: What's the lowest number of total passengers (millions) for an annual entry/exit of 36.609?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"total_passengers_millions_2011_12\") FROM \"references\" WHERE \"annual_entry_exit_millions_2011_12\"=36.609;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"railway_station\" text,\n \"annual_entry_exit_millions_2011_12\" real,\n \"annual_interchanges_millions_2011_12\" real,\n \"total_passengers_millions_2011_12\" real,\n \"location\" text,\n \"number_of_platforms\" real\n);\n\nQuestion: What rank has an annual interchange less than 1.99 million, an annual entry/exit less than 13.835 million, and more than 13.772 million total passengers?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"references\" WHERE \"annual_interchanges_millions_2011_12\"<1.99 AND \"annual_entry_exit_millions_2011_12\"<13.835 AND \"total_passengers_millions_2011_12\">13.772;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"references\" (\n \"rank\" real,\n \"railway_station\" text,\n \"annual_entry_exit_millions_2011_12\" real,\n \"annual_interchanges_millions_2011_12\" real,\n \"total_passengers_millions_2011_12\" real,\n \"location\" text,\n \"number_of_platforms\" real\n);\n\nQuestion: How many ranks are in liverpool with more than 3 platforms and an annual interchange less than 0.778 million?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"references\" WHERE \"location\"='liverpool' AND \"number_of_platforms\">3 AND \"annual_interchanges_millions_2011_12\"<0.778;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minnesota_counties_ranked_by_per_capita_\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: Which Number of households has Per capita income of $21,571, and a Population smaller than 9,783?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"number_of_households\") FROM \"minnesota_counties_ranked_by_per_capita_\" WHERE \"per_capita_income\"='$21,571' AND \"population\"<'9,783';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minnesota_counties_ranked_by_per_capita_\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: Which Number of households has a County of cook, and Population smaller than 5,176?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"number_of_households\") FROM \"minnesota_counties_ranked_by_per_capita_\" WHERE \"county\"='cook' AND \"population\"<'5,176';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minnesota_counties_ranked_by_per_capita_\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What Per capita income has a Median family income of $50,755?"
},
{
"role": "assistant",
"content": "SELECT \"per_capita_income\" FROM \"minnesota_counties_ranked_by_per_capita_\" WHERE \"median_family_income\"='$50,755';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"minnesota_counties_ranked_by_per_capita_\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What Number of households have a Median family income of $58,491?"
},
{
"role": "assistant",
"content": "SELECT \"number_of_households\" FROM \"minnesota_counties_ranked_by_per_capita_\" WHERE \"median_family_income\"='$58,491';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the score of the golfer representing Scotland?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='scotland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What was the to par score of the golfer that had a score of 68-70=138?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"score\"='68-70=138';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which golfer had a score of 69-71=140?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='69-71=140';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which country is t3 finisher billy mayfair from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"place\"='t3' AND \"player\"='billy mayfair';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which Country has a Player of jodie mudd?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"player\"='jodie mudd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which Money (\u00a3) has a Player of jodie mudd?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"money\") FROM \"final_round\" WHERE \"player\"='jodie mudd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the total Money (\u00a3) of Player of nick faldo?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"money\") FROM \"final_round\" WHERE \"player\"='nick faldo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: What is the total Money (\u00a3) with a Place of t6, and a Player of ian baker-finch?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"money\") FROM \"final_round\" WHERE \"place\"='t6' AND \"player\"='ian baker-finch';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What position was the team who had less then 63 goals against and less than 6 losses?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"position\") FROM \"first_division_final_table\" WHERE \"goals_against\"<63 AND \"lost\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: How many times did the team lose who had 1 of 37 points and less than 60 goals against?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"first_division_final_table\" WHERE \"points_1\"='37' AND \"goals_against\"<60;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: How many times did the team lose who had a goal difference of +2, 52 goals for, and less than 9 draws?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"first_division_final_table\" WHERE \"goal_difference\"='+2' AND \"goals_for\"=52 AND \"drawn\"<9;"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.