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 \"highest_grossing_films_of_1997\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: what is the title when the rank is less than 17 and the worldwide gross is $299,288,605?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"highest_grossing_films_of_1997\" WHERE \"rank\"<17 AND \"worldwide_gross\"='$299,288,605';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1997\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: what is the highest rank for director john woo?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"highest_grossing_films_of_1997\" WHERE \"director\"='john woo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1997\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: what is the title for director p.j. hogan?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"highest_grossing_films_of_1997\" WHERE \"director\"='p.j. hogan';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What date was the pyramid location?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"location\"='the pyramid';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What date was the opponent the Portland Trail Blazers?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='portland trail blazers';"
}
] |
[
{
"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\" text,\n \"record\" text\n);\n\nQuestion: What is the record for the opponent the Cleveland Cavaliers?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"opponent\"='cleveland cavaliers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What was the second qualification time for Dale Coyne Racing with a best of 1:03.757?"
},
{
"role": "assistant",
"content": "SELECT \"qual_2\" FROM \"qualifying_results\" WHERE \"team\"='dale coyne racing' AND \"best\"='1:03.757';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What was the second qualification time with a first qualification time of 1:02.813?"
},
{
"role": "assistant",
"content": "SELECT \"qual_2\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:02.813';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: Which team has a second qualification time of 1:01.936?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:01.936';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: Who had a best time of 1:00.870?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"best\"='1:00.870';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: Who had a second qualification time of 1:01.777?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:01.777';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"free_play\" (\n \"developer_s\" text,\n \"release_date\" text,\n \"required_os\" text,\n \"genre\" text,\n \"type\" text\n);\n\nQuestion: What type of 3D game was released between 2008-2011?"
},
{
"role": "assistant",
"content": "SELECT \"genre\" FROM \"free_play\" WHERE \"type\"='3d' AND \"release_date\"='2008-2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"free_play\" (\n \"developer_s\" text,\n \"release_date\" text,\n \"required_os\" text,\n \"genre\" text,\n \"type\" text\n);\n\nQuestion: When did Riot Games release their 3D MOBA game?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"free_play\" WHERE \"type\"='3d' AND \"genre\"='moba' AND \"developer_s\"='riot games';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"free_play\" (\n \"developer_s\" text,\n \"release_date\" text,\n \"required_os\" text,\n \"genre\" text,\n \"type\" text\n);\n\nQuestion: When did Masthead Studios release their game?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"free_play\" WHERE \"developer_s\"='masthead studios';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"free_play\" (\n \"developer_s\" text,\n \"release_date\" text,\n \"required_os\" text,\n \"genre\" text,\n \"type\" text\n);\n\nQuestion: What operating system was needed for 2D games?"
},
{
"role": "assistant",
"content": "SELECT \"required_os\" FROM \"free_play\" WHERE \"type\"='2d';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"free_play\" (\n \"developer_s\" text,\n \"release_date\" text,\n \"required_os\" text,\n \"genre\" text,\n \"type\" text\n);\n\nQuestion: What type of 3D game did Valve Corporation release?"
},
{
"role": "assistant",
"content": "SELECT \"genre\" FROM \"free_play\" WHERE \"type\"='3d' AND \"developer_s\"='valve corporation';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"free_play\" (\n \"developer_s\" text,\n \"release_date\" text,\n \"required_os\" text,\n \"genre\" text,\n \"type\" text\n);\n\nQuestion: What was the minimum operating system required by Stunlock Studios' game?"
},
{
"role": "assistant",
"content": "SELECT \"required_os\" FROM \"free_play\" WHERE \"developer_s\"='stunlock studios';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What was the total rounds Travis Hamonic played?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"draft_picks\" WHERE \"player\"='travis hamonic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"merchant_ships\" (\n \"name\" text,\n \"flag\" text,\n \"cargo\" text,\n \"fate\" text,\n \"date_of_attack\" text\n);\n\nQuestion: What is the name of the ship with pit props as Cargo sunk by u-48 *?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"merchant_ships\" WHERE \"fate\"='sunk by u-48 *' AND \"cargo\"='pit props';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"merchant_ships\" (\n \"name\" text,\n \"flag\" text,\n \"cargo\" text,\n \"fate\" text,\n \"date_of_attack\" text\n);\n\nQuestion: What is the Date of attack of the ship with iron ore sunk by u-101 *?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_attack\" FROM \"merchant_ships\" WHERE \"fate\"='sunk by u-101 *' AND \"cargo\"='iron ore';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the fewest points for positions with under 12 losses, goals against under 50, goal difference over 11, and under 30 played?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"group_i\" WHERE \"losses\"<12 AND \"goals_against\"<50 AND \"goal_difference\">11 AND \"played\"<30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the most wins for a position with more than 30 played and a goal difference of 11?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"group_i\" WHERE \"goal_difference\"=11 AND \"played\">30;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"group_i\" (\n \"position\" real,\n \"played\" real,\n \"points\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the total number of played for the goals against over 44 and a goal difference of 11?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"played\") FROM \"group_i\" WHERE \"goal_difference\"=11 AND \"goals_against\">44;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Time, when Round is less than 2, and when Opponent is \"Valentijn Overeem\"?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"mixed_martial_arts_record\" WHERE \"round\"<2 AND \"opponent\"='valentijn overeem';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Location, when Round is \"1\", and when Opponent is \"Joe Slick\"?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"opponent\"='joe slick';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Event, when Opponent is \"Joe Pardo\"?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='joe pardo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is Event, when Round is \"1\", when Location is \"New Town, North Dakota , United States\" and when Time is \"4:12\"?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"round\"=1 AND \"location\"='new town, north dakota , united states' AND \"time\"='4: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 \"attendance\" text\n);\n\nQuestion: On what Date was the Opponent the Tennessee Titans?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='tennessee titans';"
}
] |
[
{
"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 is the Result of the game with an Attendance of 64,104?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='64,104';"
}
] |
[
{
"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 is the Week number with a Result of W 30-28?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='w 30-28';"
}
] |
[
{
"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 is the date of the game against Philadelphia Eagles?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"opponent\"='philadelphia eagles';"
}
] |
[
{
"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 is the Attendance of the game September 21, 2003?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='september 21, 2003';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tonnage_for_port_of_anchorage\" (\n \"year\" real,\n \"u_s_rank\" real,\n \"total_s_ton\" real,\n \"domestic_s_ton\" real,\n \"foreign_total_s_ton\" real,\n \"foreign_imports_s_ton\" real,\n \"foreign_exports_s_ton\" real\n);\n\nQuestion: how many times is the total s ton less than 2,983,137 and the u.s. rank less than 102?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"tonnage_for_port_of_anchorage\" WHERE \"total_s_ton\"<'2,983,137' AND \"u_s_rank\"<102;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tonnage_for_port_of_anchorage\" (\n \"year\" real,\n \"u_s_rank\" real,\n \"total_s_ton\" real,\n \"domestic_s_ton\" real,\n \"foreign_total_s_ton\" real,\n \"foreign_imports_s_ton\" real,\n \"foreign_exports_s_ton\" real\n);\n\nQuestion: what is the average domestic s tone when the foreign imports s tone is less than 225,281 and the year is later than 2003?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"domestic_s_ton\") FROM \"tonnage_for_port_of_anchorage\" WHERE \"foreign_imports_s_ton\"<'225,281' AND \"year\">2003;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tonnage_for_port_of_anchorage\" (\n \"year\" real,\n \"u_s_rank\" real,\n \"total_s_ton\" real,\n \"domestic_s_ton\" real,\n \"foreign_total_s_ton\" real,\n \"foreign_imports_s_ton\" real,\n \"foreign_exports_s_ton\" real\n);\n\nQuestion: what is the average domestic s tone when the total s tone is 2,926,536 and the foreign imports s tone is less than 464,774?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"domestic_s_ton\") FROM \"tonnage_for_port_of_anchorage\" WHERE \"total_s_ton\"='2,926,536' AND \"foreign_imports_s_ton\"<'464,774';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tonnage_for_port_of_anchorage\" (\n \"year\" real,\n \"u_s_rank\" real,\n \"total_s_ton\" real,\n \"domestic_s_ton\" real,\n \"foreign_total_s_ton\" real,\n \"foreign_imports_s_ton\" real,\n \"foreign_exports_s_ton\" real\n);\n\nQuestion: what is the average foreign imports s tone when the total s tone is 3,157,247 and the foreign exports s ton is less than 358,493?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"foreign_imports_s_ton\") FROM \"tonnage_for_port_of_anchorage\" WHERE \"total_s_ton\"='3,157,247' AND \"foreign_exports_s_ton\"<'358,493';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tonnage_for_port_of_anchorage\" (\n \"year\" real,\n \"u_s_rank\" real,\n \"total_s_ton\" real,\n \"domestic_s_ton\" real,\n \"foreign_total_s_ton\" real,\n \"foreign_imports_s_ton\" real,\n \"foreign_exports_s_ton\" real\n);\n\nQuestion: how many times is the U.S. Rank 102, the year earlier than 2006 and the total s ton less than 2,983,137?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"foreign_total_s_ton\") FROM \"tonnage_for_port_of_anchorage\" WHERE \"u_s_rank\"=102 AND \"year\"<2006 AND \"total_s_ton\"<'2,983,137';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tonnage_for_port_of_anchorage\" (\n \"year\" real,\n \"u_s_rank\" real,\n \"total_s_ton\" real,\n \"domestic_s_ton\" real,\n \"foreign_total_s_ton\" real,\n \"foreign_imports_s_ton\" real,\n \"foreign_exports_s_ton\" real\n);\n\nQuestion: what is the highest u.s. rank when the foreign total s ton is more than 703,638, the year is earlier than 2005, the foreign imports s ton is 284,347 and the foreign exports s ton is smaller than 478,317?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"u_s_rank\") FROM \"tonnage_for_port_of_anchorage\" WHERE \"foreign_total_s_ton\">'703,638' AND \"year\"<2005 AND \"foreign_imports_s_ton\"='284,347' AND \"foreign_exports_s_ton\"<'478,317';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position has a pick less than 20?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"pick\"<20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the number that is the lowest overall for the College of Baylor?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='baylor';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the number that is the lowest overall for Round 6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"round\"=6;"
}
] |
[
{
"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\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: Where was the result a win against Mike Large?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"opponent\"='mike large';"
}
] |
[
{
"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\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: In what round did opponent Joe Lauzon play?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='joe lauzon';"
}
] |
[
{
"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: Who was the opponent in a week over 8 on December 4, 1960?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\">8 AND \"date\"='december 4, 1960';"
}
] |
[
{
"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: Who was the opponent in a week less than 8 on October 9, 1960?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<8 AND \"date\"='october 9, 1960';"
}
] |
[
{
"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 result when 58,516 were in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='58,516';"
}
] |
[
{
"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: Who was the opponent in a week below 3 on September 23, 1960?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<3 AND \"date\"='september 23, 1960';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"suicides_per_100_000_people_per_year\" (\n \"rank\" real,\n \"country\" text,\n \"year\" real,\n \"males\" real,\n \"females\" real,\n \"total\" real\n);\n\nQuestion: What is the biggest number of females where the males are at 28.2 with a rank greater than 5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"females\") FROM \"suicides_per_100_000_people_per_year\" WHERE \"males\"=28.2 AND \"rank\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leading_money_winners_by_year\" (\n \"year\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"most_wins\" text\n);\n\nQuestion: Who was the player in 1976?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"leading_money_winners_by_year\" WHERE \"year\"=1976;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2006_chicago_sky\" (\n \"pick\" real,\n \"player\" text,\n \"nationality\" text,\n \"new_wnba_team\" text,\n \"former_wnba_team\" text,\n \"college_country_team\" text\n);\n\nQuestion: When was Elaine Powell (g) of the United states picked?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"2006_chicago_sky\" WHERE \"nationality\"='united states' AND \"player\"='elaine powell (g)';"
}
] |
[
{
"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);\n\nQuestion: When was there a result of w 65-20 after week 6?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\">6 AND \"result\"='w 65-20';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is Celta's Agg.?"
},
{
"role": "assistant",
"content": "SELECT \"agg\" FROM \"round_of_32\" WHERE \"team_1\"='celta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the 2nd leg for Barcelona Team 2?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_leg\" FROM \"round_of_32\" WHERE \"team_2\"='barcelona';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_of_32\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is team 2 if Team 1 is Numancia?"
},
{
"role": "assistant",
"content": "SELECT \"team_2\" FROM \"round_of_32\" WHERE \"team_1\"='numancia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_5_iranian_banks_2012_ranking\" (\n \"bank\" text,\n \"score_iran\" real,\n \"score_global\" real,\n \"banking_power_capital_base_million\" real,\n \"banking_power_capital_base_pct_change\" text,\n \"total_assets_million\" real,\n \"total_assets_score\" real,\n \"total_assets_pct_change\" text,\n \"credibility_capital_to_assets_ratio_pct\" real,\n \"credibility_capital_to_assets_ratio_score\" real,\n \"performance_return_on_capital_pct\" real,\n \"performance_return_on_capital_score\" real,\n \"return_on_assets_pct\" real,\n \"return_on_assets_score\" real\n);\n\nQuestion: What is the maximum Credibility/Capital to Assets Ration (Score) that has a Credibility/Capital to Assets Ration (%) bigger than 4.66, and the Banking Power/Capital Base ($ Million) is less than 2,550?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"credibility_capital_to_assets_ratio_score\") FROM \"top_5_iranian_banks_2012_ranking\" WHERE \"credibility_capital_to_assets_ratio_pct\">4.66 AND \"banking_power_capital_base_million\"<'2,550';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_5_iranian_banks_2012_ranking\" (\n \"bank\" text,\n \"score_iran\" real,\n \"score_global\" real,\n \"banking_power_capital_base_million\" real,\n \"banking_power_capital_base_pct_change\" text,\n \"total_assets_million\" real,\n \"total_assets_score\" real,\n \"total_assets_pct_change\" text,\n \"credibility_capital_to_assets_ratio_pct\" real,\n \"credibility_capital_to_assets_ratio_score\" real,\n \"performance_return_on_capital_pct\" real,\n \"performance_return_on_capital_score\" real,\n \"return_on_assets_pct\" real,\n \"return_on_assets_score\" real\n);\n\nQuestion: What is the sum of the Performance/Return on Capital (Score) when the Score (Iran) is less than 3, and the Score (Global) is 266?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"performance_return_on_capital_score\") FROM \"top_5_iranian_banks_2012_ranking\" WHERE \"score_iran\"<3 AND \"score_global\"=266;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"top_5_iranian_banks_2012_ranking\" (\n \"bank\" text,\n \"score_iran\" real,\n \"score_global\" real,\n \"banking_power_capital_base_million\" real,\n \"banking_power_capital_base_pct_change\" text,\n \"total_assets_million\" real,\n \"total_assets_score\" real,\n \"total_assets_pct_change\" text,\n \"credibility_capital_to_assets_ratio_pct\" real,\n \"credibility_capital_to_assets_ratio_score\" real,\n \"performance_return_on_capital_pct\" real,\n \"performance_return_on_capital_score\" real,\n \"return_on_assets_pct\" real,\n \"return_on_assets_score\" real\n);\n\nQuestion: What Total Assets (% Change) that has Performance/Return on Capital (%) greater than 25.63, and a Performance/Return on Capital (Score) greater than 7?"
},
{
"role": "assistant",
"content": "SELECT \"total_assets_pct_change\" FROM \"top_5_iranian_banks_2012_ranking\" WHERE \"performance_return_on_capital_pct\">25.63 AND \"performance_return_on_capital_score\">7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_in_the_nfl\" (\n \"player\" text,\n \"position\" text,\n \"round\" real,\n \"pick\" real,\n \"nfl_club\" text\n);\n\nQuestion: What is the NFL club of the cornerback player with a pick greater than 63?"
},
{
"role": "assistant",
"content": "SELECT \"nfl_club\" FROM \"players_in_the_nfl\" WHERE \"pick\">63 AND \"position\"='cornerback';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_in_the_nfl\" (\n \"player\" text,\n \"position\" text,\n \"round\" real,\n \"pick\" real,\n \"nfl_club\" text\n);\n\nQuestion: What is the total round of the tight end position player?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"players_in_the_nfl\" WHERE \"position\"='tight end';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players_in_the_nfl\" (\n \"player\" text,\n \"position\" text,\n \"round\" real,\n \"pick\" real,\n \"nfl_club\" text\n);\n\nQuestion: What is the pick of the NFL club buffalo bills?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"players_in_the_nfl\" WHERE \"nfl_club\"='buffalo bills';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: On What Date is the Competition Semifinal that has a result of 2-1 aet?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"competition\"='semifinal' AND \"result\"='2-1 aet';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Location has a Competition of Group Stage, a Lineup of Start and a Date of 2000-09-17?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"competition\"='group stage' AND \"lineup\"='start' AND \"date\"='2000-09-17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Match has a Competition of Group Stage on 2000-09-17?"
},
{
"role": "assistant",
"content": "SELECT \"match\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"competition\"='group stage' AND \"date\"='2000-09-17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: Which Match played in a Location of San Francisco has a Competition of Semifinal?"
},
{
"role": "assistant",
"content": "SELECT \"match\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"competition\"='semifinal' AND \"location\"='san francisco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"matches_and_goals_scored_at_world_cup_an\" (\n \"match\" text,\n \"date\" text,\n \"location\" text,\n \"lineup\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What Location has a Date of 1995-06-15?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"matches_and_goals_scored_at_world_cup_an\" WHERE \"date\"='1995-06-15';"
}
] |
[
{
"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 most points 1 when the goals against are fewer than 97, lost less than 22, 9 draws and goal difference of +28?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points_1\") FROM \"final_table\" WHERE \"goals_against\"<97 AND \"lost\"<22 AND \"drawn\"=9 AND \"goal_difference\"='+28';"
}
] |
[
{
"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 most points 1 when the goal difference is +28 and lost is larger than 12?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points_1\") FROM \"final_table\" WHERE \"goal_difference\"='+28' AND \"lost\">12;"
}
] |
[
{
"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 maximum lost with points 1 more than 58 and 66 goals against?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"lost\") FROM \"final_table\" WHERE \"points_1\">58 AND \"goals_against\"=66;"
}
] |
[
{
"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 most goals for when there are fewer than 4 draws?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_for\") FROM \"final_table\" WHERE \"drawn\"<4;"
}
] |
[
{
"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 \"tv_time\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result on October 20, 2002?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='october 20, 2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is the Jersey Number(s) from Norfolk State?"
},
{
"role": "assistant",
"content": "SELECT \"jersey_number_s\" FROM \"p\" WHERE \"from\"='norfolk state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is the nationality of the person with number 27?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"p\" WHERE \"jersey_number_s\"='27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"p\" (\n \"player\" text,\n \"nationality\" text,\n \"jersey_number_s\" text,\n \"position\" text,\n \"years\" text,\n \"from\" text\n);\n\nQuestion: What is the nationality of the SG position?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"p\" WHERE \"position\"='sg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1987\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: What is the rank of the film directed by danny devito?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"highest_grossing_films_of_1987\" WHERE \"director\"='danny devito';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1987\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: What is the sum of the ranks for the film, eddie murphy raw?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rank\") FROM \"highest_grossing_films_of_1987\" WHERE \"title\"='eddie murphy raw';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1987\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: Who directed Predator that was filmed with Fox Studio?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"highest_grossing_films_of_1987\" WHERE \"studio\"='fox' AND \"title\"='predator';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1987\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"gross\" text\n);\n\nQuestion: What is the total number of ranks that had vestron as the studio?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"highest_grossing_films_of_1987\" WHERE \"studio\"='vestron';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_2\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: Which class had Stanley Dickens as a driver?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"race_2\" WHERE \"driver\"='stanley dickens';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_2\" (\n \"class\" text,\n \"team\" text,\n \"driver\" text,\n \"chassis_engine\" text,\n \"laps\" real\n);\n\nQuestion: What was the highest amount of laps for class c1 and driver Derek Bell?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"race_2\" WHERE \"class\"='c1' AND \"driver\"='derek bell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players\" (\n \"nationality\" text,\n \"position\" text,\n \"gillingham_career\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: Where was the player born when the appearances were greater than 40 and made 17 goals?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"players\" WHERE \"apps\">40 AND \"goals\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players\" (\n \"nationality\" text,\n \"position\" text,\n \"gillingham_career\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: When did the mf from England play for Gillingham that made 0 goals and less than 37 appearances?"
},
{
"role": "assistant",
"content": "SELECT \"gillingham_career\" FROM \"players\" WHERE \"goals\"=0 AND \"apps\"<37 AND \"nationality\"='england' AND \"position\"='mf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Who is the player with a t8 place?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"place\"='t8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the country of player dale douglass, who has a t8 place?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"place\"='t8' AND \"player\"='dale douglass';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the average score of player lee trevino, who has a t8 place?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"score\") FROM \"first_round\" WHERE \"place\"='t8' AND \"player\"='lee trevino';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the to par of player johnny miller, who has a t8 place?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"first_round\" WHERE \"place\"='t8' AND \"player\"='johnny miller';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is the country of player chi-chi rodr\u00edguez, who has an e to par?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"first_round\" WHERE \"to_par\"='e' AND \"player\"='chi-chi rodr\u00edguez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: WHAT IS THE LEAGUE WITH PLAYER JOE COLBORNE?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"player\"='joe colborne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: WHAT IS THE ROUND NUMBER OF NICHOLAS TREMBLAY?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"draft_picks\" WHERE \"player\"='nicholas tremblay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: WHAT IS THE POSITION OF FRANCE?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"nationality\"='france';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: WHAT IS THE ROUND FOR JAMIE ARNIEL?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"round\") FROM \"draft_picks\" WHERE \"player\"='jamie arniel';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chinese_taipei_national_futsal_team\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"competition\" text,\n \"report\" text\n);\n\nQuestion: What was the score on May 12, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"chinese_taipei_national_futsal_team\" WHERE \"date\"='may 12, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_attendance\" (\n \"rank\" real,\n \"date\" text,\n \"attendance\" real,\n \"opponent\" text,\n \"texas_result\" text\n);\n\nQuestion: What is the rank of the largest attendance over 101,474 played against Rice?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"largest_attendance\" WHERE \"attendance\">'101,474' AND \"opponent\"='rice';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"largest_attendance\" (\n \"rank\" real,\n \"date\" text,\n \"attendance\" real,\n \"opponent\" text,\n \"texas_result\" text\n);\n\nQuestion: Who was the opponent on September 26, 2009?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"largest_attendance\" WHERE \"date\"='september 26, 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_mark_begich\" text,\n \"republican_ted_stevens\" text,\n \"lead_maragin\" real\n);\n\nQuestion: What was the average lead maragin for the dates administered of october 6, 2008?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"lead_maragin\") FROM \"opinion_polling_for_the_united_states_se\" WHERE \"dates_administered\"='october 6, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_mark_begich\" text,\n \"republican_ted_stevens\" text,\n \"lead_maragin\" real\n);\n\nQuestion: What was the poll source for october 6, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"poll_source\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"dates_administered\"='october 6, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Who has a place of T7 and is from the United States?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_round\" WHERE \"place\"='t7' AND \"country\"='united states';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1993\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: What is the Rank of the Film with a Worldwide Gross of $914,691,118?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"highest_grossing_films_of_1993\" WHERE \"worldwide_gross\"='$914,691,118';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_grossing_films_of_1993\" (\n \"rank\" real,\n \"title\" text,\n \"studio\" text,\n \"director\" text,\n \"worldwide_gross\" text\n);\n\nQuestion: What is the Director of the Film The Fugitive?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"highest_grossing_films_of_1993\" WHERE \"title\"='the fugitive';"
}
] |
[
{
"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: What was the highest points on October 12, when the attendance where is over 10,701?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"game_log\" WHERE \"date\"='october 12' AND \"attendance\">'10,701';"
}
] |
[
{
"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: When was Montreal a visitor?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"visitor\"='montreal';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.