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 \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Attendance for Opponent Boston Patriots and Week is greater than 14?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"attendance\") FROM \"season_schedule\" WHERE \"opponent\"='boston patriots' AND \"week\">14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: Which Nominated work has a Year of 1997?"
},
{
"role": "assistant",
"content": "SELECT \"nominated_work\" FROM \"awards_and_nominations\" WHERE \"year\"=1997;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: Which Award has a Category of music video acting award?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"category\"='music video acting award';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"name\" text,\n \"total\" text,\n \"league\" text,\n \"canadian_championship\" text,\n \"concacaf_champions_league\" text\n);\n\nQuestion: What name has a CONCACAF Champions League of 2 (0) and also a Canadian Championship of 8 (0)?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"most_appearances\" WHERE \"concacaf_champions_league\"='2 (0)' AND \"canadian_championship\"='8 (0)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"name\" text,\n \"total\" text,\n \"league\" text,\n \"canadian_championship\" text,\n \"concacaf_champions_league\" text\n);\n\nQuestion: When the league is 84 (4) what is the Canadian Championship?"
},
{
"role": "assistant",
"content": "SELECT \"canadian_championship\" FROM \"most_appearances\" WHERE \"league\"='84 (4)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"name\" text,\n \"total\" text,\n \"league\" text,\n \"canadian_championship\" text,\n \"concacaf_champions_league\" text\n);\n\nQuestion: What Canadian Championship has 84 (4) as the league?"
},
{
"role": "assistant",
"content": "SELECT \"canadian_championship\" FROM \"most_appearances\" WHERE \"league\"='84 (4)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"name\" text,\n \"total\" text,\n \"league\" text,\n \"canadian_championship\" text,\n \"concacaf_champions_league\" text\n);\n\nQuestion: What Canadian Championship has Ashtone Morgan Category:Articles with hcards as the name?"
},
{
"role": "assistant",
"content": "SELECT \"canadian_championship\" FROM \"most_appearances\" WHERE \"name\"='ashtone morgan category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"name\" text,\n \"total\" text,\n \"league\" text,\n \"canadian_championship\" text,\n \"concacaf_champions_league\" text\n);\n\nQuestion: What is the total when the name is Carl Robinson Category:Articles with hcards?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"most_appearances\" WHERE \"name\"='carl robinson category:articles with hcards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_appearances\" (\n \"name\" text,\n \"total\" text,\n \"league\" text,\n \"canadian_championship\" text,\n \"concacaf_champions_league\" text\n);\n\nQuestion: What CONCACAF Champions League has 57 (27) as the league?"
},
{
"role": "assistant",
"content": "SELECT \"concacaf_champions_league\" FROM \"most_appearances\" WHERE \"league\"='57 (27)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is Name, when Games are less than 38, when Rank is less than 4, and when Points are 357?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"rebounds\" WHERE \"games\"<38 AND \"rank\"<4 AND \"points\"=357;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is Team, when Rank is greater than 2, and when Points are greater than 259?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"rebounds\" WHERE \"rank\">2 AND \"points\">259;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What are the Highest Games, when Team is Ciudad De La Laguna, and when Points are greater than 357?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"games\") FROM \"rebounds\" WHERE \"team\"='ciudad de la laguna' AND \"points\">357;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is Points, when Name is Ondrej Starosta?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"rebounds\" WHERE \"name\"='ondrej starosta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the lowest value for Points, when Games is greater than 34, and when Name is Andrew Panko?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"points\") FROM \"rebounds\" WHERE \"games\">34 AND \"name\"='andrew panko';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"rebounds\" (\n \"rank\" real,\n \"name\" text,\n \"team\" text,\n \"games\" real,\n \"points\" real\n);\n\nQuestion: What is the highest value for Points, when Games is 21, and when Rank is greater than 2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"rebounds\" WHERE \"games\"=21 AND \"rank\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_best_throwers_of_all_time_current_\" (\n \"rank\" real,\n \"mark\" real,\n \"athlete\" text,\n \"place\" text,\n \"date\" text\n);\n\nQuestion: What is the average rank of the record on 2007-06-21 with a mark less than 91.29?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"men_s_best_throwers_of_all_time_current_\" WHERE \"date\"='2007-06-21' AND \"mark\"<91.29;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_best_throwers_of_all_time_current_\" (\n \"rank\" real,\n \"mark\" real,\n \"athlete\" text,\n \"place\" text,\n \"date\" text\n);\n\nQuestion: What is the lowest mark of the rank 8 record?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"mark\") FROM \"men_s_best_throwers_of_all_time_current_\" WHERE \"rank\"=8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_best_throwers_of_all_time_current_\" (\n \"rank\" real,\n \"mark\" real,\n \"athlete\" text,\n \"place\" text,\n \"date\" text\n);\n\nQuestion: What is the place of the record on 1996-05-25 with a mark greater than 90.73?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"men_s_best_throwers_of_all_time_current_\" WHERE \"mark\">90.73 AND \"date\"='1996-05-25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men_s_best_throwers_of_all_time_current_\" (\n \"rank\" real,\n \"mark\" real,\n \"athlete\" text,\n \"place\" text,\n \"date\" text\n);\n\nQuestion: What is the place of the rank 6 record, which has a mark greater than 91.29?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"men_s_best_throwers_of_all_time_current_\" WHERE \"mark\">91.29 AND \"rank\"=6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What competition has a venue in Hampden Park, Glasgow?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"venue\"='hampden park, glasgow';"
}
] |
[
{
"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 was the score in Hampden Park, Glasgow?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"venue\"='hampden park, glasgow';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: Which Venue has a Notes of 2:28:31?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"notes\"='2:28:31';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: Which Venue has a Competition of venice marathon?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"achievements\" WHERE \"competition\"='venice marathon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: Which Year that has Notes of dnf?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"notes\"='dnf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: Which Competition has a Year larger than 2000?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"achievements\" WHERE \"year\">2000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_pool_f\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What date has a set 4 of 25-19?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"results_pool_f\" WHERE \"set_4\"='25-19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_pool_f\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the total for the set 2 of 25-18?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"results_pool_f\" WHERE \"set_2\"='25-18';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_pool_f\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the total for set 2 of 25-19?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"results_pool_f\" WHERE \"set_2\"='25-19';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_pool_f\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is set 3 when set 5 is na, set 1 is 21-25, and set 2 is 25-16?"
},
{
"role": "assistant",
"content": "SELECT \"set_3\" FROM \"results_pool_f\" WHERE \"set_5\"='na' AND \"set_1\"='21-25' AND \"set_2\"='25-16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_pool_f\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the set 1 for the date jun 26, and a set 2 of 25-16?"
},
{
"role": "assistant",
"content": "SELECT \"set_1\" FROM \"results_pool_f\" WHERE \"date\"='jun 26' AND \"set_2\"='25-16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"results_pool_f\" (\n \"date\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"set_4\" text,\n \"set_5\" text,\n \"total\" text\n);\n\nQuestion: What is the total for set 2 17-25?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"results_pool_f\" WHERE \"set_2\"='17-25';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_finals_18_11_7\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What Opponent has a Score that is 1-6, 3-6?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"singles_finals_18_11_7\" WHERE \"score\"='1-6, 3-6';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: What writer has mort drucker as the artist, an issue greater than 470, and law & order: svu as an actual title?"
},
{
"role": "assistant",
"content": "SELECT \"writer\" FROM \"2000s\" WHERE \"artist\"='mort drucker' AND \"issue\">470 AND \"actual_title\"='law & order: svu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: What date has ed as an actual title?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2000s\" WHERE \"actual_title\"='ed';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: What isssue has 7th heaven as an actual title?"
},
{
"role": "assistant",
"content": "SELECT \"issue\" FROM \"2000s\" WHERE \"actual_title\"='7th heaven';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000s\" (\n \"actual_title\" text,\n \"writer\" text,\n \"artist\" text,\n \"issue\" real,\n \"date\" text\n);\n\nQuestion: What issue has mort drucker as the artist and february 2001 as the date?"
},
{
"role": "assistant",
"content": "SELECT \"issue\" FROM \"2000s\" WHERE \"artist\"='mort drucker' AND \"date\"='february 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: In what Week was the Attendance 39,434?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"<'39,434';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the first Week against Cincinnati Bengals with an Attendance greater than 58,615?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\">'58,615' AND \"opponent\"='cincinnati bengals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_12_3_titles_9_runners_up\" (\n \"outcome\" text,\n \"year\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What year was the match were xavier malisse was the runner-up against lleyton hewitt?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"singles_12_3_titles_9_runners_up\" WHERE \"outcome\"='runner-up' AND \"opponent\"='lleyton hewitt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_12_3_titles_9_runners_up\" (\n \"outcome\" text,\n \"year\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What year was the match against filippo volandri where xavier malisse was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"singles_12_3_titles_9_runners_up\" WHERE \"outcome\"='runner-up' AND \"opponent\"='filippo volandri';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laf_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: How many against have a difference of 6, with a played greater than 19?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"laf_s_campeonato_paulista\" WHERE \"difference\"='6' AND \"played\">19;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laf_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the lowest drawn that has a played greater than 19, with a position less than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"drawn\") FROM \"laf_s_campeonato_paulista\" WHERE \"played\">19 AND \"position\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"laf_s_campeonato_paulista\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: What is the average against that has a drawn less than 7, points greater than 22, and 19 for the played?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"against\") FROM \"laf_s_campeonato_paulista\" WHERE \"drawn\"<7 AND \"points\">22 AND \"played\"=19;"
}
] |
[
{
"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 \"tv_time\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: When has a TV Time of fox 12:00 pm cdt?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"tv_time\"='fox 12:00 pm cdt';"
}
] |
[
{
"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 \"tv_time\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: When has a Week of 8?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=8;"
}
] |
[
{
"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 \"tv_time\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: Which Week has a Result of l 13-16 and an Opponent of at buffalo bills?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"schedule\" WHERE \"result\"='l 13-16' AND \"opponent\"='at buffalo bills';"
}
] |
[
{
"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 \"tv_time\" text,\n \"opponent\" text,\n \"result\" text\n);\n\nQuestion: What kind of TV Time that has a Result of w 24\u201310?"
},
{
"role": "assistant",
"content": "SELECT \"tv_time\" FROM \"schedule\" WHERE \"result\"='w 24\u201310';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What played at 8:00 when Grey's Anatomy played at 9:00 and Ugly Betty played at 8:30?"
},
{
"role": "assistant",
"content": "SELECT \"8_00\" FROM \"thursday\" WHERE \"9_00\"='grey''s anatomy' AND \"8_30\"='ugly betty';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What played at 8:00 when there was local programming at 10:00 and Supernatural played at 9:00?"
},
{
"role": "assistant",
"content": "SELECT \"8_00\" FROM \"thursday\" WHERE \"10_00\"='local programming' AND \"9_00\"='supernatural';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What show played at 8:00 when Ugly Betty played at 8:30?"
},
{
"role": "assistant",
"content": "SELECT \"8_00\" FROM \"thursday\" WHERE \"8_30\"='ugly betty';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: When Grey's Anatomy aired at 9:30 what aired at 9:00?"
},
{
"role": "assistant",
"content": "SELECT \"9_00\" FROM \"thursday\" WHERE \"9_30\"='grey''s anatomy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: When My Name is Earl played at 8:00 what aired at 9:30?"
},
{
"role": "assistant",
"content": "SELECT \"9_30\" FROM \"thursday\" WHERE \"8_00\"='my name is earl';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conf\" text,\n \"conf_finish\" text,\n \"div\" text,\n \"div_finish\" text,\n \"head_coach\" text\n);\n\nQuestion: What was the division when Jim O'Brien was the head coach and the team finished 2nd in the division?"
},
{
"role": "assistant",
"content": "SELECT \"div\" FROM \"seasons\" WHERE \"div_finish\"='2nd' AND \"head_coach\"='jim o''brien';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"conf\" text,\n \"conf_finish\" text,\n \"div\" text,\n \"div_finish\" text,\n \"head_coach\" text\n);\n\nQuestion: What is the name of the conference that K. C. Jones was a head coach in?"
},
{
"role": "assistant",
"content": "SELECT \"conf\" FROM \"seasons\" WHERE \"head_coach\"='k. c. jones';"
}
] |
[
{
"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 highest assists of the game on March 5?"
},
{
"role": "assistant",
"content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"date\"='march 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"appearances\" real,\n \"goals\" real\n);\n\nQuestion: What is the least amount of appearances by new zealand when they scored 4 goals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"appearances\") FROM \"players\" WHERE \"goals\"=4 AND \"nationality\"='new zealand';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"players\" (\n \"name\" text,\n \"nationality\" text,\n \"position\" text,\n \"appearances\" real,\n \"goals\" real\n);\n\nQuestion: how many appearances did batram suri category:articles with hcards have scoring less than 2 goals?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"appearances\") FROM \"players\" WHERE \"name\"='batram suri category:articles with hcards' AND \"goals\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_provinces\" (\n \"region\" text,\n \"province\" text,\n \"capital\" text,\n \"no_of_communes\" real,\n \"area\" real,\n \"2002_population\" real\n);\n\nQuestion: What region has a 2002 population greater than 132,798, an area larger than 5,528.3, and the cachapoal province?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"list_of_provinces\" WHERE \"2002_population\">'132,798' AND \"area\">'5,528.3' AND \"province\"='cachapoal';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_provinces\" (\n \"region\" text,\n \"province\" text,\n \"capital\" text,\n \"no_of_communes\" real,\n \"area\" real,\n \"2002_population\" real\n);\n\nQuestion: What is the total 2002 population of the province with putre as the capital, less than 3 communes, and an area larger than 11,919.5?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2002_population\") FROM \"list_of_provinces\" WHERE \"no_of_communes\"<3 AND \"area\">'11,919.5' AND \"capital\"='putre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_provinces\" (\n \"region\" text,\n \"province\" text,\n \"capital\" text,\n \"no_of_communes\" real,\n \"area\" real,\n \"2002_population\" real\n);\n\nQuestion: What province has a v valpara\u00edso region and an area of 927.2?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"list_of_provinces\" WHERE \"region\"='v valpara\u00edso' AND \"area\"=927.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_provinces\" (\n \"region\" text,\n \"province\" text,\n \"capital\" text,\n \"no_of_communes\" real,\n \"area\" real,\n \"2002_population\" real\n);\n\nQuestion: What is the average area with valpara\u00edso as the capital?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"area\") FROM \"list_of_provinces\" WHERE \"capital\"='valpara\u00edso';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"controversy\" (\n \"category\" text,\n \"frequency\" text,\n \"white\" text,\n \"brown\" text,\n \"black\" text,\n \"amerindian\" text,\n \"yellow\" text,\n \"total\" text,\n \"difference_between_white_and_black\" real\n);\n\nQuestion: WHich Category in White has a Amerindian of 4,87%?"
},
{
"role": "assistant",
"content": "SELECT \"white\" FROM \"controversy\" WHERE \"amerindian\"='4,87%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"controversy\" (\n \"category\" text,\n \"frequency\" text,\n \"white\" text,\n \"brown\" text,\n \"black\" text,\n \"amerindian\" text,\n \"yellow\" text,\n \"total\" text,\n \"difference_between_white_and_black\" real\n);\n\nQuestion: WHich Category in White has a Black of 38,05%?"
},
{
"role": "assistant",
"content": "SELECT \"white\" FROM \"controversy\" WHERE \"black\"='38,05%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"controversy\" (\n \"category\" text,\n \"frequency\" text,\n \"white\" text,\n \"brown\" text,\n \"black\" text,\n \"amerindian\" text,\n \"yellow\" text,\n \"total\" text,\n \"difference_between_white_and_black\" real\n);\n\nQuestion: Which Category in Brown has a Frequency of 0.08%?"
},
{
"role": "assistant",
"content": "SELECT \"brown\" FROM \"controversy\" WHERE \"frequency\"='0.08%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"controversy\" (\n \"category\" text,\n \"frequency\" text,\n \"white\" text,\n \"brown\" text,\n \"black\" text,\n \"amerindian\" text,\n \"yellow\" text,\n \"total\" text,\n \"difference_between_white_and_black\" real\n);\n\nQuestion: Which Category in Black has a Brown of 6,54%?"
},
{
"role": "assistant",
"content": "SELECT \"black\" FROM \"controversy\" WHERE \"brown\"='6,54%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"brazil_s_15_busiest_airports_by_passenge\" (\n \"rank\" real,\n \"location\" text,\n \"total_passengers\" real,\n \"annual_change\" text,\n \"capacity_in_use\" text\n);\n\nQuestion: What is the Capacity in use with an Annual change that is 21.8%?"
},
{
"role": "assistant",
"content": "SELECT \"capacity_in_use\" FROM \"brazil_s_15_busiest_airports_by_passenge\" WHERE \"annual_change\"='21.8%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text\n);\n\nQuestion: How many Tries has Points for smaller than 137, and Tries against larger than 12?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tries_for\") FROM \"pool_2\" WHERE \"points_for\"<137 AND \"tries_against\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text\n);\n\nQuestion: WHich Team that has Points against of 43?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"pool_2\" WHERE \"points_against\"=43;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text\n);\n\nQuestion: WHich Tries has a Team of pau and Points against larger than 103?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"tries_for\") FROM \"pool_2\" WHERE \"team\"='pau' AND \"points_against\">103;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text\n);\n\nQuestion: How many Points against has Tries for smaller than 14, and a Team of llanelli?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"points_against\") FROM \"pool_2\" WHERE \"tries_for\"<14 AND \"team\"='llanelli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_2\" (\n \"team\" text,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text\n);\n\nQuestion: How many Tries against has a Try diff of \u201317 and Points for smaller than 80?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tries_against\") FROM \"pool_2\" WHERE \"try_diff\"='\u201317' AND \"points_for\"<80;"
}
] |
[
{
"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 \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which player was the forward?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"p\" WHERE \"position\"='forward';"
}
] |
[
{
"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 \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which years in Orlando are featured with the center position?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_orlando\" FROM \"p\" WHERE \"position\"='center';"
}
] |
[
{
"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 \"position\" text,\n \"years_in_orlando\" text,\n \"school_club_team\" text\n);\n\nQuestion: Which position was in Orlando in 2000?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"p\" WHERE \"years_in_orlando\"='2000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who were the winners of the Women's Doubles in the years after 2009?"
},
{
"role": "assistant",
"content": "SELECT \"women_s_doubles\" FROM \"past_winners\" WHERE \"year\">2009;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"past_winners\" (\n \"year\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who were the Men's doubles of the years that had Krist\u00edna Lud\u00edkov\u00e1 as Women's singles after the year 2008?"
},
{
"role": "assistant",
"content": "SELECT \"men_s_doubles\" FROM \"past_winners\" WHERE \"women_s_singles\"='krist\u00edna lud\u00edkov\u00e1' AND \"year\">2008;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_top_association_football_goal_sc\" (\n \"rank\" real,\n \"name\" text,\n \"years\" text,\n \"matches\" real,\n \"goals\" real\n);\n\nQuestion: What is the Name with Goals that are 135?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_top_association_football_goal_sc\" WHERE \"goals\"=135;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1938_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Which American Labor candidate ran against Democratic candidate Robert F. Wagner?"
},
{
"role": "assistant",
"content": "SELECT \"american_labor_ticket\" FROM \"1938_state_election_results\" WHERE \"democratic_ticket\"='robert f. wagner';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1938_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Which Socialist candidate ran against American Labor candidate Caroline O'Day?"
},
{
"role": "assistant",
"content": "SELECT \"socialist_ticket\" FROM \"1938_state_election_results\" WHERE \"american_labor_ticket\"='caroline o''day';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1938_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Which Democrtic candidate ran against the Socialist candidate Edna Mitchell Blue?"
},
{
"role": "assistant",
"content": "SELECT \"democratic_ticket\" FROM \"1938_state_election_results\" WHERE \"socialist_ticket\"='edna mitchell blue';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1938_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Which American Labor candidate is running against the Socialist candidate Herman J. Hahn?"
},
{
"role": "assistant",
"content": "SELECT \"american_labor_ticket\" FROM \"1938_state_election_results\" WHERE \"socialist_ticket\"='herman j. hahn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1938_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Which Republican ran against the American Labor candidate Matthew J. Merritt?"
},
{
"role": "assistant",
"content": "SELECT \"republican_ticket\" FROM \"1938_state_election_results\" WHERE \"american_labor_ticket\"='matthew j. merritt';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1938_state_election_results\" (\n \"office\" text,\n \"democratic_ticket\" text,\n \"republican_ticket\" text,\n \"american_labor_ticket\" text,\n \"socialist_ticket\" text\n);\n\nQuestion: Which American Labor candidate ran against Republican Thomas E. Dewey?"
},
{
"role": "assistant",
"content": "SELECT \"american_labor_ticket\" FROM \"1938_state_election_results\" WHERE \"republican_ticket\"='thomas e. dewey';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles_2\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Who is the Opponent in the final after 1983 with an Outcome of runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_titles_2\" WHERE \"outcome\"='runner-up' AND \"date\">1983;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles_2\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What Opponent in the final had a match with a Score in the final of 7\u20135, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"opponent_in_the_final\" FROM \"singles_titles_2\" WHERE \"score_in_the_final\"='7\u20135, 6\u20132';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles_titles_2\" (\n \"outcome\" text,\n \"date\" real,\n \"championship\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: What is the Championship with Vitas Gerulaitis as Opponent in the final in a match on Clay Surface?"
},
{
"role": "assistant",
"content": "SELECT \"championship\" FROM \"singles_titles_2\" WHERE \"surface\"='clay' AND \"opponent_in_the_final\"='vitas gerulaitis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"marine_ecozones\" (\n \"ecozone\" text,\n \"area_km_territorial_waters\" real,\n \"area_km_exclusive_economic_zone\" real,\n \"percentage_of_total_area_for_eez\" real,\n \"percentage_of_marine_area_for_eez\" real\n);\n\nQuestion: What is the sum of percentage of marine area with an area of territorial waters of 72,144 and exclusive economic zone area less than 996,439?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"percentage_of_marine_area_for_eez\") FROM \"marine_ecozones\" WHERE \"area_km_territorial_waters\"='72,144' AND \"area_km_exclusive_economic_zone\"<'996,439';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"marine_ecozones\" (\n \"ecozone\" text,\n \"area_km_territorial_waters\" real,\n \"area_km_exclusive_economic_zone\" real,\n \"percentage_of_total_area_for_eez\" real,\n \"percentage_of_marine_area_for_eez\" real\n);\n\nQuestion: What is the smallest percentage of marine area for Pacific Marine ecozone and percentage of total area greater than 3.1?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"percentage_of_marine_area_for_eez\") FROM \"marine_ecozones\" WHERE \"ecozone\"='pacific marine' AND \"percentage_of_total_area_for_eez\">3.1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"marine_ecozones\" (\n \"ecozone\" text,\n \"area_km_territorial_waters\" real,\n \"area_km_exclusive_economic_zone\" real,\n \"percentage_of_total_area_for_eez\" real,\n \"percentage_of_marine_area_for_eez\" real\n);\n\nQuestion: How many values for percentage of marine area are for the Atlantic marine ecozone with an exclusive economic zone area less than 996,439?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"percentage_of_marine_area_for_eez\") FROM \"marine_ecozones\" WHERE \"ecozone\"='atlantic marine' AND \"area_km_exclusive_economic_zone\"<'996,439';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"marine_ecozones\" (\n \"ecozone\" text,\n \"area_km_territorial_waters\" real,\n \"area_km_exclusive_economic_zone\" real,\n \"percentage_of_total_area_for_eez\" real,\n \"percentage_of_marine_area_for_eez\" real\n);\n\nQuestion: What is the average percentage of total area when the percentage of marine area is more than 39.3 and territorial waters area is less than 2,788,349?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"percentage_of_total_area_for_eez\") FROM \"marine_ecozones\" WHERE \"percentage_of_marine_area_for_eez\">39.3 AND \"area_km_territorial_waters\"<'2,788,349';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"marine_ecozones\" (\n \"ecozone\" text,\n \"area_km_territorial_waters\" real,\n \"area_km_exclusive_economic_zone\" real,\n \"percentage_of_total_area_for_eez\" real,\n \"percentage_of_marine_area_for_eez\" real\n);\n\nQuestion: What is the smallest area of territorial waters with an exclusive economic zone area more than 704,849 and a percentage of total area greater than 6.8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"area_km_territorial_waters\") FROM \"marine_ecozones\" WHERE \"area_km_exclusive_economic_zone\">'704,849' AND \"percentage_of_total_area_for_eez\">6.8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"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: What is the team when alvin williams (6) has the high assists?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_assists\"='alvin williams (6)';"
}
] |
[
{
"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: What is the Record for a game less than 3 and the score was l 91\u201396 (ot)?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"game\"<3 AND \"score\"='l 91\u201396 (ot)';"
}
] |
[
{
"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: What is the Date when the high points went to Dell Curry (17)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"high_points\"='dell curry (17)';"
}
] |
[
{
"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: What is the Team when antonio davis (8) had the high rebounds?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"game_log\" WHERE \"high_rebounds\"='antonio davis (8)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_11\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Tournament with a Date that is apr 16, 1967?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"pga_tour_wins_11\" WHERE \"date\"='apr 16, 1967';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_11\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What is the Date with a Runner(s)-up that is jerry steelsmith?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pga_tour_wins_11\" WHERE \"runner_s_up\"='jerry steelsmith';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"source\" text,\n \"date\" text,\n \"clinton\" text,\n \"obama\" text,\n \"undecided\" text\n);\n\nQuestion: What kind of Obama that has a Source of rasmussen reports?"
},
{
"role": "assistant",
"content": "SELECT \"obama\" FROM \"polling\" WHERE \"source\"='rasmussen reports';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"source\" text,\n \"date\" text,\n \"clinton\" text,\n \"obama\" text,\n \"undecided\" text\n);\n\nQuestion: Which Source has a Undecided of 2%?"
},
{
"role": "assistant",
"content": "SELECT \"source\" FROM \"polling\" WHERE \"undecided\"='2%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"source\" text,\n \"date\" text,\n \"clinton\" text,\n \"obama\" text,\n \"undecided\" text\n);\n\nQuestion: What kind of Obama has a Undecided of 1%?"
},
{
"role": "assistant",
"content": "SELECT \"obama\" FROM \"polling\" WHERE \"undecided\"='1%';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.