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 \"second_round\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What Team 1 has union douala as Team 2?"
},
{
"role": "assistant",
"content": "SELECT \"team_1\" FROM \"second_round\" WHERE \"team_2\"='union douala';"
}
]
|
[
{
"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: What was the score of the game that had a loss of Cerutti (0-1)?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='cerutti (0-1)';"
}
]
|
[
{
"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 was the opponent at the game that had a record of 93-54?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='93-54';"
}
]
|
[
{
"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: What was the score to par for 156 strokes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"to_par\") FROM \"missed_the_cut\" WHERE \"total\">156;"
}
]
|
[
{
"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: How many strokes for arnold palmer with a to par of greater than 9?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"missed_the_cut\" WHERE \"to_par\">9 AND \"player\"='arnold palmer';"
}
]
|
[
{
"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: What was the score to par in 1960?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"missed_the_cut\" WHERE \"year_s_won\"='1960';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rugby_germany_internationals_1989\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: What is the earliest first game for a rugby team that has 7 lost games and 0 draws?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"first_game\") FROM \"rugby_germany_internationals_1989\" WHERE \"lost\"=7 AND \"drawn\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rugby_germany_internationals_1989\" (\n \"first_game\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"percentage\" text\n);\n\nQuestion: How many games were played by a team that won 0.00% of their games and 0 draws?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"played\") FROM \"rugby_germany_internationals_1989\" WHERE \"percentage\"='0.00%' AND \"drawn\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_wins_losses_and_draws\" (\n \"team\" text,\n \"1st_match\" text,\n \"matches\" text,\n \"lost\" text,\n \"pct_won\" text\n);\n\nQuestion: Name the matches for the first match being 30 march 1997"
},
{
"role": "assistant",
"content": "SELECT \"matches\" FROM \"team_wins_losses_and_draws\" WHERE \"1st_match\"='30 march 1997';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_wins_losses_and_draws\" (\n \"team\" text,\n \"1st_match\" text,\n \"matches\" text,\n \"lost\" text,\n \"pct_won\" text\n);\n\nQuestion: Name the 1st match for brisbane bears"
},
{
"role": "assistant",
"content": "SELECT \"1st_match\" FROM \"team_wins_losses_and_draws\" WHERE \"team\"='brisbane bears';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_wins_losses_and_draws\" (\n \"team\" text,\n \"1st_match\" text,\n \"matches\" text,\n \"lost\" text,\n \"pct_won\" text\n);\n\nQuestion: Name the lost for matches of 1 928"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"team_wins_losses_and_draws\" WHERE \"matches\"='1 928';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_wins_losses_and_draws\" (\n \"team\" text,\n \"1st_match\" text,\n \"matches\" text,\n \"lost\" text,\n \"pct_won\" text\n);\n\nQuestion: Name the lost for % won of 55.37"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"team_wins_losses_and_draws\" WHERE \"pct_won\"='55.37';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_wins_losses_and_draws\" (\n \"team\" text,\n \"1st_match\" text,\n \"matches\" text,\n \"lost\" text,\n \"pct_won\" text\n);\n\nQuestion: Name the matches for gold coast"
},
{
"role": "assistant",
"content": "SELECT \"matches\" FROM \"team_wins_losses_and_draws\" WHERE \"team\"='gold coast';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_wins_losses_and_draws\" (\n \"team\" text,\n \"1st_match\" text,\n \"matches\" text,\n \"lost\" text,\n \"pct_won\" text\n);\n\nQuestion: Name the lost for % won of 55.37"
},
{
"role": "assistant",
"content": "SELECT \"lost\" FROM \"team_wins_losses_and_draws\" WHERE \"pct_won\"='55.37';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"year\" text,\n \"x_dsl\" text,\n \"cable\" text,\n \"ft_tx\" text,\n \"other\" text\n);\n\nQuestion: What is the year when cable was 4.6%?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"statistics\" WHERE \"cable\"='4.6%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"year\" text,\n \"x_dsl\" text,\n \"cable\" text,\n \"ft_tx\" text,\n \"other\" text\n);\n\nQuestion: What is the other for 2012?"
},
{
"role": "assistant",
"content": "SELECT \"other\" FROM \"statistics\" WHERE \"year\"='2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"year\" text,\n \"x_dsl\" text,\n \"cable\" text,\n \"ft_tx\" text,\n \"other\" text\n);\n\nQuestion: What is the xDSL for the other of 0.6% and FTTx of 35.4%?"
},
{
"role": "assistant",
"content": "SELECT \"x_dsl\" FROM \"statistics\" WHERE \"other\"='0.6%' AND \"ft_tx\"='35.4%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"year\" text,\n \"x_dsl\" text,\n \"cable\" text,\n \"ft_tx\" text,\n \"other\" text\n);\n\nQuestion: What is the other for a 78.2% xDSL?"
},
{
"role": "assistant",
"content": "SELECT \"other\" FROM \"statistics\" WHERE \"x_dsl\"='78.2%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"year\" text,\n \"x_dsl\" text,\n \"cable\" text,\n \"ft_tx\" text,\n \"other\" text\n);\n\nQuestion: What is the xDSL in 2010 when the other was 0.6%?"
},
{
"role": "assistant",
"content": "SELECT \"x_dsl\" FROM \"statistics\" WHERE \"other\"='0.6%' AND \"year\"='2010';"
}
]
|
[
{
"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: Which date has a Result of won, and a Score of 1-0?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"result\"='won' AND \"score\"='1-0';"
}
]
|
[
{
"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: Which result has a Date of november 2, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='november 2, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Competition has a Score of 2-0?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"score\"='2-0';"
}
]
|
[
{
"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: Which Venue has a Date of january 9, 2011?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='january 9, 2011';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: What is the termination of mission date of the representative with a presentation of credentials date on July 4, 1898?"
},
{
"role": "assistant",
"content": "SELECT \"termination_of_mission\" FROM \"see_also\" WHERE \"presentation_of_credentials\"='july 4, 1898';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: What is the presentation of credentials date of ra\u00fal h. castro, who has a title of ambassador extraordinary and plenipotentiary?"
},
{
"role": "assistant",
"content": "SELECT \"presentation_of_credentials\" FROM \"see_also\" WHERE \"title\"='ambassador extraordinary and plenipotentiary' AND \"representative\"='ra\u00fal h. castro';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: Who is the representative with a presentation of credentials date on February 23, 1854?"
},
{
"role": "assistant",
"content": "SELECT \"representative\" FROM \"see_also\" WHERE \"presentation_of_credentials\"='february 23, 1854';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: What is the title of the representative appointed by James K. Polk?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"see_also\" WHERE \"appointed_by\"='james k. polk';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"representative\" text,\n \"title\" text,\n \"presentation_of_credentials\" text,\n \"termination_of_mission\" text,\n \"appointed_by\" text\n);\n\nQuestion: What is the termination of mission date of the representative appointed by Franklin Pierce with a title of charg\u00e9 d'affaires?"
},
{
"role": "assistant",
"content": "SELECT \"termination_of_mission\" FROM \"see_also\" WHERE \"appointed_by\"='franklin pierce' AND \"title\"='charg\u00e9 d''affaires';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_season\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What is the Stadium held on november 29?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"2007_season\" WHERE \"date\"='november 29';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_season\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who is the Visiting team on december 20?"
},
{
"role": "assistant",
"content": "SELECT \"visiting_team\" FROM \"2007_season\" WHERE \"date\"='december 20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_season\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Which Stadium has a Visiting team of pittsburgh steelers?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"2007_season\" WHERE \"visiting_team\"='pittsburgh steelers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_season\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: Who is the Host team that has a chicago bears as a visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"host_team\" FROM \"2007_season\" WHERE \"visiting_team\"='chicago bears';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_season\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What is the Final score on november 22?"
},
{
"role": "assistant",
"content": "SELECT \"final_score\" FROM \"2007_season\" WHERE \"date\"='november 22';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_season\" (\n \"date\" text,\n \"visiting_team\" text,\n \"final_score\" text,\n \"host_team\" text,\n \"stadium\" text\n);\n\nQuestion: What is the Host team that has indianapolis colts as a Visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"host_team\" FROM \"2007_season\" WHERE \"visiting_team\"='indianapolis colts';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" real,\n \"winners\" text,\n \"club\" text,\n \"time\" text,\n \"runners_up\" text\n);\n\nQuestion: Who won when np cooper av cooke was runner up?"
},
{
"role": "assistant",
"content": "SELECT \"winners\" FROM \"winners\" WHERE \"runners_up\"='np cooper av cooke';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the record of the match that had a time of 1:44?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:44';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Who was the opponent at GCM \u2013 D.O.G. 4?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='gcm \u2013 d.o.g. 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What was the location of the match that ended before round 2, against Hikaru Sato?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<2 AND \"opponent\"='hikaru sato';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_10\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: What was the Company or Product name where Entrepreneurs Geoff and Colette Bell requested \u00a375,000?"
},
{
"role": "assistant",
"content": "SELECT \"company_or_product_name\" FROM \"series_10\" WHERE \"money_requested\"='75,000' AND \"entrepreneur_s\"='geoff and colette bell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_10\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: Which Investing Dragon(s) belong to Episode 9 with the Entrepreneur Ashley Sayed?"
},
{
"role": "assistant",
"content": "SELECT \"investing_dragon_s\" FROM \"series_10\" WHERE \"episode\"='episode 9' AND \"entrepreneur_s\"='ashley sayed';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_10\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: What Episode did Entrepreneur(s) Luke Booth and Christopher Eves take part?"
},
{
"role": "assistant",
"content": "SELECT \"episode\" FROM \"series_10\" WHERE \"entrepreneur_s\"='luke booth and christopher eves';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_10\" (\n \"episode\" text,\n \"first_aired\" text,\n \"entrepreneur_s\" text,\n \"company_or_product_name\" text,\n \"money_requested\" text,\n \"investing_dragon_s\" text\n);\n\nQuestion: Which Company or Product name requested \u00a370,000 on Episode 11?"
},
{
"role": "assistant",
"content": "SELECT \"company_or_product_name\" FROM \"series_10\" WHERE \"episode\"='episode 11' AND \"money_requested\"='70,000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What is the year in which Yong Yudianto won the men's singles?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"previous_winners\" WHERE \"men_s_singles\"='yong yudianto';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won the men's singles in 1999?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_singles\" FROM \"previous_winners\" WHERE \"year\"=1999;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fiba_euro_basket_2007_squads\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born\" real,\n \"current_club\" text\n);\n\nQuestion: What is stephen arigbabu's height?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"height\") FROM \"fiba_euro_basket_2007_squads\" WHERE \"player\"='stephen arigbabu';"
}
]
|
[
{
"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: For all games with los angeles as visitor, what is the highest attendance of all?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"february\" WHERE \"visitor\"='los angeles';"
}
]
|
[
{
"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: For all games with calgary as home, what is the average number of attendees?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"february\" WHERE \"home\"='calgary';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"final\" text\n);\n\nQuestion: Who is no. 5 when Lena Claudisabel is no. 1 and Lena Sylvie is no. 2?"
},
{
"role": "assistant",
"content": "SELECT \"no_5\" FROM \"nominations\" WHERE \"no_1\"='lena claudisabel' AND \"no_2\"='lena sylvie';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nominations\" (\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"final\" text\n);\n\nQuestion: Who is no.3 when Claudio Sylvie is no.1?"
},
{
"role": "assistant",
"content": "SELECT \"no_3\" FROM \"nominations\" WHERE \"no_1\"='claudio sylvie';"
}
]
|
[
{
"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 score of the game when the record was 18-20?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='18-20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: What Men's double held together with Women's singles of camilla martin?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"past_winners\" WHERE \"women_s_singles\"='camilla martin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who played in the Mixed Doubles when Zhu Lin played in the Women's Singles?"
},
{
"role": "assistant",
"content": "SELECT \"mixed_doubles\" FROM \"previous_winners\" WHERE \"women_s_singles\"='zhu lin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who was on the Men's Doubles Team in 2002?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"previous_winners\" WHERE \"year\"=2002;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"previous_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Which year did Aya Ohori play in the Women's Singles?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"previous_winners\" WHERE \"women_s_singles\"='aya ohori';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_8\" (\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who was the Partner for Flavio Cipolla Simone Vagnozzi Opponents in the final?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_8\" WHERE \"opponents_in_the_final\"='flavio cipolla simone vagnozzi';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_8\" (\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who were the Opponents in the final that played on a carpet (i) Surface?"
},
{
"role": "assistant",
"content": "SELECT \"opponents_in_the_final\" FROM \"doubles_8\" WHERE \"surface\"='carpet (i)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_8\" (\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Played on Clay Surface, what was the Score of the Dortmund Tournament?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"doubles_8\" WHERE \"surface\"='clay' AND \"tournament\"='dortmund';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_8\" (\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who is Partner Frederik Nielsen's Opponents in the final?"
},
{
"role": "assistant",
"content": "SELECT \"opponents_in_the_final\" FROM \"doubles_8\" WHERE \"partner\"='frederik nielsen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_8\" (\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is Partner Tomas Behrend's Score in the final?"
},
{
"role": "assistant",
"content": "SELECT \"score_in_the_final\" FROM \"doubles_8\" WHERE \"partner\"='tomas behrend';"
}
]
|
[
{
"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: What Country does Larry Mize play for?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"player\"='larry mize';"
}
]
|
[
{
"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: What is the winning total from 1976?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"missed_the_cut\" WHERE \"year_s_won\"='1976';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_1995\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: What year was owner Michael E. Pegram's last win?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"winners_since_1995\" WHERE \"owner\"='michael e. pegram';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_1995\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: Who is the trainer for Cherry Valley Farm?"
},
{
"role": "assistant",
"content": "SELECT \"trainer\" FROM \"winners_since_1995\" WHERE \"owner\"='cherry valley farm';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners_since_1995\" (\n \"year\" real,\n \"winner\" text,\n \"jockey\" text,\n \"trainer\" text,\n \"owner\" text,\n \"time\" text\n);\n\nQuestion: Who owned winner Blueeyesintherein after 2009?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"winners_since_1995\" WHERE \"year\">2009 AND \"winner\"='blueeyesintherein';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Who was the Blue Jays' opponent when their record was 33-15?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='33-15';"
}
]
|
[
{
"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 \"record\" text\n);\n\nQuestion: Who did the Blue Jays lose to when their record was 36-20?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='36-20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the rank of the qual 141.471?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"qual\"='141.471';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the start of lap 55?"
},
{
"role": "assistant",
"content": "SELECT \"start\" FROM \"indy_500_results\" WHERE \"laps\"=55;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is rank of the year 1956?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"year\"='1956';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the lap number for the rank of 13?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"indy_500_results\" WHERE \"rank\"='13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the rank for 1961?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"year\"='1961';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the sum of the lap with a finish of 24?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"laps\") FROM \"indy_500_results\" WHERE \"finish\"='24';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"discography\" (\n \"album_or_song\" text,\n \"band\" text,\n \"memebrship\" text,\n \"role\" text,\n \"year\" real\n);\n\nQuestion: Which band plays Self Versus Self - Immersion?"
},
{
"role": "assistant",
"content": "SELECT \"band\" FROM \"discography\" WHERE \"album_or_song\"='self versus self - immersion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What Event used submission (rear naked choke) with 9-4?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"method\"='submission (rear naked choke)' AND \"record\"='9-4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"location\" text\n);\n\nQuestion: What event was Donald Ouimet involved?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='donald ouimet';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What event did she finish 3rd in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"senior\" WHERE \"position\"='3rd' AND \"year\"=2010;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senior\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What year did she compete in tampere, finland?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"senior\" WHERE \"venue\"='tampere, finland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Ben Hogan with a score larger than 66 had a place listed of what?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"first_round\" WHERE \"score\">66 AND \"player\"='ben hogan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: With a score of 70, this player's name is listed as what?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"score\"=70;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: With a score smaller than 71 along with a place of t6, what is the To par score?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"score\"<71 AND \"place\"='t6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities\" (\n \"city\" text,\n \"hanzi\" text,\n \"hanyu_pinyin\" text,\n \"regional_population_2010\" text,\n \"gdp_2011_billion_yuan\" real\n);\n\nQuestion: Which Hanyu Pinyin has a GDP in 2011 larger than 688.02 billion yuan and a regional population of 8,700,400 in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"hanyu_pinyin\" FROM \"cities\" WHERE \"gdp_2011_billion_yuan\">688.02 AND \"regional_population_2010\"='8,700,400';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cities\" (\n \"city\" text,\n \"hanzi\" text,\n \"hanyu_pinyin\" text,\n \"regional_population_2010\" text,\n \"gdp_2011_billion_yuan\" real\n);\n\nQuestion: Which Hanzi has a Regional Population of 4,591,972 in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"hanzi\" FROM \"cities\" WHERE \"regional_population_2010\"='4,591,972';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What is the Name of the person from the Netherlands in a Lane lower than 5, with a Rank better than 5, and a time of less than 55.62?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"semifinal_2\" WHERE \"rank\"<5 AND \"time\"<55.62 AND \"lane\"<5 AND \"nationality\"='netherlands';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What is the highest Rank of Karen Pickering when she had a time of less than 55.71?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"semifinal_2\" WHERE \"name\"='karen pickering' AND \"time\"<55.71;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: What is the highest Lane number of a person with a time of 55.94 with a Rank that's bigger than 8?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lane\") FROM \"semifinal_2\" WHERE \"time\">55.94 AND \"rank\">8;"
}
]
|
[
{
"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 game that had a loss of Burns (0-1)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='burns (0-1)';"
}
]
|
[
{
"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 game when the record was 20-16?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='20-16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the loss of the game that had an attendance of 18,769?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"attendance\"='18,769';"
}
]
|
[
{
"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 game that had a loss of Geisel (0-1)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='geisel (0-1)';"
}
]
|
[
{
"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 is the date of the game against the Royals that had an attendance of 12,699?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='royals' AND \"attendance\"='12,699';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: When Regions center has a rank less than 11, what is the greatest number o floors?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"floors\") FROM \"tallest_buildings\" WHERE \"name\"='regions center' AND \"rank\"<11;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the average rank for a building with 24 floors?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"tallest_buildings\" WHERE \"floors\"=24;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the rank for Omni nashville hotel?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"tallest_buildings\" WHERE \"name\"='omni nashville hotel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What is the greatest rank for Fifth third center?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"tallest_buildings\" WHERE \"name\"='fifth third center';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" real,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: When a building is 292 (89) ft (m) tall, has less than 23 floors, and ranks less than 14, what is the average year?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"tallest_buildings\" WHERE \"floors\"<23 AND \"height_ft_m\"='292 (89)' AND \"rank\"<14;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_summaries\" (\n \"date\" text,\n \"visiting_team\" text,\n \"home_team\" text,\n \"stadium\" text,\n \"regular_season_preseason\" text\n);\n\nQuestion: What type of regular season/preseason game was played on August 25, 2007?"
},
{
"role": "assistant",
"content": "SELECT \"regular_season_preseason\" FROM \"game_summaries\" WHERE \"date\"='august 25, 2007';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_summaries\" (\n \"date\" text,\n \"visiting_team\" text,\n \"home_team\" text,\n \"stadium\" text,\n \"regular_season_preseason\" text\n);\n\nQuestion: In what stadium was the game on August 22, 2008 played?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"game_summaries\" WHERE \"date\"='august 22, 2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_summaries\" (\n \"date\" text,\n \"visiting_team\" text,\n \"home_team\" text,\n \"stadium\" text,\n \"regular_season_preseason\" text\n);\n\nQuestion: In what stadium was the home team Dallas Cowboys 21?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"game_summaries\" WHERE \"home_team\"='dallas cowboys 21';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_summaries\" (\n \"date\" text,\n \"visiting_team\" text,\n \"home_team\" text,\n \"stadium\" text,\n \"regular_season_preseason\" text\n);\n\nQuestion: On what date was the home team the Dallas Cowboys 34?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_summaries\" WHERE \"home_team\"='dallas cowboys 34';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_summaries\" (\n \"date\" text,\n \"visiting_team\" text,\n \"home_team\" text,\n \"stadium\" text,\n \"regular_season_preseason\" text\n);\n\nQuestion: Who was the visiting team on October 15, 2006?"
},
{
"role": "assistant",
"content": "SELECT \"visiting_team\" FROM \"game_summaries\" WHERE \"date\"='october 15, 2006';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.