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 \"top_goalscorers\" (\n \"rank\" real,\n \"player\" text,\n \"club_s\" text,\n \"year_s\" text,\n \"u_17_goals\" real\n);\n\nQuestion: What is the highest Rank, when U-17 Goals is \"7\", and when Player is \"Cesc F\u00e0bregas\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"top_goalscorers\" WHERE \"u_17_goals\"=7 AND \"player\"='cesc f\u00e0bregas';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_goalscorers\" (\n \"rank\" real,\n \"player\" text,\n \"club_s\" text,\n \"year_s\" text,\n \"u_17_goals\" real\n);\n\nQuestion: What is the highest Rank, when U-17 Goals is \"9\"?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"top_goalscorers\" WHERE \"u_17_goals\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What Competition has a Result of Draw?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"result\"='draw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the Date of the Competition with a Score of 1\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"score\"='1\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What New Delhi Competition has a Result of Loss?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='new delhi' AND \"result\"='loss';"
}
] |
[
{
"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: How many rounds in the event when record is 1-5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"mixed_martial_arts_record\" WHERE \"record\"='1-5';"
}
] |
[
{
"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: Who is the opponent when there is a win in round greater than 1 and the record is 42-27-10?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"round\">1 AND \"record\"='42-27-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"co_hort_teams\" (\n \"team_a\" text,\n \"team_c\" text,\n \"team_d\" text,\n \"team_e\" text,\n \"team_f\" text\n);\n\nQuestion: Who is team E when Jason Manning is Team F?"
},
{
"role": "assistant",
"content": "SELECT \"team_e\" FROM \"co_hort_teams\" WHERE \"team_f\"='jason manning';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"co_hort_teams\" (\n \"team_a\" text,\n \"team_c\" text,\n \"team_d\" text,\n \"team_e\" text,\n \"team_f\" text\n);\n\nQuestion: Who is Team A when wilma hofschneider-david is team C?"
},
{
"role": "assistant",
"content": "SELECT \"team_a\" FROM \"co_hort_teams\" WHERE \"team_c\"='wilma hofschneider-david';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"co_hort_teams\" (\n \"team_a\" text,\n \"team_c\" text,\n \"team_d\" text,\n \"team_e\" text,\n \"team_f\" text\n);\n\nQuestion: Who is team f when Aida Gagaring is team A?"
},
{
"role": "assistant",
"content": "SELECT \"team_f\" FROM \"co_hort_teams\" WHERE \"team_a\"='aida gagaring';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"co_hort_teams\" (\n \"team_a\" text,\n \"team_c\" text,\n \"team_d\" text,\n \"team_e\" text,\n \"team_f\" text\n);\n\nQuestion: Who is Team D when Carmen Ada is team C?"
},
{
"role": "assistant",
"content": "SELECT \"team_d\" FROM \"co_hort_teams\" WHERE \"team_c\"='carmen ada';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"co_hort_teams\" (\n \"team_a\" text,\n \"team_c\" text,\n \"team_d\" text,\n \"team_e\" text,\n \"team_f\" text\n);\n\nQuestion: Who is team e when Aaron Solloway is team D?"
},
{
"role": "assistant",
"content": "SELECT \"team_e\" FROM \"co_hort_teams\" WHERE \"team_d\"='aaron solloway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"co_hort_teams\" (\n \"team_a\" text,\n \"team_c\" text,\n \"team_d\" text,\n \"team_e\" text,\n \"team_f\" text\n);\n\nQuestion: Who is team c when dhez javier is team e?"
},
{
"role": "assistant",
"content": "SELECT \"team_c\" FROM \"co_hort_teams\" WHERE \"team_e\"='dhez javier';"
}
] |
[
{
"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 was the country of the player at +5?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"to_par\"='+5';"
}
] |
[
{
"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: Which player finished at +4?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"to_par\"='+4';"
}
] |
[
{
"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 was Bert Yancey's finishing score to par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"player\"='bert yancey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bachelorettes\" (\n \"season\" real,\n \"premiered\" text,\n \"bachelorette\" text,\n \"profile\" text,\n \"winner\" text,\n \"runner_s_up\" text,\n \"proposal\" text\n);\n\nQuestion: Who was the bachelorette of the season where ian mckee was the winner?"
},
{
"role": "assistant",
"content": "SELECT \"bachelorette\" FROM \"bachelorettes\" WHERE \"winner\"='ian mckee';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bachelorettes\" (\n \"season\" real,\n \"premiered\" text,\n \"bachelorette\" text,\n \"profile\" text,\n \"winner\" text,\n \"runner_s_up\" text,\n \"proposal\" text\n);\n\nQuestion: What is the earliest season with an advertising account manager profile?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"season\") FROM \"bachelorettes\" WHERE \"profile\"='advertising account manager';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bachelorettes\" (\n \"season\" real,\n \"premiered\" text,\n \"bachelorette\" text,\n \"profile\" text,\n \"winner\" text,\n \"runner_s_up\" text,\n \"proposal\" text\n);\n\nQuestion: Who is the bachelorette of the season that premiered on May 24, 2010?"
},
{
"role": "assistant",
"content": "SELECT \"bachelorette\" FROM \"bachelorettes\" WHERE \"premiered\"='may 24, 2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"bachelorettes\" (\n \"season\" real,\n \"premiered\" text,\n \"bachelorette\" text,\n \"profile\" text,\n \"winner\" text,\n \"runner_s_up\" text,\n \"proposal\" text\n);\n\nQuestion: Who is the bachelorette after season 8?"
},
{
"role": "assistant",
"content": "SELECT \"bachelorette\" FROM \"bachelorettes\" WHERE \"season\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_by_conference\" (\n \"conference\" text,\n \"num_of_bids\" real,\n \"record\" text,\n \"win_pct\" text,\n \"round_of_32\" text,\n \"sweet_sixteen\" text,\n \"elite_eight\" text,\n \"final_four\" text,\n \"championship_game\" text\n);\n\nQuestion: When the conference is west coast and the number of bids are at 2, what's the percentage of games won?"
},
{
"role": "assistant",
"content": "SELECT \"win_pct\" FROM \"record_by_conference\" WHERE \"num_of_bids\"=2 AND \"conference\"='west coast';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_by_conference\" (\n \"conference\" text,\n \"num_of_bids\" real,\n \"record\" text,\n \"win_pct\" text,\n \"round_of_32\" text,\n \"sweet_sixteen\" text,\n \"elite_eight\" text,\n \"final_four\" text,\n \"championship_game\" text\n);\n\nQuestion: If a team had a percentage of games won recorded as .429, what Championship Game was played?"
},
{
"role": "assistant",
"content": "SELECT \"championship_game\" FROM \"record_by_conference\" WHERE \"win_pct\"='.429';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance for the game in Week 3?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: On what date was the opponent the Green Bay Packers?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='green bay packers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1912_1914\" (\n \"name\" text,\n \"born_died\" text,\n \"term_start\" text,\n \"term_end\" text,\n \"political_party\" text\n);\n\nQuestion: When did Ismail Qemali Bej's term start?"
},
{
"role": "assistant",
"content": "SELECT \"term_start\" FROM \"1912_1914\" WHERE \"name\"='ismail qemali bej';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1912_1914\" (\n \"name\" text,\n \"born_died\" text,\n \"term_start\" text,\n \"term_end\" text,\n \"political_party\" text\n);\n\nQuestion: When did Fejzi Bej Alizoti's term end?"
},
{
"role": "assistant",
"content": "SELECT \"term_end\" FROM \"1912_1914\" WHERE \"name\"='fejzi bej alizoti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1912_1914\" (\n \"name\" text,\n \"born_died\" text,\n \"term_start\" text,\n \"term_end\" text,\n \"political_party\" text\n);\n\nQuestion: When did the term end for the person who started their term on 28 November 1912?"
},
{
"role": "assistant",
"content": "SELECT \"term_end\" FROM \"1912_1914\" WHERE \"term_start\"='28 november 1912';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1912_1914\" (\n \"name\" text,\n \"born_died\" text,\n \"term_start\" text,\n \"term_end\" text,\n \"political_party\" text\n);\n\nQuestion: When did Fejzi Bej Alizoti's term start?"
},
{
"role": "assistant",
"content": "SELECT \"term_start\" FROM \"1912_1914\" WHERE \"name\"='fejzi bej alizoti';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"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\" real\n);\n\nQuestion: What is the sum of Points 1, when Team is \"Gainsborough Trinity\", and when Played is greater than 46?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points_1\") FROM \"final_table\" WHERE \"team\"='gainsborough trinity' AND \"played\">46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"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\" real\n);\n\nQuestion: What is the total number of Points 1, when Lost is less than 20, and when Goals For is greater than 92?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"points_1\") FROM \"final_table\" WHERE \"lost\"<20 AND \"goals_for\">92;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"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\" real\n);\n\nQuestion: What is the total number of Position, when Played is less than 46?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"position\") FROM \"final_table\" WHERE \"played\"<46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"location\" text,\n \"name_format\" text,\n \"owner\" text\n);\n\nQuestion: Which Location has a Frequency of 102.5 fm?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"radio\" WHERE \"frequency\"='102.5 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"location\" text,\n \"name_format\" text,\n \"owner\" text\n);\n\nQuestion: Which Call sign has a Frequency of 102.5 fm?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"radio\" WHERE \"frequency\"='102.5 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"location\" text,\n \"name_format\" text,\n \"owner\" text\n);\n\nQuestion: Which Owner has a Name / Format of 105.3 kool fm - hot adult contemporary?"
},
{
"role": "assistant",
"content": "SELECT \"owner\" FROM \"radio\" WHERE \"name_format\"='105.3 kool fm - hot adult contemporary';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"location\" text,\n \"name_format\" text,\n \"owner\" text\n);\n\nQuestion: Which Location has a Call sign of cjtw-fm?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"radio\" WHERE \"call_sign\"='cjtw-fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"location\" text,\n \"name_format\" text,\n \"owner\" text\n);\n\nQuestion: Which Frequency has an Owner of rogers communications rogers radio, and a Call sign of cikz-fm?"
},
{
"role": "assistant",
"content": "SELECT \"frequency\" FROM \"radio\" WHERE \"owner\"='rogers communications rogers radio' AND \"call_sign\"='cikz-fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest laps that Vittorio Iannuzzo completed?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"superbike_race_1_classification\" WHERE \"rider\"='vittorio iannuzzo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the total time that it took for the driver to finish 14 laps?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"superbike_race_1_classification\" WHERE \"laps\"=14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the Grid of R\u00e9gis Laconi's bike that is a Kawasaki zx-10r?"
},
{
"role": "assistant",
"content": "SELECT \"grid\" FROM \"superbike_race_1_classification\" WHERE \"bike\"='kawasaki zx-10r' AND \"rider\"='r\u00e9gis laconi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"superbike_race_1_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the name of the bike that has a grid number smaller than 9 with a time of +7.764?"
},
{
"role": "assistant",
"content": "SELECT \"bike\" FROM \"superbike_race_1_classification\" WHERE \"grid\"<9 AND \"time\"='+7.764';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"order\" text,\n \"title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: Who was the French Elector Elevated on 1288, May 16?"
},
{
"role": "assistant",
"content": "SELECT \"elector\" FROM \"cardinal_electors\" WHERE \"nationality\"='french' AND \"elevated\"='1288, may 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"order\" text,\n \"title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What Elector has the Title of Titulus S. Cecilia?"
},
{
"role": "assistant",
"content": "SELECT \"elector\" FROM \"cardinal_electors\" WHERE \"title\"='titulus s. cecilia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"order\" text,\n \"title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the Nationality of the Deacon of S. Maria in Via Lata?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"cardinal_electors\" WHERE \"title\"='deacon of s. maria in via lata';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"order\" text,\n \"title\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What is the Title of Elector Giovanni Boccamazza?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"cardinal_electors\" WHERE \"elector\"='giovanni boccamazza';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the record for the date above 27 and an opponent of the St. Louis Blues?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\">27 AND \"opponent\"='st. louis blues';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" real,\n \"opponent\" text,\n \"score\" text,\n \"decision\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent for a game over 31 and a date over 30?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"game\">31 AND \"date\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" text,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What date did the song by jennifer lopez get issued?"
},
{
"role": "assistant",
"content": "SELECT \"issue_date_s\" FROM \"see_also\" WHERE \"artist\"='jennifer lopez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" text,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What song came from volume:issue 68:20-24?"
},
{
"role": "assistant",
"content": "SELECT \"song\" FROM \"see_also\" WHERE \"volume_issue\"='68:20-24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_summer_olympics_medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of gold medals when there were 2 bronze medals, a total of more than 3 medals and ranked 61?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"gold\") FROM \"2008_summer_olympics_medal_table\" WHERE \"bronze\"=2 AND \"rank\"='61' AND \"total\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_summer_olympics_medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average total number of medals when there were 4 bronze, more than 2 silver, and less than 7 gold medals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"2008_summer_olympics_medal_table\" WHERE \"bronze\"=4 AND \"silver\">2 AND \"gold\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"series_1_2008_ratings\" (\n \"episode\" real,\n \"original_airdate\" text,\n \"timeslot_approx\" text,\n \"viewers_millions\" real,\n \"nightly_rank\" text\n);\n\nQuestion: What is the lowest episode number with an original airdate on 8 June 2008?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"episode\") FROM \"series_1_2008_ratings\" WHERE \"original_airdate\"='8 june 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Who was number 4 when Natalie was number 9?"
},
{
"role": "assistant",
"content": "SELECT \"no_4\" FROM \"female_names\" WHERE \"no_9\"='natalie';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: Who was number 7 when Olivia was number 5 and Emma was number 2?"
},
{
"role": "assistant",
"content": "SELECT \"no_7\" FROM \"female_names\" WHERE \"no_5\"='olivia' AND \"no_2\"='emma';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"female_names\" (\n \"region_year\" text,\n \"no_1\" text,\n \"no_2\" text,\n \"no_3\" text,\n \"no_4\" text,\n \"no_5\" text,\n \"no_6\" text,\n \"no_7\" text,\n \"no_8\" text,\n \"no_9\" text,\n \"no_10\" text\n);\n\nQuestion: When Chloe was number 8, Olivia was number 2, Emma was number 1, and Ava was number 4, who was number 5?"
},
{
"role": "assistant",
"content": "SELECT \"no_5\" FROM \"female_names\" WHERE \"no_8\"='chloe' AND \"no_2\"='olivia' AND \"no_1\"='emma' AND \"no_4\"='ava';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proprietary\" (\n \"name\" text,\n \"company\" text,\n \"platform\" text,\n \"latest_stable_release\" text,\n \"price_in_usd\" text\n);\n\nQuestion: What platform is the company Surfstats Software?"
},
{
"role": "assistant",
"content": "SELECT \"platform\" FROM \"proprietary\" WHERE \"company\"='surfstats software';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proprietary\" (\n \"name\" text,\n \"company\" text,\n \"platform\" text,\n \"latest_stable_release\" text,\n \"price_in_usd\" text\n);\n\nQuestion: What is the USD price for Tealeaf?"
},
{
"role": "assistant",
"content": "SELECT \"price_in_usd\" FROM \"proprietary\" WHERE \"company\"='tealeaf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proprietary\" (\n \"name\" text,\n \"company\" text,\n \"platform\" text,\n \"latest_stable_release\" text,\n \"price_in_usd\" text\n);\n\nQuestion: What is the platform for the latest release 5.0.3?"
},
{
"role": "assistant",
"content": "SELECT \"platform\" FROM \"proprietary\" WHERE \"latest_stable_release\"='5.0.3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"proprietary\" (\n \"name\" text,\n \"company\" text,\n \"platform\" text,\n \"latest_stable_release\" text,\n \"price_in_usd\" text\n);\n\nQuestion: What is the platform for the latest release 8.4?"
},
{
"role": "assistant",
"content": "SELECT \"platform\" FROM \"proprietary\" WHERE \"latest_stable_release\"='8.4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hockey_canada\" (\n \"event\" text,\n \"games_played\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest amount of assists for more than 5 games?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"assists\") FROM \"hockey_canada\" WHERE \"games_played\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hockey_canada\" (\n \"event\" text,\n \"games_played\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: What is the highest amount of points with less than 5 assists and less than 2 goals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"hockey_canada\" WHERE \"assists\"<5 AND \"goals\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hockey_canada\" (\n \"event\" text,\n \"games_played\" real,\n \"goals\" real,\n \"assists\" real,\n \"points\" real\n);\n\nQuestion: How many points on average are there for less than 5 games played?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points\") FROM \"hockey_canada\" WHERE \"games_played\"<5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which opponent has w 17-0 as the result?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='w 17-0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which country has the Narita International Airport?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"destinations\" WHERE \"airport\"='narita international airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the IATA when the ICAO is wipp?"
},
{
"role": "assistant",
"content": "SELECT \"iata\" FROM \"destinations\" WHERE \"icao\"='wipp';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which airport's ICAO is rpvi?"
},
{
"role": "assistant",
"content": "SELECT \"airport\" FROM \"destinations\" WHERE \"icao\"='rpvi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: Which country's IATA is ika?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"destinations\" WHERE \"iata\"='ika';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the ICAO for the Yangon International Airport?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"airport\"='yangon international airport';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"destinations\" (\n \"city\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the ICAO when the IATA is tgg?"
},
{
"role": "assistant",
"content": "SELECT \"icao\" FROM \"destinations\" WHERE \"iata\"='tgg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneo_descentralizado_1966_present\" (\n \"season\" real,\n \"date\" text,\n \"score\" text,\n \"winner\" text,\n \"venue\" text,\n \"competition_round\" text\n);\n\nQuestion: On what date did Universitario win the Torneo Apertura round after 2003 at Estadio Alejandro Villanueva?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"torneo_descentralizado_1966_present\" WHERE \"venue\"='estadio alejandro villanueva' AND \"season\">2003 AND \"competition_round\"='torneo apertura' AND \"winner\"='universitario';"
}
] |
[
{
"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 \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"primary_language_s\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Director, when Primary Language(s) is \"Azerbaijani\", and when Original Title is \"Buta\"?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"submissions\" WHERE \"primary_language_s\"='azerbaijani' AND \"original_title\"='buta';"
}
] |
[
{
"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 \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"primary_language_s\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Film Title Used In Nomination, when Primary Language(s) is \"Azerbaijani, Russian\"?"
},
{
"role": "assistant",
"content": "SELECT \"film_title_used_in_nomination\" FROM \"submissions\" WHERE \"primary_language_s\"='azerbaijani, russian';"
}
] |
[
{
"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 \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"primary_language_s\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Result, when Original Title is \"Qala\"?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"submissions\" WHERE \"original_title\"='qala';"
}
] |
[
{
"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 \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"primary_language_s\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Primary Language(s), when Director is \"Ilgar Safat Category:Articles With hCards\"?"
},
{
"role": "assistant",
"content": "SELECT \"primary_language_s\" FROM \"submissions\" WHERE \"director\"='ilgar safat category:articles with hcards';"
}
] |
[
{
"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 \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"primary_language_s\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Year (Ceremony), when Director is \"Farid Gumbatov Category:Articles With hCards\"?"
},
{
"role": "assistant",
"content": "SELECT \"year_ceremony\" FROM \"submissions\" WHERE \"director\"='farid gumbatov category:articles with hcards';"
}
] |
[
{
"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 \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"primary_language_s\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is Director, when Original Title is \"Sah\u0259\"?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"submissions\" WHERE \"original_title\"='sah\u0259';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: Who was the Home team that had a decider of Conklin?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"playoffs\" WHERE \"decision\"='conklin';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Game 71 was played against what team?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"game\"=71;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the maximum game that was played against the New York Knickerbockers?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"opponent\"='new york knickerbockers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the number of game that was played on March 19?"
},
{
"role": "assistant",
"content": "SELECT \"game\" FROM \"game_log\" WHERE \"date\"='march 19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_summary\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: What is the average rank for more than 12 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"tournament_summary\" WHERE \"points\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_summary\" (\n \"rank\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"losses\" real,\n \"points\" real\n);\n\nQuestion: What is the rank for less than 6 plays?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"tournament_summary\" WHERE \"played\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: For the draft pick from round 3 out of Mercer College what is the nationality?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"round\"=3 AND \"college\"='mercer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: Who was the draft pick that went to college at Oral Roberts?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"college\"='oral roberts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What is the smallest point total when the grid is larger than 5 and the time/retired is fire?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"race\" WHERE \"grid\">5 AND \"time_retired\"='fire';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: When Nelson Philippe drove with a grid larger than 16, what was the timre/retired?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\">16 AND \"driver\"='nelson philippe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was the time of the race that was on a grid smaller than 9 with jeremy mcwilliams as the rider doing 21 laps?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"moto_gp_classification\" WHERE \"grid\"<9 AND \"laps\"=21 AND \"rider\"='jeremy mcwilliams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the lowest grid number that a race took place doing more than 21 laps?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"moto_gp_classification\" WHERE \"laps\">21;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"moto_gp_classification\" (\n \"rider\" text,\n \"manufacturer\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the total number of grids where there were races that had a time of 34:22.335?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"moto_gp_classification\" WHERE \"time_retired\"='34:22.335';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"final\" text\n);\n\nQuestion: Which rank has final with 5:18.85?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"results\" WHERE \"final\"='5:18.85';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"final\" text\n);\n\nQuestion: Which final has rank of 10?"
},
{
"role": "assistant",
"content": "SELECT \"final\" FROM \"results\" WHERE \"rank\"='10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"final\" text\n);\n\nQuestion: Which final has a run of 1:19.49?"
},
{
"role": "assistant",
"content": "SELECT \"final\" FROM \"results\" WHERE \"run_3\"='1:19.49';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"final\" text\n);\n\nQuestion: Which run 2 with final of 5:24.47?"
},
{
"role": "assistant",
"content": "SELECT \"run_2\" FROM \"results\" WHERE \"final\"='5:24.47';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"final\" text\n);\n\nQuestion: Which team has run 1 of 1:17.44?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"results\" WHERE \"run_1\"='1:17.44';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results\" (\n \"rank\" text,\n \"team\" text,\n \"run_1\" text,\n \"run_2\" text,\n \"run_3\" text,\n \"final\" text\n);\n\nQuestion: Which team has run 3 of 1:20.77?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"results\" WHERE \"run_3\"='1:20.77';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Who was the home team when Manchester City was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"away_team\"='manchester city';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What was the score when the home team was Stockport County?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"third_round_proper\" WHERE \"home_team\"='stockport county';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the Tie Number when Barnsley was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"third_round_proper\" WHERE \"away_team\"='barnsley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game that took place on october 22, 1976?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"october\" WHERE \"date\"='october 22, 1976';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game where the record was 2-2?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"october\" WHERE \"record\"='2-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the home team in the game with a record of 2-4?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"october\" WHERE \"record\"='2-4';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.