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 \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: Who was the opponent in the game with save ||33,389||87\u201362?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"save\"='||33,389||87\u201362';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: Who was the opponent in the game with save ||33,723||93\u201364?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"save\"='||33,723||93\u201364';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"save\" text\n);\n\nQuestion: What was the score on September 8?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='september 8';"
}
] |
[
{
"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 \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which nationality has Years for Jazz of 1984-85?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"p\" WHERE \"years_for_jazz\"='1984-85';"
}
] |
[
{
"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 \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which position has a Nationality of united states, and a Player of roger powell?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"p\" WHERE \"nationality\"='united states' AND \"player\"='roger powell';"
}
] |
[
{
"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 \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What years does milt palacio play?"
},
{
"role": "assistant",
"content": "SELECT \"years_for_jazz\" FROM \"p\" WHERE \"player\"='milt palacio';"
}
] |
[
{
"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 \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which years have a School/Club Team of colorado state?"
},
{
"role": "assistant",
"content": "SELECT \"years_for_jazz\" FROM \"p\" WHERE \"school_club_team\"='colorado state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: During which years was the Model 318td (diesel) with the Engine code of m47d20 manufactured?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"engines\" WHERE \"engine_code\"='m47d20' AND \"model\"='318td (diesel)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the Torque of the model with the engine code of M54B25?"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"engines\" WHERE \"engine_code\"='m54b25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: What is the Torque of the Model 320td (diesel)?"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"engines\" WHERE \"model\"='320td (diesel)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: During which years was the model with the Engine code of m54b25 manufactured?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"engines\" WHERE \"engine_code\"='m54b25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"model\" text,\n \"years\" text,\n \"engine_code\" text,\n \"power\" text,\n \"torque\" text\n);\n\nQuestion: Which model was made from 2001\u20132004, with a Torque of n\u00b7m (lb\u00b7ft) @ 3750, and an Engine code of n42b18 / n46b18?"
},
{
"role": "assistant",
"content": "SELECT \"model\" FROM \"engines\" WHERE \"years\"='2001\u20132004' AND \"torque\"='n\u00b7m (lb\u00b7ft) @ 3750' AND \"engine_code\"='n42b18 / n46b18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the Mariners game that had a score of 1-12?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"score\"='1-12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the Mariners game that had an attendance of 6,707?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"attendance\"='6,707';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the Mariners game that had a loss of Segui (0-5)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='segui (0-5)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the loss of the Mariners game that had an attendance of 9,065?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"attendance\"='9,065';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the Mariners opponent at the game attended by 7,893?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"attendance\"='7,893';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_9\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the tournament surface at Aptos?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_9\" WHERE \"tournament\"='aptos';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_9\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the final score of the Paul Goldstein match?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_9\" WHERE \"opponent_in_the_final\"='paul goldstein';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_9\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Who played the final match on November 23, 1998?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_9\" WHERE \"date\"='november 23, 1998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_9\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What date did Paul Goldstein play the final?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"singles_9\" WHERE \"opponent_in_the_final\"='paul goldstein';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_9\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the surface type at Takao Suzuki?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_9\" WHERE \"opponent_in_the_final\"='takao suzuki';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_9\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What were the scores on September 11, 2006?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_9\" WHERE \"date\"='september 11, 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who did they lose to on may 9?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"date\"='may 9';"
}
] |
[
{
"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 Pedro De La Rosa's total number of Grid?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"driver\"='pedro de la rosa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which constructor has a Time/Retired of +37.311?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"race\" WHERE \"time_retired\"='+37.311';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired for mika h\u00e4kkinen"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"driver\"='mika h\u00e4kkinen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes_and_audiences\" (\n \"episode\" text,\n \"title\" text,\n \"date_of_emission\" text,\n \"audience\" text,\n \"share\" text\n);\n\nQuestion: Which title had an audience of 4.629.000?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"episodes_and_audiences\" WHERE \"audience\"='4.629.000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes_and_audiences\" (\n \"episode\" text,\n \"title\" text,\n \"date_of_emission\" text,\n \"audience\" text,\n \"share\" text\n);\n\nQuestion: What was the audience for Episode 21?"
},
{
"role": "assistant",
"content": "SELECT \"audience\" FROM \"episodes_and_audiences\" WHERE \"episode\"='21';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes_and_audiences\" (\n \"episode\" text,\n \"title\" text,\n \"date_of_emission\" text,\n \"audience\" text,\n \"share\" text\n);\n\nQuestion: What was the share when the audience was 3.944.000?"
},
{
"role": "assistant",
"content": "SELECT \"share\" FROM \"episodes_and_audiences\" WHERE \"audience\"='3.944.000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes_and_audiences\" (\n \"episode\" text,\n \"title\" text,\n \"date_of_emission\" text,\n \"audience\" text,\n \"share\" text\n);\n\nQuestion: What was the audience for Mi Amigo el Monstruo?"
},
{
"role": "assistant",
"content": "SELECT \"audience\" FROM \"episodes_and_audiences\" WHERE \"title\"='mi amigo el monstruo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes_and_audiences\" (\n \"episode\" text,\n \"title\" text,\n \"date_of_emission\" text,\n \"audience\" text,\n \"share\" text\n);\n\nQuestion: Which title has a share of 19,9%"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"episodes_and_audiences\" WHERE \"share\"='19,9%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episodes_and_audiences\" (\n \"episode\" text,\n \"title\" text,\n \"date_of_emission\" text,\n \"audience\" text,\n \"share\" text\n);\n\nQuestion: Which share had an audience of 4.693.000?"
},
{
"role": "assistant",
"content": "SELECT \"share\" FROM \"episodes_and_audiences\" WHERE \"audience\"='4.693.000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: what was the venue that hosted Carlton as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_5\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_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 was the date of the Collingwood away game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_5\" WHERE \"away_team\"='collingwood';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: Who is the player that plays position c on the New York Knicks?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft\" WHERE \"team\"='new york knicks' AND \"position\"='c';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: What is the position of the pick 1 player?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft\" WHERE \"pick\"='1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: Who is the player that plays position f from Fort Wayne Pistons?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft\" WHERE \"team\"='fort wayne pistons' AND \"position\"='f';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft\" (\n \"round\" text,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"team\" text,\n \"college\" text\n);\n\nQuestion: Which round is the player from Oregon from?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"draft\" WHERE \"college\"='oregon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: How many goals for occurred when the goals against was less than 56 and games played was larger than 7 with less than 6 wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_for\") FROM \"final_standing\" WHERE \"goals_against\"<56 AND \"games_played\">7 AND \"wins\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: What is the smallest number of wins with 7 games played and goals against less than 46 when goals for is more than 34?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"final_standing\" WHERE \"games_played\"=7 AND \"goals_against\"<46 AND \"goals_for\">34;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: What is the average number of ties when goals against is less than 56 for Ottawa Hockey Club and the goals for is more than 47?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"ties\") FROM \"final_standing\" WHERE \"goals_against\"<56 AND \"team\"='ottawa hockey club' AND \"goals_for\">47;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: How many losses occurred with less than 8 games played and less than 3 wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"final_standing\" WHERE \"games_played\"<8 AND \"wins\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_standing\" (\n \"team\" text,\n \"games_played\" real,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"goals_for\" real,\n \"goals_against\" real\n);\n\nQuestion: How many goals against were scored when the goals for is less than 48 with 0 ties?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_against\") FROM \"final_standing\" WHERE \"goals_for\"<48 AND \"ties\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Name the position for the player that is from valparaiso"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"d\" WHERE \"school_club_team_country\"='valparaiso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Name the height in feet for the guard from north carolina-charlotte"
},
{
"role": "assistant",
"content": "SELECT \"height_in_ft\" FROM \"d\" WHERE \"position\"='guard' AND \"school_club_team_country\"='north carolina-charlotte';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Name the height in feet for the player from valparaiso"
},
{
"role": "assistant",
"content": "SELECT \"height_in_ft\" FROM \"d\" WHERE \"school_club_team_country\"='valparaiso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Name the school/club team/country for the player that is 6-5 ft"
},
{
"role": "assistant",
"content": "SELECT \"school_club_team_country\" FROM \"d\" WHERE \"height_in_ft\"='6-5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Name the numbers for the player with a height in ft of 6-7 for the guard"
},
{
"role": "assistant",
"content": "SELECT \"no_s\" FROM \"d\" WHERE \"height_in_ft\"='6-7' AND \"position\"='guard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"d\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: Name the height in ft for the player from wyoming"
},
{
"role": "assistant",
"content": "SELECT \"height_in_ft\" FROM \"d\" WHERE \"school_club_team_country\"='wyoming';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_three\" (\n \"pick_num\" text,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college did the Calgary Stampeders recruit from?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"round_three\" WHERE \"cfl_team\"='calgary stampeders';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"year\" real,\n \"film_name\" text,\n \"co_singer\" text,\n \"music_director\" text,\n \"language\" text\n);\n\nQuestion: Which year has the Co-singer solo and a Film name of bhagya debata?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"2000s\" WHERE \"co_singer\"='solo' AND \"film_name\"='bhagya debata';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What date is the Portuguese Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"grand_prix\"='portuguese grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Which winning driver is located in Imola?"
},
{
"role": "assistant",
"content": "SELECT \"winning_driver\" FROM \"season_review\" WHERE \"location\"='imola';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"grand_prix\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the Pole Position of the Portuguese Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"season_review\" WHERE \"grand_prix\"='portuguese grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: On what date did a race occur at Long Beach?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"season_review\" WHERE \"location\"='long beach';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What race had Jody Scheckter hold pole position?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"season_review\" WHERE \"pole_position\"='jody scheckter';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who held pole position at the race won by Gilles Villeneuve, with the fastest lap held by Gilles Villeneuve, driving a Ferrari?"
},
{
"role": "assistant",
"content": "SELECT \"pole_position\" FROM \"season_review\" WHERE \"fastest_lap\"='gilles villeneuve' AND \"constructor\"='ferrari' AND \"race_winner\"='gilles villeneuve';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who won the South African Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"race_winner\" FROM \"season_review\" WHERE \"race\"='south african grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"date\" text,\n \"location\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"race_winner\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who had the fastest lap at the German Grand Prix?"
},
{
"role": "assistant",
"content": "SELECT \"fastest_lap\" FROM \"season_review\" WHERE \"race\"='german grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_review\" (\n \"race\" text,\n \"circuit\" text,\n \"date\" text,\n \"pole_position\" text,\n \"fastest_lap\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"tyre\" text,\n \"report\" text\n);\n\nQuestion: What is the Tyre for the united states grand prix?"
},
{
"role": "assistant",
"content": "SELECT \"tyre\" FROM \"season_review\" WHERE \"race\"='united states grand prix';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the result of the 1948 og competition?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"competition\"='1948 og';"
}
] |
[
{
"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: I want the lowest Grid for Rolf Stommelen"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"classification\" WHERE \"driver\"='rolf stommelen';"
}
] |
[
{
"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: I want the constructor for grid less than 20 and Laps of 6"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"classification\" WHERE \"grid\"<20 AND \"laps\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"development_of_population\" (\n \"year\" real,\n \"total\" real,\n \"german\" text,\n \"romanian\" text,\n \"hungarian\" text,\n \"other\" text,\n \"of_which_romanies_gypsies\" text\n);\n\nQuestion: What is the german total population after 1910 with an other total of 143 and 32 hungarians?"
},
{
"role": "assistant",
"content": "SELECT \"german\" FROM \"development_of_population\" WHERE \"year\">1910 AND \"other\"='143' AND \"hungarian\"='32';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"competition_record\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What year did Naoki Tsukahara finish 3rd in the 200 m race?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"competition_record\" WHERE \"notes\"='200 m' AND \"position\"='3rd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_conference_finals\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance at the Dallas home game on may 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"western_conference_finals\" WHERE \"home\"='dallas' AND \"date\"='may 12';"
}
] |
[
{
"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 nationality is the player ranked 2?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"leaders\" WHERE \"rank\"=2;"
}
] |
[
{
"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: How many wins for mike hill ranked below 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"leaders\" WHERE \"player\"='mike hill' AND \"rank\"<4;"
}
] |
[
{
"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 \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Trevor Cann's nationality?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='trevor cann';"
}
] |
[
{
"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 \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Kent Patterson's nationality?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='kent patterson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"patrol\" (\n \"class\" text,\n \"ships_in_class\" text,\n \"pennant_number\" real,\n \"unit\" text,\n \"builder\" text,\n \"commissioned\" text\n);\n\nQuestion: Which unit has a Pennant Number of 82?"
},
{
"role": "assistant",
"content": "SELECT \"unit\" FROM \"patrol\" WHERE \"pennant_number\"=82;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"patrol\" (\n \"class\" text,\n \"ships_in_class\" text,\n \"pennant_number\" real,\n \"unit\" text,\n \"builder\" text,\n \"commissioned\" text\n);\n\nQuestion: What is the highest pennant number with ships in raahe class?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pennant_number\") FROM \"patrol\" WHERE \"ships_in_class\"='raahe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"patrol\" (\n \"class\" text,\n \"ships_in_class\" text,\n \"pennant_number\" real,\n \"unit\" text,\n \"builder\" text,\n \"commissioned\" text\n);\n\nQuestion: What is the highest pennant number with ships in pori class?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pennant_number\") FROM \"patrol\" WHERE \"ships_in_class\"='pori';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the name of the competition that ended with a score of 2-1?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='2-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the name of the competition that ended with a score of 1-3?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='1-3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: At which venue did the game on 28 october 2013 take place?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='28 october 2013';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Competition name of the competition that ended with a score of 2-1?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='2-1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: In what year did a car have a yamaha v12 engine and a brabham bt60y chassis"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"complete_formula_one_results\" WHERE \"engine\"='yamaha v12' AND \"chassis\"='brabham bt60y';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: waht is the last year with a mclaren mp4/10b chassis"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='mclaren mp4/10b';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: before 1995 waht is the aveage pts for a mclaren mp4/10b chassis"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pts\") FROM \"complete_formula_one_results\" WHERE \"chassis\"='mclaren mp4/10b' AND \"year\"<1995;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_formula_one_results\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"pts\" real\n);\n\nQuestion: what is the most recent year for a ligier gitanes blondes"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"complete_formula_one_results\" WHERE \"entrant\"='ligier gitanes blondes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"interview\" real,\n \"average\" real\n);\n\nQuestion: What is the total number of averages with an interview of 8.75 when the evening gown number was bigger than 8.75?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"average\") FROM \"preliminary_competition\" WHERE \"interview\"=8.75 AND \"evening_gown\">8.75;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"interview\" real,\n \"average\" real\n);\n\nQuestion: What is the total number of interviews where the evening gown number is less than 8.82, the state is Kentucky, and the average is more than 8.85?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"interview\") FROM \"preliminary_competition\" WHERE \"evening_gown\"<8.82 AND \"state\"='kentucky' AND \"average\">8.85;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"interview\" real,\n \"average\" real\n);\n\nQuestion: How many averages had a swimsuit number of 8.42 and an evening gown number that was less than 8.71?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"average\") FROM \"preliminary_competition\" WHERE \"swimsuit\"=8.42 AND \"evening_gown\"<8.71;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"preliminary_competition\" (\n \"state\" text,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"interview\" real,\n \"average\" real\n);\n\nQuestion: Which state had an average of less than 8.67, a swimsuit score of 8.27, an evening gown score of 8.78, and an interview number of 8.52?"
},
{
"role": "assistant",
"content": "SELECT \"state\" FROM \"preliminary_competition\" WHERE \"average\"<8.67 AND \"swimsuit\"=8.27 AND \"evening_gown\"=8.78 AND \"interview\"=8.52;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record when the visitor was Nashville?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"february\" WHERE \"visitor\"='nashville';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"february\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the score when there were more than 14,381 in attendance and Phoenix was the visitor and Chicago was home?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"february\" WHERE \"attendance\">'14,381' AND \"visitor\"='phoenix' AND \"home\"='chicago';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_bowling\" (\n \"bowling_figures_wickets_runs_overs\" text,\n \"bowler\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: When was a competition held at Pietermaritzburg?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"best_bowling\" WHERE \"venue\"='pietermaritzburg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_bowling\" (\n \"bowling_figures_wickets_runs_overs\" text,\n \"bowler\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What were the bowling figures for the competition at Pietermaritzburg?"
},
{
"role": "assistant",
"content": "SELECT \"bowling_figures_wickets_runs_overs\" FROM \"best_bowling\" WHERE \"venue\"='pietermaritzburg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_bowling\" (\n \"bowling_figures_wickets_runs_overs\" text,\n \"bowler\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Who was the opponent during the competition in which the bowling figures were 5-33 (10)?"
},
{
"role": "assistant",
"content": "SELECT \"versus\" FROM \"best_bowling\" WHERE \"bowling_figures_wickets_runs_overs\"='5-33 (10)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_bowling\" (\n \"bowling_figures_wickets_runs_overs\" text,\n \"bowler\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What were GD Mcgrath's bowling figures?"
},
{
"role": "assistant",
"content": "SELECT \"bowling_figures_wickets_runs_overs\" FROM \"best_bowling\" WHERE \"bowler\"='gd mcgrath';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"best_bowling\" (\n \"bowling_figures_wickets_runs_overs\" text,\n \"bowler\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: During the competition at Port Elizabeth, where the opponent was Australia, what were the bowling figures?"
},
{
"role": "assistant",
"content": "SELECT \"bowling_figures_wickets_runs_overs\" FROM \"best_bowling\" WHERE \"venue\"='port elizabeth' AND \"versus\"='australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"buildings_completed_as_of_february_2011\" (\n \"rank\" real,\n \"building\" text,\n \"height\" text,\n \"floors\" real,\n \"completed\" real\n);\n\nQuestion: What is the lowest amount of floors after rank 1 in the Trillium (residential) building?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"floors\") FROM \"buildings_completed_as_of_february_2011\" WHERE \"rank\">1 AND \"building\"='the trillium (residential)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"buildings_completed_as_of_february_2011\" (\n \"rank\" real,\n \"building\" text,\n \"height\" text,\n \"floors\" real,\n \"completed\" real\n);\n\nQuestion: What is the lowest amount of floors in the building completed before 1970 ranked more than 14?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"floors\") FROM \"buildings_completed_as_of_february_2011\" WHERE \"completed\"<1970 AND \"rank\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"buildings_completed_as_of_february_2011\" (\n \"rank\" real,\n \"building\" text,\n \"height\" text,\n \"floors\" real,\n \"completed\" real\n);\n\nQuestion: What is the largest amount of floors in the 70m (233ft) Tupper building (educational)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"floors\") FROM \"buildings_completed_as_of_february_2011\" WHERE \"height\"='70m (233ft)' AND \"building\"='tupper building (educational)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Which manufacturer has 23 laps and a time of +45.195?"
},
{
"role": "assistant",
"content": "SELECT \"manufacturer\" FROM \"moto_gp_classification\" WHERE \"laps\"=23 AND \"time_retired\"='+45.195';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What is the sum of Sylvain Guintoli's laps?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"moto_gp_classification\" WHERE \"rider\"='sylvain guintoli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_individual_scores\" (\n \"runs\" text,\n \"balls\" text,\n \"batsman\" text,\n \"versus\" text,\n \"venue\" text,\n \"date\" text,\n \"strike_rate\" text\n);\n\nQuestion: How many runs were scored when the strike rate was 101.42?"
},
{
"role": "assistant",
"content": "SELECT \"runs\" FROM \"highest_individual_scores\" WHERE \"strike_rate\"='101.42';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"port_statistics\" (\n \"product\" text,\n \"2004\" text,\n \"2003\" text,\n \"2002\" text,\n \"2001\" text\n);\n\nQuestion: What was the amount of grain in 2001?"
},
{
"role": "assistant",
"content": "SELECT \"2001\" FROM \"port_statistics\" WHERE \"product\"='grain';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.