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 \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which college's round is more than 4, when the overall is less than 237 and Ted Cottrell was the name?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"atlanta_falcons_draft_history\" WHERE \"round\">4 AND \"overall\"<237 AND \"name\"='ted cottrell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the smallest overall for Oregon State?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='oregon state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"class\" text,\n \"position\" text,\n \"hometown\" text\n);\n\nQuestion: What is the class of the qb, Josh Riddell?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"roster\" WHERE \"position\"='qb' AND \"name\"='josh riddell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"class\" text,\n \"position\" text,\n \"hometown\" text\n);\n\nQuestion: What position does Jamar Chaney play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"roster\" WHERE \"name\"='jamar chaney';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"roster\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"class\" text,\n \"position\" text,\n \"hometown\" text\n);\n\nQuestion: What hometown is Kyle love from?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"roster\" WHERE \"name\"='kyle love';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Attendance has a Home of philadelphia, and Points smaller than 23?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"home\"='philadelphia' AND \"points\"<23;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Visitor has a Record of 9\u201312\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"record\"='9\u201312\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"attendance\" real,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Date has a Visitor of boston?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"visitor\"='boston';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"futures_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the date for the grass surface final against Nathan Healey?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"futures_titles\" WHERE \"surface\"='grass' AND \"opponent_in_the_final\"='nathan healey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"futures_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score of the final against Dane Propoggia?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"futures_titles\" WHERE \"opponent_in_the_final\"='dane propoggia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_10_clubs\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What was the total score when the E score was larger than 9.6 and the A score was 6?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"groups_10_clubs\" WHERE \"e_score\">9.6 AND \"a_score\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_10_clubs\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What was the average E score when the T score was less than 4?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"e_score\") FROM \"groups_10_clubs\" WHERE \"t_score\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_10_clubs\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What was the average T score when the E score was larger than 9.6 and the team was from Spain?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"t_score\") FROM \"groups_10_clubs\" WHERE \"nation\"='spain' AND \"e_score\">9.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_10_clubs\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What was the total number of A scores for Japan when the T score was more than 4?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"a_score\") FROM \"groups_10_clubs\" WHERE \"nation\"='japan' AND \"t_score\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_10_clubs\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What was the sum of the E scores when the total score was 19.466?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"e_score\") FROM \"groups_10_clubs\" WHERE \"total\"=19.466;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"groups_10_clubs\" (\n \"nation\" text,\n \"t_score\" real,\n \"a_score\" real,\n \"e_score\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of E scores when the total score was 19.7 and the A score was more than 6?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"e_score\") FROM \"groups_10_clubs\" WHERE \"total\"=19.7 AND \"a_score\">6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_netherlands\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What is the highest number of draws with 14 points and less than 7 games?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"drawn\") FROM \"world_championship_group_c_netherlands\" WHERE \"points\"=14 AND \"games\"<7;"
}
] |
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance at the game with a record of 4-5?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"record\"='4-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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the date of the week 16 game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=16;"
}
] |
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the record at the game with a result of W 13-12 after week 4?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"week\">4 AND \"result\"='w 13-12';"
}
] |
[
{
"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 \"record\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent at the game attended by 62,019 before week 17?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<17 AND \"attendance\"='62,019';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_doubles_finals_13_6_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the surface for january 8, 2001"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"atp_doubles_finals_13_6_7\" WHERE \"date\"='january 8, 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_doubles_finals_13_6_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the outcome for jordan kerr july 19, 2004"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"atp_doubles_finals_13_6_7\" WHERE \"partnering\"='jordan kerr' AND \"date\"='july 19, 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_doubles_finals_13_6_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the score for opponents of nathan healey igor kunitsyn"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"atp_doubles_finals_13_6_7\" WHERE \"opponents_in_the_final\"='nathan healey igor kunitsyn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_doubles_finals_13_6_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the outcome for opponents of jonas bj\u00f6rkman john mcenroe"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"atp_doubles_finals_13_6_7\" WHERE \"opponents_in_the_final\"='jonas bj\u00f6rkman john mcenroe';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atp_doubles_finals_13_6_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Name the surface for paul goldstein and date of october 2, 2006"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"atp_doubles_finals_13_6_7\" WHERE \"partnering\"='paul goldstein' AND \"date\"='october 2, 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_spain\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Games have a Drawn smaller than 1, and a Lost smaller than 1?"
},
{
"role": "assistant",
"content": "SELECT \"games\" FROM \"world_championship_group_c_spain\" WHERE \"drawn\"<1 AND \"lost\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world_championship_group_c_spain\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: Which Drawn is the lowest one that has a Lost of 5, and Points larger than 4?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"world_championship_group_c_spain\" WHERE \"lost\"=5 AND \"points\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" text,\n \"d_il\" text,\n \"share_of_votes\" text,\n \"seats\" real,\n \"government\" text\n);\n\nQuestion: Which Government has 57 seats?"
},
{
"role": "assistant",
"content": "SELECT \"government\" FROM \"general_election_results\" WHERE \"seats\"=57;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" text,\n \"d_il\" text,\n \"share_of_votes\" text,\n \"seats\" real,\n \"government\" text\n);\n\nQuestion: How many seats does the 6th Dail have?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"seats\") FROM \"general_election_results\" WHERE \"d_il\"='6th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" text,\n \"d_il\" text,\n \"share_of_votes\" text,\n \"seats\" real,\n \"government\" text\n);\n\nQuestion: What is the number of the dail with 61 seats?"
},
{
"role": "assistant",
"content": "SELECT \"d_il\" FROM \"general_election_results\" WHERE \"seats\"=61;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" text,\n \"d_il\" text,\n \"share_of_votes\" text,\n \"seats\" real,\n \"government\" text\n);\n\nQuestion: What is the lowest number of seats from the election with 27.0% of votes?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"seats\") FROM \"general_election_results\" WHERE \"share_of_votes\"='27.0%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general_election_results\" (\n \"election\" text,\n \"d_il\" text,\n \"share_of_votes\" text,\n \"seats\" real,\n \"government\" text\n);\n\nQuestion: What is the 6th dail share of votes?"
},
{
"role": "assistant",
"content": "SELECT \"share_of_votes\" FROM \"general_election_results\" WHERE \"d_il\"='6th';"
}
] |
[
{
"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 \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the highest week when the record was 1-3?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"record\"='1-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 \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: Who was the opponent at the game attended by 62,657?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\"='62,657';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inland_steam_and_river_boats_of_coos_bay\" (\n \"name\" text,\n \"type\" text,\n \"year_built\" real,\n \"where_built\" text,\n \"length\" text\n);\n\nQuestion: What is the year built for the Fay No. 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_built\") FROM \"inland_steam_and_river_boats_of_coos_bay\" WHERE \"name\"='fay no. 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"inland_steam_and_river_boats_of_coos_bay\" (\n \"name\" text,\n \"type\" text,\n \"year_built\" real,\n \"where_built\" text,\n \"length\" text\n);\n\nQuestion: Where the length is 91', what is the year built?"
},
{
"role": "assistant",
"content": "SELECT \"year_built\" FROM \"inland_steam_and_river_boats_of_coos_bay\" WHERE \"length\"='91''';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elementary_schools_grades_k_6\" (\n \"elementary_schools\" text,\n \"mascot\" text,\n \"address\" text,\n \"principal_2013_2014\" text,\n \"assistant_principal_2013_2014\" text\n);\n\nQuestion: What is the address for the Scorpions' mascot?"
},
{
"role": "assistant",
"content": "SELECT \"address\" FROM \"elementary_schools_grades_k_6\" WHERE \"mascot\"='scorpions';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elementary_schools_grades_k_6\" (\n \"elementary_schools\" text,\n \"mascot\" text,\n \"address\" text,\n \"principal_2013_2014\" text,\n \"assistant_principal_2013_2014\" text\n);\n\nQuestion: What is the address for the assistant principal named Kelly Papke?"
},
{
"role": "assistant",
"content": "SELECT \"address\" FROM \"elementary_schools_grades_k_6\" WHERE \"assistant_principal_2013_2014\"='kelly papke';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elementary_schools_grades_k_6\" (\n \"elementary_schools\" text,\n \"mascot\" text,\n \"address\" text,\n \"principal_2013_2014\" text,\n \"assistant_principal_2013_2014\" text\n);\n\nQuestion: What was the mascot for the 2013-2014 principal named Frank Hendricsen?"
},
{
"role": "assistant",
"content": "SELECT \"mascot\" FROM \"elementary_schools_grades_k_6\" WHERE \"principal_2013_2014\"='frank hendricsen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elementary_schools_grades_k_6\" (\n \"elementary_schools\" text,\n \"mascot\" text,\n \"address\" text,\n \"principal_2013_2014\" text,\n \"assistant_principal_2013_2014\" text\n);\n\nQuestion: Who were the assistant and main principals of Kat Hughes?"
},
{
"role": "assistant",
"content": "SELECT \"assistant_principal_2013_2014\" FROM \"elementary_schools_grades_k_6\" WHERE \"principal_2013_2014\"='kat hughes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"elementary_schools_grades_k_6\" (\n \"elementary_schools\" text,\n \"mascot\" text,\n \"address\" text,\n \"principal_2013_2014\" text,\n \"assistant_principal_2013_2014\" text\n);\n\nQuestion: What is the address for the school that has the coyotes mascot?"
},
{
"role": "assistant",
"content": "SELECT \"address\" FROM \"elementary_schools_grades_k_6\" WHERE \"mascot\"='coyotes';"
}
] |
[
{
"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 result of the game played at Jinan?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"venue\"='jinan';"
}
] |
[
{
"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 score of the game on November 10, 2006?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='november 10, 2006';"
}
] |
[
{
"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 game held at Lahore?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"international_goals\" WHERE \"venue\"='lahore';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_starts_from_front_row_in_a_season\" (\n \"driver\" text,\n \"season\" text,\n \"entries\" real,\n \"front_row_starts\" real,\n \"percentage\" text\n);\n\nQuestion: What were the total number of entries in 2001 that had a front row smaller than 13?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"entries\") FROM \"most_starts_from_front_row_in_a_season\" WHERE \"season\"='2001' AND \"front_row_starts\"<13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_starts_from_front_row_in_a_season\" (\n \"driver\" text,\n \"season\" text,\n \"entries\" real,\n \"front_row_starts\" real,\n \"percentage\" text\n);\n\nQuestion: What are the lowest entries for a front row smaller than 15 where Michael Schumacher was driving?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"entries\") FROM \"most_starts_from_front_row_in_a_season\" WHERE \"front_row_starts\"<15 AND \"driver\"='michael schumacher';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_starts_from_front_row_in_a_season\" (\n \"driver\" text,\n \"season\" text,\n \"entries\" real,\n \"front_row_starts\" real,\n \"percentage\" text\n);\n\nQuestion: What was the highest front row starts for Alain Prost?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"front_row_starts\") FROM \"most_starts_from_front_row_in_a_season\" WHERE \"driver\"='alain prost';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"ntfa_div_2\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Against has Losses larger than 2, and Wins of 8, and Byes smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"2009_ladder\" WHERE \"losses\">2 AND \"wins\"=8 AND \"byes\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"ntfa_div_2\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Draws have Wins larger than 14?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"draws\") FROM \"2009_ladder\" WHERE \"wins\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"ntfa_div_2\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many Losses have an NTFA Div 2 of perth, and Wins smaller than 10?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"2009_ladder\" WHERE \"ntfa_div_2\"='perth' AND \"wins\"<10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2009_ladder\" (\n \"ntfa_div_2\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: Which Byes have an Against smaller than 1647, and an NTFA Div 2 of fingal valley, and Wins smaller than 14?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"byes\") FROM \"2009_ladder\" WHERE \"against\"<1647 AND \"ntfa_div_2\"='fingal valley' AND \"wins\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many grids were there races with more than 10 laps and a time of +34.121?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"sprint_race\" WHERE \"time\"='+34.121' AND \"laps\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the smallest grid number that had 10 laps listed with Jonathan Summerton as the driver?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"sprint_race\" WHERE \"laps\"=10 AND \"driver\"='jonathan summerton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"sprint_race\" (\n \"team\" text,\n \"driver\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the average grid number that had Team China with less than 10 laps?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"sprint_race\" WHERE \"laps\"<10 AND \"team\"='china';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general\" (\n \"name\" text,\n \"creator\" text,\n \"platform_os\" text,\n \"first_public_release\" text,\n \"latest_stable_release\" text,\n \"open_source\" text,\n \"programming_language_used\" text\n);\n\nQuestion: Which Creator has the Latest stable release of unknown, and a Name of myeclipse?"
},
{
"role": "assistant",
"content": "SELECT \"creator\" FROM \"general\" WHERE \"latest_stable_release\"='unknown' AND \"name\"='myeclipse';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general\" (\n \"name\" text,\n \"creator\" text,\n \"platform_os\" text,\n \"first_public_release\" text,\n \"latest_stable_release\" text,\n \"open_source\" text,\n \"programming_language_used\" text\n);\n\nQuestion: Which Platform / OS has a Name of altova umodel?"
},
{
"role": "assistant",
"content": "SELECT \"platform_os\" FROM \"general\" WHERE \"name\"='altova umodel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general\" (\n \"name\" text,\n \"creator\" text,\n \"platform_os\" text,\n \"first_public_release\" text,\n \"latest_stable_release\" text,\n \"open_source\" text,\n \"programming_language_used\" text\n);\n\nQuestion: Which Programming language used has a First public release of 1997?"
},
{
"role": "assistant",
"content": "SELECT \"programming_language_used\" FROM \"general\" WHERE \"first_public_release\"='1997';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"general\" (\n \"name\" text,\n \"creator\" text,\n \"platform_os\" text,\n \"first_public_release\" text,\n \"latest_stable_release\" text,\n \"open_source\" text,\n \"programming_language_used\" text\n);\n\nQuestion: Which First public release has a Name of rational software modeler?"
},
{
"role": "assistant",
"content": "SELECT \"first_public_release\" FROM \"general\" WHERE \"name\"='rational software modeler';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the College of Rice's highest overall for the guard position?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"overall\") FROM \"atlanta_falcons_draft_history\" WHERE \"position\"='guard' AND \"college\"='rice';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is Tommy Nobis' position that has fewer than 16 picks?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"atlanta_falcons_draft_history\" WHERE \"pick_num\"<16 AND \"name\"='tommy nobis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the score when the Rangers were playing against the Vancouver Canucks?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"opponent\"='vancouver canucks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who were the opponents on January 27?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"january\"=27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent for game number less than 47 and a record of 24-13-4?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule_and_results\" WHERE \"game\"<47 AND \"record\"='24-13-4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"january\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the average january number when the game number was higher than 39 and the opponent was the Vancouver Canucks?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"january\") FROM \"schedule_and_results\" WHERE \"opponent\"='vancouver canucks' AND \"game\">39;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What is the Drawn number with a Points against of correct as of 08:50 10 may 2009?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"2008_2009_table\" WHERE \"points_against\"='correct as of 08:50 10 may 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What is the Tries against when lost shows 12 for pontycymmer rfc?"
},
{
"role": "assistant",
"content": "SELECT \"tries_against\" FROM \"2008_2009_table\" WHERE \"lost\"='12' AND \"club\"='pontycymmer rfc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What is the Points against for the ystradgynlais rfc club?"
},
{
"role": "assistant",
"content": "SELECT \"points_against\" FROM \"2008_2009_table\" WHERE \"club\"='ystradgynlais rfc';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What is the Club name what shows 405 for the Points against?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"2008_2009_table\" WHERE \"points_against\"='405';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_2009_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text\n);\n\nQuestion: What shows for Try bonus when the points against are 451?"
},
{
"role": "assistant",
"content": "SELECT \"try_bonus\" FROM \"2008_2009_table\" WHERE \"points_against\"='451';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o_reilly_200_memphis\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Pos has a Make of chevrolet, and a Driver of jack sprague, and a Car # smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pos\") FROM \"o_reilly_200_memphis\" WHERE \"make\"='chevrolet' AND \"driver\"='jack sprague' AND \"car_num\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o_reilly_200_memphis\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: How many Car numbers have a Driver of erik darnell, and a Pos smaller than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"car_num\") FROM \"o_reilly_200_memphis\" WHERE \"driver\"='erik darnell' AND \"pos\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o_reilly_200_memphis\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Pos has a Car # of 33?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pos\") FROM \"o_reilly_200_memphis\" WHERE \"car_num\"=33;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o_reilly_200_memphis\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Pos has a Team of circle bar racing, and a Car # smaller than 14?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pos\") FROM \"o_reilly_200_memphis\" WHERE \"team\"='circle bar racing' AND \"car_num\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"o_reilly_200_memphis\" (\n \"pos\" real,\n \"car_num\" real,\n \"driver\" text,\n \"make\" text,\n \"team\" text\n);\n\nQuestion: Which Pos has a Car # larger than 2, and a Team of billy ballew motorsports?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pos\") FROM \"o_reilly_200_memphis\" WHERE \"car_num\">2 AND \"team\"='billy ballew motorsports';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engelberg\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What is the lowest points that has 135 as 2nd (m)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"engelberg\" WHERE \"2nd_m\"=135;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engelberg\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What is the overall WC points (rank) that has 139 as the 2nd (m)?"
},
{
"role": "assistant",
"content": "SELECT \"overall_wc_points_rank\" FROM \"engelberg\" WHERE \"2nd_m\"=139;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engelberg\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: How many 2nd (m) have aut as the nationality, with 4 as the rank, and a 1st less than 122.5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"2nd_m\") FROM \"engelberg\" WHERE \"nationality\"='aut' AND \"rank\"=4 AND \"1st_m\"<122.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engelberg\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What name has a 1st (m) greater than 124.5, and a 2nd (m) greater than 136?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"engelberg\" WHERE \"1st_m\">124.5 AND \"2nd_m\">136;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_2005\" (\n \"rank\" text,\n \"film\" text,\n \"director_s\" text,\n \"country\" text,\n \"prize\" text\n);\n\nQuestion: What Rank is the Director(s) of satoko okita?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"2004_2005\" WHERE \"director_s\"='satoko okita';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_2005\" (\n \"rank\" text,\n \"film\" text,\n \"director_s\" text,\n \"country\" text,\n \"prize\" text\n);\n\nQuestion: What country is the film hi no tsugi ha rekishi from?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"2004_2005\" WHERE \"film\"='hi no tsugi ha rekishi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_2005\" (\n \"rank\" text,\n \"film\" text,\n \"director_s\" text,\n \"country\" text,\n \"prize\" text\n);\n\nQuestion: Which Director(s) made the film hanzubon no ojisan and received a prize of \u00a5300,000?"
},
{
"role": "assistant",
"content": "SELECT \"director_s\" FROM \"2004_2005\" WHERE \"prize\"='\u00a5300,000' AND \"film\"='hanzubon no ojisan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_2005\" (\n \"rank\" text,\n \"film\" text,\n \"director_s\" text,\n \"country\" text,\n \"prize\" text\n);\n\nQuestion: Which country did the Director(s) of kota nagaoka come from and win \u00a5300,000?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"2004_2005\" WHERE \"prize\"='\u00a5300,000' AND \"director_s\"='kota nagaoka';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_2005\" (\n \"rank\" text,\n \"film\" text,\n \"director_s\" text,\n \"country\" text,\n \"prize\" text\n);\n\nQuestion: What Director won a prize of \u00a52,000,000?"
},
{
"role": "assistant",
"content": "SELECT \"director_s\" FROM \"2004_2005\" WHERE \"prize\"='\u00a52,000,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004_2005\" (\n \"rank\" text,\n \"film\" text,\n \"director_s\" text,\n \"country\" text,\n \"prize\" text\n);\n\nQuestion: What Rank is the director of maximilian jezo-parovsky?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"2004_2005\" WHERE \"director_s\"='maximilian jezo-parovsky';"
}
] |
[
{
"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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who had the most high assists from Milwaukee?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"team\"='milwaukee';"
}
] |
[
{
"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 \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who scored the most point on December 13?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"game_log\" WHERE \"date\"='december 13';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What's the Loss for the game that had a 22-24 record?"
},
{
"role": "assistant",
"content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='22-24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"nation\" text,\n \"height\" text,\n \"athlete\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was the date that Elvir Krehmic made a high jump record?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"men\" WHERE \"athlete\"='elvir krehmic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_bibliographic_details\" (\n \"start_month\" text,\n \"end_month\" text,\n \"cover\" text,\n \"spine\" text,\n \"indicia\" text,\n \"masthead\" text,\n \"number_of_issues\" real\n);\n\nQuestion: Which spine has 12 issues?"
},
{
"role": "assistant",
"content": "SELECT \"spine\" FROM \"other_bibliographic_details\" WHERE \"number_of_issues\"=12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_bibliographic_details\" (\n \"start_month\" text,\n \"end_month\" text,\n \"cover\" text,\n \"spine\" text,\n \"indicia\" text,\n \"masthead\" text,\n \"number_of_issues\" real\n);\n\nQuestion: How many issues end on jan\u201372?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"number_of_issues\") FROM \"other_bibliographic_details\" WHERE \"end_month\"='jan\u201372';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"other_bibliographic_details\" (\n \"start_month\" text,\n \"end_month\" text,\n \"cover\" text,\n \"spine\" text,\n \"indicia\" text,\n \"masthead\" text,\n \"number_of_issues\" real\n);\n\nQuestion: Which masthead ends on oct\u201369?"
},
{
"role": "assistant",
"content": "SELECT \"masthead\" FROM \"other_bibliographic_details\" WHERE \"end_month\"='oct\u201369';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: What is the game number held on May 2?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"playoffs\" WHERE \"date\"='may 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"season\" text,\n \"tier\" real,\n \"division\" text,\n \"pos\" real,\n \"postseason\" text,\n \"cup_competitions\" text\n);\n\nQuestion: Which Season has a Postseason of promoted runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"season_by_season\" WHERE \"postseason\"='promoted runner-up';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the attendance of the match with a record 20-11?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"record\"='20-11';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the date of the match with a 28-15 record?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='28-15';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"series\" text\n);\n\nQuestion: Which opponent did they play against on April 16?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"playoffs\" WHERE \"date\"='april 16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"circuit\" text,\n \"state_territory\" text,\n \"date\" text,\n \"winning_driver\" text\n);\n\nQuestion: What circuit was after round 2 in Victoria?"
},
{
"role": "assistant",
"content": "SELECT \"circuit\" FROM \"calendar\" WHERE \"round\">2 AND \"state_territory\"='victoria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"circuit\" text,\n \"state_territory\" text,\n \"date\" text,\n \"winning_driver\" text\n);\n\nQuestion: What is the state the winning driver Jamie Whincup from in round 2?"
},
{
"role": "assistant",
"content": "SELECT \"state_territory\" FROM \"calendar\" WHERE \"winning_driver\"='jamie whincup' AND \"round\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: What date in October did the Flyers play against the Toronto Maple Leafs?"
},
{
"role": "assistant",
"content": "SELECT \"october\" FROM \"regular_season\" WHERE \"opponent\"='toronto maple leafs';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.