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 \"singles_5_6\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What round had a result of 6\u20137 (6\u20138) , 1\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"singles_5_6\" WHERE \"result\"='6\u20137 (6\u20138) , 1\u20136';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_6\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Who was the opponent when the result was 7\u20136 (7\u20135) , 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_5_6\" WHERE \"result\"='7\u20136 (7\u20135) , 6\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_5_6\" (\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"surface\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What clay surface edition had an opponent of miho saeki?"
},
{
"role": "assistant",
"content": "SELECT \"edition\" FROM \"singles_5_6\" WHERE \"surface\"='clay' AND \"opponent\"='miho saeki';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is To par, when Country is \"Spain\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"country\"='spain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Country, when Player is \"Jos\u00e9 Mar\u00eda Olaz\u00e1bal\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='jos\u00e9 mar\u00eda olaz\u00e1bal';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Place, when Player is \"John Cook\"?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='john cook';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Score, when Country is \"United States\", and when Player is \"Raymond Floyd\"?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"second_round\" WHERE \"country\"='united states' AND \"player\"='raymond floyd';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is To par, when Player is \"Larry Rinker\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='larry rinker';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Country, when Place is \"T8\", and when Score is \"70-67=137\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t8' AND \"score\"='70-67=137';"
}
]
|
[
{
"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: What Country is player Sandy Lyle from when she scored less than 69?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"score\"<69 AND \"player\"='sandy lyle';"
}
]
|
[
{
"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: What is the to par of Philip Parkin?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"player\"='philip parkin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"round\" text,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the lowest attendance was the opponent was chelsea?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"fa_cup\" WHERE \"opponent\"='chelsea';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hungary\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is the Date of Birth of the CB Player with a Height of m (ft 4in)?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_birth\" FROM \"hungary\" WHERE \"pos\"='cb' AND \"height\"='m (ft 4in)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which country had a t4 place and scored 66-73=139?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t4' AND \"score\"='66-73=139';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who placed t1 in Scotland?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"place\"='t1' AND \"country\"='scotland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who had a to par of e and scored 71-69=140?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"second_round\" WHERE \"to_par\"='e' AND \"score\"='71-69=140';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is the to par for t10 and Colin Montgomerie?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"place\"='t10' AND \"player\"='colin montgomerie';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What country scored 71-69=140?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"second_round\" WHERE \"score\"='71-69=140';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text\n);\n\nQuestion: What week's game had a result of bye?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"regular_season\" WHERE \"result\"='bye';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text\n);\n\nQuestion: What was the record at week 9?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"week\"='9';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the to par of player vijay singh?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"player\"='vijay singh';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Who is the player with playoff money from the United States?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"money\"='playoff' AND \"country\"='united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the place of the player from New Zealand?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_round\" WHERE \"country\"='new zealand';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the to par of the player from the United States with a t1 place?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"country\"='united states' AND \"place\"='t1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: How much money does the player with a 72-70-71-72=285 score have?"
},
{
"role": "assistant",
"content": "SELECT \"money\" FROM \"final_round\" WHERE \"score\"='72-70-71-72=285';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"overall_record\" text,\n \"ncaat_record\" text\n);\n\nQuestion: What is the save of the game with a 7-6 score?"
},
{
"role": "assistant",
"content": "SELECT \"save\" FROM \"schedule_results\" WHERE \"score\"='7-6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"overall_record\" text,\n \"ncaat_record\" text\n);\n\nQuestion: What is the save of the game where moran (1-2) lost?"
},
{
"role": "assistant",
"content": "SELECT \"save\" FROM \"schedule_results\" WHERE \"loss\"='moran (1-2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"overall_record\" text,\n \"ncaat_record\" text\n);\n\nQuestion: Who was the opponent on June 15?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_results\" WHERE \"date\"='june 15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_results\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"site_stadium\" text,\n \"loss\" text,\n \"save\" text,\n \"attendance\" real,\n \"overall_record\" text,\n \"ncaat_record\" text\n);\n\nQuestion: What is the save of the game with rice as the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"save\" FROM \"schedule_results\" WHERE \"opponent\"='rice';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the lowest Goals Agains, when Played is greater than 34?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals_against\") FROM \"second_division_final_table\" WHERE \"played\">34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the lowest Lost, when Goals For is greater than 52, when Points 1 is \"44\", and when Drawn is less than 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"lost\") FROM \"second_division_final_table\" WHERE \"goals_for\">52 AND \"points_1\"='44' AND \"drawn\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"second_division_final_table\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" text,\n \"points_1\" text\n);\n\nQuestion: What is the total number of Lost, when Played is less than 34?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"second_division_final_table\" WHERE \"played\"<34;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"solo_singles\" (\n \"year\" real,\n \"song\" text,\n \"u_s_hot_100\" text,\n \"u_s_r_b\" text,\n \"u_s_hot_adult_cont\" text,\n \"album\" text\n);\n\nQuestion: Which song has a U.S. R&B 100 in 2010?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"solo_singles\" WHERE \"year\"=2010 AND \"u_s_r_b\"='100';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"team\" text,\n \"matches\" real,\n \"wins\" real,\n \"wins_pct\" text,\n \"draws\" real,\n \"draws_pct\" text,\n \"losses\" real,\n \"losses_pct\" text,\n \"against\" real\n);\n\nQuestion: What is the Lowest value in Against with Wins % of 50.4% and Losses less than 20?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"against\") FROM \"overall\" WHERE \"wins_pct\"='50.4%' AND \"losses\"<20;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"overall\" (\n \"team\" text,\n \"matches\" real,\n \"wins\" real,\n \"wins_pct\" text,\n \"draws\" real,\n \"draws_pct\" text,\n \"losses\" real,\n \"losses_pct\" text,\n \"against\" real\n);\n\nQuestion: Which Losses have a Wins % of 48.6%?"
},
{
"role": "assistant",
"content": "SELECT \"losses\" FROM \"overall\" WHERE \"wins_pct\"='48.6%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_doubles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What is the Champion at Sopot prior to 2006 with a Score of 6\u20134, 6\u20137(7), 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"men_s_doubles\" WHERE \"location\"='sopot' AND \"year\"<2006 AND \"score\"='6\u20134, 6\u20137(7), 6\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_doubles\" (\n \"location\" text,\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: In what Year was the match at Sopot with a Score of 2\u20136, 6\u20132, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"men_s_doubles\" WHERE \"location\"='sopot' AND \"score\"='2\u20136, 6\u20132, 6\u20133';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which Team has Podiums of 0, and a Position of nc\u2020?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"career_summary\" WHERE \"podiums\"='0' AND \"position\"='nc\u2020';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which Wins has a Team of scuderia toro rosso, Poles of 0, and Races of 16?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"career_summary\" WHERE \"team\"='scuderia toro rosso' AND \"poles\"='0' AND \"races\"='16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which Season has Podiums of 0, and Races of 16?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"season\") FROM \"career_summary\" WHERE \"podiums\"='0' AND \"races\"='16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"team\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: Which Wins has Podiums of 0, and a Series of masters of formula 3?"
},
{
"role": "assistant",
"content": "SELECT \"wins\" FROM \"career_summary\" WHERE \"podiums\"='0' AND \"series\"='masters of formula 3';"
}
]
|
[
{
"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 method used when the time was 4:52?"
},
{
"role": "assistant",
"content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='4:52';"
}
]
|
[
{
"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 result when the time was 4:15?"
},
{
"role": "assistant",
"content": "SELECT \"res\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='4:15';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"nhl_team\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Which NHL team chose an American player from the United States Hockey League?"
},
{
"role": "assistant",
"content": "SELECT \"nhl_team\" FROM \"round_four\" WHERE \"nationality\"='united states' AND \"league_from\"='united states hockey league';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"nhl_team\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: What is the nationality of player Jani Hakanpaa?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"round_four\" WHERE \"player\"='jani hakanpaa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"nhl_team\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: From which league is the player chosen by the Atlanta Thrashers (from Dallas) 6?"
},
{
"role": "assistant",
"content": "SELECT \"league_from\" FROM \"round_four\" WHERE \"nhl_team\"='atlanta thrashers (from dallas) 6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"north_carolina_counties_ranked_by_per_ca\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What median family income has a population greater than 93,643, with cleveland as the county?"
},
{
"role": "assistant",
"content": "SELECT \"median_family_income\" FROM \"north_carolina_counties_ranked_by_per_ca\" WHERE \"population\">'93,643' AND \"county\"='cleveland';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"north_carolina_counties_ranked_by_per_ca\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: How many households have yadkin as the county?"
},
{
"role": "assistant",
"content": "SELECT \"number_of_households\" FROM \"north_carolina_counties_ranked_by_per_ca\" WHERE \"county\"='yadkin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nba\" (\n \"year\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nba_club\" text\n);\n\nQuestion: What is the highest pick for a year after 2010, and a round smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"team_players_drafted_into_the_nba\" WHERE \"year\">2010 AND \"round\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nba\" (\n \"year\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nba_club\" text\n);\n\nQuestion: What is the highest pick for a year after 2010 and a round larger than 1?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick\") FROM \"team_players_drafted_into_the_nba\" WHERE \"year\">2010 AND \"round\">1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"team_players_drafted_into_the_nba\" (\n \"year\" real,\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nba_club\" text\n);\n\nQuestion: What is the sum for the pick of the year 2009, and a round smaller than 2 and an NBA Club Denver Nuggets?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick\") FROM \"team_players_drafted_into_the_nba\" WHERE \"year\"=2009 AND \"round\"<2 AND \"nba_club\"='denver nuggets';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_of_moments_by_decades\" (\n \"first_round\" text,\n \"semifinals\" real,\n \"conference_finals\" real,\n \"finals\" real,\n \"total\" real\n);\n\nQuestion: Can you tell me the total number of Total that has the First round of 0, and the Finals smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"numbers_of_moments_by_decades\" WHERE \"first_round\"='0' AND \"finals\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_of_moments_by_decades\" (\n \"first_round\" text,\n \"semifinals\" real,\n \"conference_finals\" real,\n \"finals\" real,\n \"total\" real\n);\n\nQuestion: Can you tell me the average Conference Finals that has Finals smaller than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"conference_finals\") FROM \"numbers_of_moments_by_decades\" WHERE \"finals\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"numbers_of_moments_by_decades\" (\n \"first_round\" text,\n \"semifinals\" real,\n \"conference_finals\" real,\n \"finals\" real,\n \"total\" real\n);\n\nQuestion: Can you tell me the Finals that has the Conference Finals smaller than 12, and the Semifinals of 0, and the Total of 3?"
},
{
"role": "assistant",
"content": "SELECT \"finals\" FROM \"numbers_of_moments_by_decades\" WHERE \"conference_finals\"<12 AND \"semifinals\"=0 AND \"total\"=3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"faculty_and_staff\" (\n \"data\" text,\n \"headcount\" real,\n \"percent_of_total\" text,\n \"less_than_25_000\" text,\n \"25_000_to_40_000\" text,\n \"40_000_to_50_000\" text,\n \"50_000_to_60_000\" text,\n \"60_000_to_70_000\" text,\n \"70_000_to_80_000\" text,\n \"more_than_80_000\" text,\n \"mean\" text\n);\n\nQuestion: What's the sum of the headcounts that have an n/a value of $60k to $70K?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"headcount\") FROM \"faculty_and_staff\" WHERE \"60_000_to_70_000\"='n/a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"faculty_and_staff\" (\n \"data\" text,\n \"headcount\" real,\n \"percent_of_total\" text,\n \"less_than_25_000\" text,\n \"25_000_to_40_000\" text,\n \"40_000_to_50_000\" text,\n \"50_000_to_60_000\" text,\n \"60_000_to_70_000\" text,\n \"70_000_to_80_000\" text,\n \"more_than_80_000\" text,\n \"mean\" text\n);\n\nQuestion: What's the mean of the $70-80k ones that have 2.80%?"
},
{
"role": "assistant",
"content": "SELECT \"mean\" FROM \"faculty_and_staff\" WHERE \"70_000_to_80_000\"='2.80%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"faculty_and_staff\" (\n \"data\" text,\n \"headcount\" real,\n \"percent_of_total\" text,\n \"less_than_25_000\" text,\n \"25_000_to_40_000\" text,\n \"40_000_to_50_000\" text,\n \"50_000_to_60_000\" text,\n \"60_000_to_70_000\" text,\n \"70_000_to_80_000\" text,\n \"more_than_80_000\" text,\n \"mean\" text\n);\n\nQuestion: Which have more than $80k and a total percent of 2.2%?"
},
{
"role": "assistant",
"content": "SELECT \"more_than_80_000\" FROM \"faculty_and_staff\" WHERE \"percent_of_total\"='2.2%';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"faculty_and_staff\" (\n \"data\" text,\n \"headcount\" real,\n \"percent_of_total\" text,\n \"less_than_25_000\" text,\n \"25_000_to_40_000\" text,\n \"40_000_to_50_000\" text,\n \"50_000_to_60_000\" text,\n \"60_000_to_70_000\" text,\n \"70_000_to_80_000\" text,\n \"more_than_80_000\" text,\n \"mean\" text\n);\n\nQuestion: What's the total percent of the $40-50K ones that have n/a?"
},
{
"role": "assistant",
"content": "SELECT \"percent_of_total\" FROM \"faculty_and_staff\" WHERE \"40_000_to_50_000\"='n/a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_number_s\" text\n);\n\nQuestion: Which Label has a Country of canada, and a Format of cd/digital download?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"country\"='canada' AND \"format\"='cd/digital download';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_number_s\" text\n);\n\nQuestion: Which Format has a Date of 14 october 2008, and a Label of eagle eye media?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"date\"='14 october 2008' AND \"label\"='eagle eye media';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_number_s\" text\n);\n\nQuestion: Which Label has a Country of united kingdom, a Date of 22 september 2008, and a Catalogue number(s) of eredv711?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"country\"='united kingdom' AND \"date\"='22 september 2008' AND \"catalogue_number_s\"='eredv711';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_number_s\" text\n);\n\nQuestion: Which Country has a Catalogue number(s) of eredv711?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"release_history\" WHERE \"catalogue_number_s\"='eredv711';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_number_s\" text\n);\n\nQuestion: Which Format has a Label of eagle eye media, a Catalogue number(s) of \u2014, and a Country of united states?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"label\"='eagle eye media' AND \"catalogue_number_s\"='\u2014' AND \"country\"='united states';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_number_s\" text\n);\n\nQuestion: Which Format has a Label of eagle records, and a Catalogue number(s) of edgcd391?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"label\"='eagle records' AND \"catalogue_number_s\"='edgcd391';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greece\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is the Height of the Player with a Date of Birth of 1978-02-16?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"greece\" WHERE \"date_of_birth\"='1978-02-16';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greece\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is the Name of the D Player born on 1983-07-19?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"greece\" WHERE \"pos\"='d' AND \"date_of_birth\"='1983-07-19';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"greece\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: What is Eftychia Karagianni Pos.?"
},
{
"role": "assistant",
"content": "SELECT \"pos\" FROM \"greece\" WHERE \"name\"='eftychia karagianni';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_songlist\" (\n \"track\" real,\n \"song_title\" text,\n \"artist\" text,\n \"album\" text,\n \"legends_track\" text\n);\n\nQuestion: What is the track that from lcd soundsystem?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"main_songlist\" WHERE \"artist\"='lcd soundsystem';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"player\" text,\n \"position\" text,\n \"ekstraklasa\" real,\n \"polish_cup\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of UEFA Cup(s), when Total is greater than 3?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"uefa_cup\") FROM \"most_appearances\" WHERE \"total\">3;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"player\" text,\n \"position\" text,\n \"ekstraklasa\" real,\n \"polish_cup\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Polish Cup, when Position is \"Midfielder\", when Player is \"Miroslav Radovi\u0107\", and when Ekstraklasa is less than 1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"polish_cup\") FROM \"most_appearances\" WHERE \"position\"='midfielder' AND \"player\"='miroslav radovi\u0107' AND \"ekstraklasa\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"player\" text,\n \"position\" text,\n \"ekstraklasa\" real,\n \"polish_cup\" real,\n \"uefa_cup\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of Polish Cup, when Player is \"Maciej Iwa\u0144ski\", and when Ekstraklasa is less than 1?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"polish_cup\") FROM \"most_appearances\" WHERE \"player\"='maciej iwa\u0144ski' AND \"ekstraklasa\"<1;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What Election has a 2nd Member of frederick knight, and a 1st Member of sir edmund lechmere, bt?"
},
{
"role": "assistant",
"content": "SELECT \"election\" FROM \"m_ps_1832_1885\" WHERE \"2nd_member\"='frederick knight' AND \"1st_member\"='sir edmund lechmere, bt';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What 2nd Member has a 1st Party of conservative, and a 1st Member of william edward dowdeswell?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_member\" FROM \"m_ps_1832_1885\" WHERE \"1st_party\"='conservative' AND \"1st_member\"='william edward dowdeswell';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What 2nd Party has an Election of 1885?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_party\" FROM \"m_ps_1832_1885\" WHERE \"election\"='1885';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What 2nd Party has an Election of 1834?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_party\" FROM \"m_ps_1832_1885\" WHERE \"election\"='1834';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What 2nd Member has a 2nd Party of conservative, and an Election of 1853 by-election?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_member\" FROM \"m_ps_1832_1885\" WHERE \"2nd_party\"='conservative' AND \"election\"='1853 by-election';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"m_ps_1832_1885\" (\n \"election\" text,\n \"1st_member\" text,\n \"1st_party\" text,\n \"2nd_member\" text,\n \"2nd_party\" text\n);\n\nQuestion: What 2nd Member has an Election of 1833 by-election?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_member\" FROM \"m_ps_1832_1885\" WHERE \"election\"='1833 by-election';"
}
]
|
[
{
"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: Golfer Steve Pate has what To par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"player\"='steve pate';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the score when they played the Boston Patriots?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"regular_season\" WHERE \"opponent\"='boston patriots';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_goals_in_a_la_liga_season_at_least_\" (\n \"rank\" real,\n \"name\" text,\n \"season\" text,\n \"club\" text,\n \"goals\" real,\n \"apps\" real,\n \"goals_per_match\" real\n);\n\nQuestion: How many apps for the rank of 8 in the 2012/13 season?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"apps\") FROM \"most_goals_in_a_la_liga_season_at_least_\" WHERE \"rank\"=8 AND \"season\"='2012/13';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_goals_in_a_la_liga_season_at_least_\" (\n \"rank\" real,\n \"name\" text,\n \"season\" text,\n \"club\" text,\n \"goals\" real,\n \"apps\" real,\n \"goals_per_match\" real\n);\n\nQuestion: How many goals per match when the player has more than 33 goals and more than 38 apps?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_per_match\") FROM \"most_goals_in_a_la_liga_season_at_least_\" WHERE \"goals\">33 AND \"apps\">38;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text,\n \"city\" text,\n \"venue\" text\n);\n\nQuestion: What was the score when Nacional was the champion, River Plate was the runner-up, and the venue was Centenario?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"finals\" WHERE \"champion\"='nacional' AND \"venue\"='centenario' AND \"runner_up\"='river plate';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text,\n \"city\" text,\n \"venue\" text\n);\n\nQuestion: Who was the champion when atl\u00e9tico wanderers was the runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"champion\" FROM \"finals\" WHERE \"runner_up\"='atl\u00e9tico wanderers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals\" (\n \"year\" real,\n \"champion\" text,\n \"runner_up\" text,\n \"score\" text,\n \"city\" text,\n \"venue\" text\n);\n\nQuestion: In which city is the San Lorenzo Centenario venue located?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"finals\" WHERE \"venue\"='san lorenzo centenario';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_finals_9_4_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: The game played 31 May 2010 was played on what surface?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"singles_finals_9_4_5\" WHERE \"date\"='31 may 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_finals_9_4_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What tournament was played 16 September 2012?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"singles_finals_9_4_5\" WHERE \"date\"='16 september 2012';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_finals_9_4_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What is the score of the game played 26 July 2010?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"singles_finals_9_4_5\" WHERE \"date\"='26 july 2010';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_finals_9_4_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: The match against Paul-Henri Mathieu had what outcome?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"singles_finals_9_4_5\" WHERE \"opponent\"='paul-henri mathieu';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is South Africa's to par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"country\"='south africa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Who had a finish of t20?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"finish\"='t20';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"primary_education_statistics_by_district\" (\n \"measure\" text,\n \"bombali\" real,\n \"bonthe\" real,\n \"kailahun\" real,\n \"kambia\" text,\n \"kenema\" real,\n \"koinadugu\" real,\n \"kono\" real,\n \"moyamba\" text,\n \"port_loko\" text,\n \"pujehun\" real,\n \"tonkolili\" real\n);\n\nQuestion: What is the average pjehun measured by female enrollment?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pujehun\") FROM \"primary_education_statistics_by_district\" WHERE \"measure\"='female enrollment';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"primary_education_statistics_by_district\" (\n \"measure\" text,\n \"bombali\" real,\n \"bonthe\" real,\n \"kailahun\" real,\n \"kambia\" text,\n \"kenema\" real,\n \"koinadugu\" real,\n \"kono\" real,\n \"moyamba\" text,\n \"port_loko\" text,\n \"pujehun\" real,\n \"tonkolili\" real\n);\n\nQuestion: What is the highest pjuehun with a kenema greater than 559, a kambia of 45,653, and a tonkolili greater than 113,926?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pujehun\") FROM \"primary_education_statistics_by_district\" WHERE \"kenema\">559 AND \"kambia\"='45,653' AND \"tonkolili\">'113,926';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"primary_education_statistics_by_district\" (\n \"measure\" text,\n \"bombali\" real,\n \"bonthe\" real,\n \"kailahun\" real,\n \"kambia\" text,\n \"kenema\" real,\n \"koinadugu\" real,\n \"kono\" real,\n \"moyamba\" text,\n \"port_loko\" text,\n \"pujehun\" real,\n \"tonkolili\" real\n);\n\nQuestion: What is the sum of the kono with a bonthe greater than 21,238?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"kono\") FROM \"primary_education_statistics_by_district\" WHERE \"bonthe\">'21,238';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"united_states_house_of_representatives_e\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What party is the person who was first elected in 2000 and was re-elected?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"united_states_house_of_representatives_e\" WHERE \"results\"='re-elected' AND \"first_elected\"=2000;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nagano_round\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: Which report has a Set 3 value of 21\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"nagano_round\" WHERE \"set_3\"='21\u201325';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nagano_round\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: What was the Time when Set 3 was 25\u201314?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"nagano_round\" WHERE \"set_3\"='25\u201314';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"nagano_round\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: When was there a Time of 18:00, and a Set 1 of 22\u201325?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"nagano_round\" WHERE \"time\"='18:00' AND \"set_1\"='22\u201325';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"name\" text,\n \"years\" text,\n \"mls_cup\" real,\n \"u_s_open_cup\" real,\n \"concacaf\" real,\n \"other\" real,\n \"total\" real\n);\n\nQuestion: How many Totals have a CONCACAF of 0, and an MLS Cup smaller than 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"most_appearances\" WHERE \"concacaf\"=0 AND \"mls_cup\"<6;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"name\" text,\n \"years\" text,\n \"mls_cup\" real,\n \"u_s_open_cup\" real,\n \"concacaf\" real,\n \"other\" real,\n \"total\" real\n);\n\nQuestion: Which MLS Cup has another larger than 9, and a Total smaller than 72?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"mls_cup\") FROM \"most_appearances\" WHERE \"other\">9 AND \"total\"<72;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"original_title\" text,\n \"film_title_used_in_nomination\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What year has a not nominated result and a nomination title of \"the color of fame\"?"
},
{
"role": "assistant",
"content": "SELECT \"year_ceremony\" FROM \"submissions\" WHERE \"result\"='not nominated' AND \"film_title_used_in_nomination\"='the color of fame';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.