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 \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" text,\n \"density\" text\n);\n\nQuestion: What is the density when simplified shows \u5357\u5c71\u533a?"
},
{
"role": "assistant",
"content": "SELECT \"density\" FROM \"subdivisions\" WHERE \"simplified\"='\u5357\u5c71\u533a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"subdivisions\" (\n \"english_name\" text,\n \"simplified\" text,\n \"traditional\" text,\n \"pinyin\" text,\n \"area\" text,\n \"population\" text,\n \"density\" text\n);\n\nQuestion: What is the pinyin when the simplified shows \u5357\u5c71\u533a?"
},
{
"role": "assistant",
"content": "SELECT \"pinyin\" FROM \"subdivisions\" WHERE \"simplified\"='\u5357\u5c71\u533a';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What country does Greg Norman represent?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"player\"='greg norman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What years won have a total of 286?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"total\"=286;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: Which player had a total of 295?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\"=295;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What is the To par when there was a total of 291?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"total\"=291;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"builder\" text,\n \"model\" text,\n \"years_of_daylight_service\" text,\n \"retired\" text,\n \"current_disposition\" text\n);\n\nQuestion: What is the year of daylight service when the builder was Alco?"
},
{
"role": "assistant",
"content": "SELECT \"years_of_daylight_service\" FROM \"locomotives\" WHERE \"builder\"='alco';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"club_home_city\" text,\n \"2006_07_season\" text,\n \"stadium\" text,\n \"stadium_capacity\" text\n);\n\nQuestion: What is 2006-07 Season, when Team is \"KF Fush\u00eb Kosova\"?"
},
{
"role": "assistant",
"content": "SELECT \"2006_07_season\" FROM \"teams\" WHERE \"team\"='kf fush\u00eb kosova';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"club_home_city\" text,\n \"2006_07_season\" text,\n \"stadium\" text,\n \"stadium_capacity\" text\n);\n\nQuestion: What is 2006-07 Season, when Stadium Capacity is \"0 2,500\"?"
},
{
"role": "assistant",
"content": "SELECT \"2006_07_season\" FROM \"teams\" WHERE \"stadium_capacity\"='0 2,500';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"club_home_city\" text,\n \"2006_07_season\" text,\n \"stadium\" text,\n \"stadium_capacity\" text\n);\n\nQuestion: What is Stadium Capacity, when 2006-07 Season is \"12th\"?"
},
{
"role": "assistant",
"content": "SELECT \"stadium_capacity\" FROM \"teams\" WHERE \"2006_07_season\"='12th';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"club_home_city\" text,\n \"2006_07_season\" text,\n \"stadium\" text,\n \"stadium_capacity\" text\n);\n\nQuestion: What is Stadium, when Club Home City is \"Pe\u0107\", and when 2006-07 Season is \"1st\"?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"teams\" WHERE \"club_home_city\"='pe\u0107' AND \"2006_07_season\"='1st';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"club_home_city\" text,\n \"2006_07_season\" text,\n \"stadium\" text,\n \"stadium_capacity\" text\n);\n\nQuestion: What is Club Home City, when Stadium Capacity is \"0 2,500\"?"
},
{
"role": "assistant",
"content": "SELECT \"club_home_city\" FROM \"teams\" WHERE \"stadium_capacity\"='0 2,500';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"team\" text,\n \"club_home_city\" text,\n \"2006_07_season\" text,\n \"stadium\" text,\n \"stadium_capacity\" text\n);\n\nQuestion: What is Stadium, when Stadium Capacity is \"10,000\", and when Team is \"KF Drita\"?"
},
{
"role": "assistant",
"content": "SELECT \"stadium\" FROM \"teams\" WHERE \"stadium_capacity\"='10,000' AND \"team\"='kf drita';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is Year(s) Won, when Total is \"145\", and when Country is \"United States\"?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"missed_the_cut\" WHERE \"total\"=145 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 \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the lowest To par, when Total is greater than 148, and when Year(s) Won is \"1959 , 1968 , 1974\"?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"to_par\") FROM \"missed_the_cut\" WHERE \"total\"<148 AND \"year_s_won\"='1959 , 1968 , 1974';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is Country, when To par is \"1\", and when Player is \"Seve Ballesteros\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"to_par\"=1 AND \"player\"='seve ballesteros';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is the sum of Total, when Year(s) Won is \"1966 , 1970 , 1978\", and when To par is less than 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total\") FROM \"missed_the_cut\" WHERE \"year_s_won\"='1966 , 1970 , 1978' AND \"to_par\"<4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is Country, when Total is less than 148, and when Player is \"Gary Player\"?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"missed_the_cut\" WHERE \"total\"<148 AND \"player\"='gary player';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missed_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" real\n);\n\nQuestion: What is To par, when Total is less than 148, and when Country is \"South Africa\"?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"missed_the_cut\" WHERE \"total\"<148 AND \"country\"='south africa';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"political_assistants\" (\n \"romanised_name\" text,\n \"chinese_name\" text,\n \"age_at_appointment\" real,\n \"foreign_nationality\" text,\n \"portfolio_attachment\" text,\n \"govt_salary\" text\n);\n\nQuestion: What is the average age at appointment of those attached to security?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"age_at_appointment\") FROM \"political_assistants\" WHERE \"portfolio_attachment\"='security';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: What was the distance of the race on saturday, august 23?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"schedule\" WHERE \"date\"='saturday, august 23';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: Who was the winner of the race that had a distance of 175.6km?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"schedule\" WHERE \"distance\"='175.6km';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: Who won the race on wednesday, august 27?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"schedule\" WHERE \"date\"='wednesday, august 27';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: What is the distance of the maldegem > brussels route?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"schedule\" WHERE \"route\"='maldegem > brussels';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"stage\" text,\n \"route\" text,\n \"distance\" text,\n \"date\" text,\n \"winner\" text\n);\n\nQuestion: Who was the winner of the mechelen > mechelen route?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"schedule\" WHERE \"route\"='mechelen > mechelen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison\" (\n \"name\" text,\n \"mail_transfer_agent\" text,\n \"mail_storage_type\" text,\n \"imap_server\" text,\n \"imap_shared\" text,\n \"calendar_format\" text,\n \"calendar_shared\" text,\n \"im_server\" text,\n \"web_dav\" text,\n \"web_ui\" text,\n \"contacts_shared\" text,\n \"files_shared\" text,\n \"web_admin_ui\" text\n);\n\nQuestion: What IMAP sharing options exist for software with a web UI?"
},
{
"role": "assistant",
"content": "SELECT \"imap_shared\" FROM \"comparison\" WHERE \"web_ui\"='web ui';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: What's the total for the wc belgrade event with 10 rank points?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"qualification\" WHERE \"event\"='wc belgrade' AND \"rank_points\"='10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: That's the total for rank points of olympic gold medalist?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"qualification\" WHERE \"rank_points\"='olympic gold medalist';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: Who's the shooter with score points of defending champion?"
},
{
"role": "assistant",
"content": "SELECT \"shooter\" FROM \"qualification\" WHERE \"score_points\"='defending champion';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: Who's the shooter with a total of 25?"
},
{
"role": "assistant",
"content": "SELECT \"shooter\" FROM \"qualification\" WHERE \"total\"='25';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"qualification\" (\n \"shooter\" text,\n \"event\" text,\n \"rank_points\" text,\n \"score_points\" text,\n \"total\" text\n);\n\nQuestion: Who's the shooter with 13 score points and 10 rank points?"
},
{
"role": "assistant",
"content": "SELECT \"shooter\" FROM \"qualification\" WHERE \"score_points\"='13' AND \"rank_points\"='10';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_of_tunisia\" (\n \"season\" real,\n \"years\" text,\n \"final_standing\" real,\n \"points\" real,\n \"top_goal_scorer\" text\n);\n\nQuestion: What is the highest points when the top goal scorer was Khaled Msakni (10), and the final standing is less than 12?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"championship_of_tunisia\" WHERE \"top_goal_scorer\"='khaled msakni (10)' AND \"final_standing\"<12;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"championship_of_tunisia\" (\n \"season\" real,\n \"years\" text,\n \"final_standing\" real,\n \"points\" real,\n \"top_goal_scorer\" text\n);\n\nQuestion: What is the final standing in 1981\u201382?"
},
{
"role": "assistant",
"content": "SELECT \"final_standing\" FROM \"championship_of_tunisia\" WHERE \"years\"='1981\u201382';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"quake_iv\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: Which event had 4th place and took place in the year 2007?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"quake_iv\" WHERE \"position\"='4th' AND \"year\"=2007;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What runner-up has 4 & 3 as the score, with michael bonallack as the winner?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"winners\" WHERE \"score\"='4 & 3' AND \"winner\"='michael bonallack';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What venue has 3 & 2 as the score, and 1965 as the year?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"winners\" WHERE \"score\"='3 & 2' AND \"year\"='1965';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What runner-up has 2008 as the year?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"winners\" WHERE \"year\"='2008';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What winner has royal st george's golf club as the venue, and 1969 as the year?"
},
{
"role": "assistant",
"content": "SELECT \"winner\" FROM \"winners\" WHERE \"venue\"='royal st george''s golf club' AND \"year\"='1969';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What runner-up has 1925 as the year?"
},
{
"role": "assistant",
"content": "SELECT \"runner_up\" FROM \"winners\" WHERE \"year\"='1925';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"winners\" (\n \"year\" text,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"score\" text\n);\n\nQuestion: What year has John Davies as the runner-up, with warren humphreys as the winner?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"winners\" WHERE \"runner_up\"='john davies' AND \"winner\"='warren humphreys';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"segunda_divisi_n\" (\n \"ranking\" text,\n \"nationality\" text,\n \"name\" text,\n \"years\" text,\n \"goals\" real\n);\n\nQuestion: What country is the player who scored 27 goals from?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"segunda_divisi_n\" WHERE \"goals\"=27;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"segunda_divisi_n\" (\n \"ranking\" text,\n \"nationality\" text,\n \"name\" text,\n \"years\" text,\n \"goals\" real\n);\n\nQuestion: For the player that scored 27 goals, what years did he score them?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"segunda_divisi_n\" WHERE \"goals\"=27;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: In what place(s) did the player(s) with a total less than 282 finish?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"total\"<282;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_s_won\" text,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: In what place did Nick Faldo, who had more than 284 points and a to par score of +5, finish?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"total\">284 AND \"to_par\"='+5' AND \"player\"='nick faldo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list\" (\n \"name_a\" text,\n \"country\" text,\n \"office\" text,\n \"mandate_start\" text,\n \"mandate_end\" text,\n \"term_length\" text\n);\n\nQuestion: When did Prime Minister Agathe Uwilingiyimana's mandate end?"
},
{
"role": "assistant",
"content": "SELECT \"mandate_end\" FROM \"list\" WHERE \"office\"='prime minister' AND \"name_a\"='agathe uwilingiyimana';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_rolling_stock\" (\n \"class\" text,\n \"introduced\" text,\n \"number_in_class\" real,\n \"number_in_service\" real,\n \"power_output_k_w\" real\n);\n\nQuestion: What is the power output for class 5?"
},
{
"role": "assistant",
"content": "SELECT \"power_output_k_w\" FROM \"current_rolling_stock\" WHERE \"number_in_class\"=5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_rolling_stock\" (\n \"class\" text,\n \"introduced\" text,\n \"number_in_class\" real,\n \"number_in_service\" real,\n \"power_output_k_w\" real\n);\n\nQuestion: Which class has a power output larger than 700 and a class of 48?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"current_rolling_stock\" WHERE \"power_output_k_w\">700 AND \"number_in_class\"=48;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"preseason\" text,\n \"week_1_sept_7\" text,\n \"week_2_sept_14\" text,\n \"week_3_sept_21\" text,\n \"week_4_sept_28\" text,\n \"week_5_oct_5\" text,\n \"week_6_oct_12\" text,\n \"week_7_oct_19\" text,\n \"week_8_oct_26\" text,\n \"week_9_nov_2\" text,\n \"week_10_nov_9\" text,\n \"week_11_nov_16\" text,\n \"week_12_nov_23\" text,\n \"week_13_nov_30\" text,\n \"week_14_dec_7\" text,\n \"week_15_final_jan_5\" text\n);\n\nQuestion: What is the Week 8 result of the team that lost to syarcuse (4-2) in Week 7?"
},
{
"role": "assistant",
"content": "SELECT \"week_8_oct_26\" FROM \"ap_poll\" WHERE \"week_7_oct_19\"='syarcuse (4-2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ap_poll\" (\n \"preseason\" text,\n \"week_1_sept_7\" text,\n \"week_2_sept_14\" text,\n \"week_3_sept_21\" text,\n \"week_4_sept_28\" text,\n \"week_5_oct_5\" text,\n \"week_6_oct_12\" text,\n \"week_7_oct_19\" text,\n \"week_8_oct_26\" text,\n \"week_9_nov_2\" text,\n \"week_10_nov_9\" text,\n \"week_11_nov_16\" text,\n \"week_12_nov_23\" text,\n \"week_13_nov_30\" text,\n \"week_14_dec_7\" text,\n \"week_15_final_jan_5\" text\n);\n\nQuestion: What is the Week 1 result of Colorado State?"
},
{
"role": "assistant",
"content": "SELECT \"week_1_sept_7\" FROM \"ap_poll\" WHERE \"preseason\"='colorado state';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"colorado\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: Who is the incumbent for the Colorado 4 district?"
},
{
"role": "assistant",
"content": "SELECT \"incumbent\" FROM \"colorado\" WHERE \"district\"='colorado 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"colorado\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What district is the incumbent Republican and the incumbent retired to run for governor democratic gain?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"colorado\" WHERE \"party\"='republican' AND \"results\"='retired to run for governor democratic gain';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"colorado\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: In Colorado 6 district what is the party?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"colorado\" WHERE \"district\"='colorado 6';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_titles_23\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: Which tournament had a clay surface and a score of 6\u20131, 3\u20136, 6\u20132?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_titles_23\" WHERE \"surface\"='clay' AND \"score_in_the_final\"='6\u20131, 3\u20136, 6\u20132';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_titles_23\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score_in_the_final\" text\n);\n\nQuestion: How many days had a score of 4\u20136, 4\u20136?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"date\") FROM \"doubles_titles_23\" WHERE \"score_in_the_final\"='4\u20136, 4\u20136';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"made_the_cut\" (\n \"player\" text,\n \"country\" text,\n \"year_won\" real,\n \"total\" real,\n \"to_par\" text,\n \"finish\" text\n);\n\nQuestion: What was the To Par of Tiger Woods who won in 1988?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"year_won\"=1988;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_targets\" (\n \"name\" text,\n \"public\" text,\n \"intranet\" text,\n \"extranet\" text,\n \"personal_sites\" text,\n \"team_sites\" text,\n \"developer\" text\n);\n\nQuestion: What is the team sites entry for Microsoft Sharepoint?"
},
{
"role": "assistant",
"content": "SELECT \"team_sites\" FROM \"comparison_of_targets\" WHERE \"name\"='microsoft sharepoint';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_targets\" (\n \"name\" text,\n \"public\" text,\n \"intranet\" text,\n \"extranet\" text,\n \"personal_sites\" text,\n \"team_sites\" text,\n \"developer\" text\n);\n\nQuestion: If the intranet entry is Yes, what is the extranet entry for Microsoft Exchange server?"
},
{
"role": "assistant",
"content": "SELECT \"extranet\" FROM \"comparison_of_targets\" WHERE \"intranet\"='yes' AND \"name\"='microsoft exchange server';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_targets\" (\n \"name\" text,\n \"public\" text,\n \"intranet\" text,\n \"extranet\" text,\n \"personal_sites\" text,\n \"team_sites\" text,\n \"developer\" text\n);\n\nQuestion: What is the team sites entry that has a public entry of No and a developer entry of Yes?"
},
{
"role": "assistant",
"content": "SELECT \"team_sites\" FROM \"comparison_of_targets\" WHERE \"public\"='no' AND \"developer\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_targets\" (\n \"name\" text,\n \"public\" text,\n \"intranet\" text,\n \"extranet\" text,\n \"personal_sites\" text,\n \"team_sites\" text,\n \"developer\" text\n);\n\nQuestion: What is the name for the entry that has a public of Yes, a personal sites of No, and a team sites of No?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"comparison_of_targets\" WHERE \"public\"='yes' AND \"personal_sites\"='no' AND \"team_sites\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_targets\" (\n \"name\" text,\n \"public\" text,\n \"intranet\" text,\n \"extranet\" text,\n \"personal_sites\" text,\n \"team_sites\" text,\n \"developer\" text\n);\n\nQuestion: What is the name of the entry that has a developer entry of Yes and a personal sites entry of No?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"comparison_of_targets\" WHERE \"developer\"='yes' AND \"personal_sites\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"connecting_lines\" (\n \"line_name\" text,\n \"date_closed\" text,\n \"nimt_junction\" text,\n \"terminus\" text,\n \"length\" text\n);\n\nQuestion: What Line has Ohakune Junction as its NIMT?"
},
{
"role": "assistant",
"content": "SELECT \"line_name\" FROM \"connecting_lines\" WHERE \"nimt_junction\"='ohakune junction';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"connecting_lines\" (\n \"line_name\" text,\n \"date_closed\" text,\n \"nimt_junction\" text,\n \"terminus\" text,\n \"length\" text\n);\n\nQuestion: What line has Newmarket Junction terminus?"
},
{
"role": "assistant",
"content": "SELECT \"line_name\" FROM \"connecting_lines\" WHERE \"terminus\"='newmarket junction';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"connecting_lines\" (\n \"line_name\" text,\n \"date_closed\" text,\n \"nimt_junction\" text,\n \"terminus\" text,\n \"length\" text\n);\n\nQuestion: What terminus is 3.5km in lenght?"
},
{
"role": "assistant",
"content": "SELECT \"terminus\" FROM \"connecting_lines\" WHERE \"length\"='3.5km';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"connecting_lines\" (\n \"line_name\" text,\n \"date_closed\" text,\n \"nimt_junction\" text,\n \"terminus\" text,\n \"length\" text\n);\n\nQuestion: What line has Junction of Huntly NIMT"
},
{
"role": "assistant",
"content": "SELECT \"line_name\" FROM \"connecting_lines\" WHERE \"nimt_junction\"='huntly';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_3_balls_3_hoops\" (\n \"place\" real,\n \"nation\" text,\n \"all_around\" real,\n \"final\" real,\n \"total\" real\n);\n\nQuestion: What is the average final with an all around greater than 19.35 and a total over 40?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"final\") FROM \"finals_3_balls_3_hoops\" WHERE \"all_around\">19.35 AND \"total\">40;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"finals_3_balls_3_hoops\" (\n \"place\" real,\n \"nation\" text,\n \"all_around\" real,\n \"final\" real,\n \"total\" real\n);\n\nQuestion: What is the sum of the final for finland, who placed greater than 2 and had an all around larger than 18.9?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"final\") FROM \"finals_3_balls_3_hoops\" WHERE \"place\">2 AND \"nation\"='finland' AND \"all_around\">18.9;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the place of the player with \u00a3140,000 and a 68-68-75-68=279 score?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_round\" WHERE \"money\"='140,000' AND \"score\"='68-68-75-68=279';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the country of player stuart appleby, who has a t1 place?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"final_round\" WHERE \"place\"='t1' AND \"player\"='stuart appleby';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the place of player sergio garc\u00eda, who has \u00a377,500?"
},
{
"role": "assistant",
"content": "SELECT \"place\" FROM \"final_round\" WHERE \"money\"='77,500' AND \"player\"='sergio garc\u00eda';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: What is the to par of the player with a 73-70-70-65=278 score?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"final_round\" WHERE \"score\"='73-70-70-65=278';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" text\n);\n\nQuestion: Who is the player with \u00a3140,000?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"final_round\" WHERE \"money\"='140,000';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is Date, when Time is \"56.49\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"men\" WHERE \"time\"='56.49';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is Event, when Date is \"19 December 2009\"?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"men\" WHERE \"date\"='19 december 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is Time, when Meet is \"Duel in the Pool\", and when Date is \"19 December 2009\"?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"men\" WHERE \"meet\"='duel in the pool' AND \"date\"='19 december 2009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is the Location, when Event is \"100m Butterfly\"?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"men\" WHERE \"event\"='100m butterfly';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is Date, when Meet is \"World Championships\", when Nationality is \"United States\", and when Time is \"1:46.68\"?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"men\" WHERE \"meet\"='world championships' AND \"nationality\"='united states' AND \"time\"='1:46.68';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"men\" (\n \"event\" text,\n \"time\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What is Event, when Meet is \"World Championships\", and when Time is \"20.51\"?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"men\" WHERE \"meet\"='world championships' AND \"time\"='20.51';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missouri_counties_ranked_by_per_capita_i\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the highest number of households with a median household income of $31,176, and a population of 25,607?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"number_of_households\") FROM \"missouri_counties_ranked_by_per_capita_i\" WHERE \"median_household_income\"='$31,176' AND \"population\"<'25,607';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missouri_counties_ranked_by_per_capita_i\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the median household income for Cape Girardeau?"
},
{
"role": "assistant",
"content": "SELECT \"median_household_income\" FROM \"missouri_counties_ranked_by_per_capita_i\" WHERE \"county\"='cape girardeau';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"missouri_counties_ranked_by_per_capita_i\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the median household income with 4,527 houses, and a median family income of $71,009?"
},
{
"role": "assistant",
"content": "SELECT \"median_household_income\" FROM \"missouri_counties_ranked_by_per_capita_i\" WHERE \"number_of_households\">'4,527' AND \"median_family_income\"='$71,009';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_format\" (\n \"cover_date\" text,\n \"story_title\" text,\n \"writer_s\" text,\n \"letterer_s\" text,\n \"colourist_s\" text\n);\n\nQuestion: Who is the Colourist that has a Story Title of Broken Glass (part 3) and a Letterer of Albers?"
},
{
"role": "assistant",
"content": "SELECT \"colourist_s\" FROM \"third_format\" WHERE \"letterer_s\"='albers' AND \"story_title\"='broken glass (part 3)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_format\" (\n \"cover_date\" text,\n \"story_title\" text,\n \"writer_s\" text,\n \"letterer_s\" text,\n \"colourist_s\" text\n);\n\nQuestion: What is the Cover Date of the Story Title Spacehikers (Part 2)?"
},
{
"role": "assistant",
"content": "SELECT \"cover_date\" FROM \"third_format\" WHERE \"story_title\"='spacehikers (part 2)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_format\" (\n \"cover_date\" text,\n \"story_title\" text,\n \"writer_s\" text,\n \"letterer_s\" text,\n \"colourist_s\" text\n);\n\nQuestion: What is the Story Title that has Albers as the Letterer?"
},
{
"role": "assistant",
"content": "SELECT \"story_title\" FROM \"third_format\" WHERE \"letterer_s\"='albers';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_results\" (\n \"class\" text,\n \"team\" text,\n \"drivers\" text,\n \"laps\" real,\n \"qual_pos\" real\n);\n\nQuestion: Who are the drivers with 133 laps in OC class?"
},
{
"role": "assistant",
"content": "SELECT \"drivers\" FROM \"official_results\" WHERE \"laps\"=133 AND \"class\"='oc';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_results\" (\n \"class\" text,\n \"team\" text,\n \"drivers\" text,\n \"laps\" real,\n \"qual_pos\" real\n);\n\nQuestion: What are the most laps for the Qual position of 7 in the OC class?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"laps\") FROM \"official_results\" WHERE \"class\"='oc' AND \"qual_pos\"=7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_results\" (\n \"class\" text,\n \"team\" text,\n \"drivers\" text,\n \"laps\" real,\n \"qual_pos\" real\n);\n\nQuestion: What are Perkins Engineering's fewest laps?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"official_results\" WHERE \"team\"='perkins engineering';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_results\" (\n \"class\" text,\n \"team\" text,\n \"drivers\" text,\n \"laps\" real,\n \"qual_pos\" real\n);\n\nQuestion: Which class has a Qual position of 30?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"official_results\" WHERE \"qual_pos\"=30;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"zune_hd_applications\" (\n \"title\" text,\n \"developer\" text,\n \"category\" text,\n \"release_date\" text,\n \"version\" text\n);\n\nQuestion: What Release date has a Version of 1.0, a Category of utilities, a Developer of microsoft, and a Title of msn money?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"zune_hd_applications\" WHERE \"version\"='1.0' AND \"category\"='utilities' AND \"developer\"='microsoft' AND \"title\"='msn money';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"zune_hd_applications\" (\n \"title\" text,\n \"developer\" text,\n \"category\" text,\n \"release_date\" text,\n \"version\" text\n);\n\nQuestion: What Release date has a Category of utilities, a Developer of microsoft, and a Title of chord finder?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"zune_hd_applications\" WHERE \"category\"='utilities' AND \"developer\"='microsoft' AND \"title\"='chord finder';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"zune_hd_applications\" (\n \"title\" text,\n \"developer\" text,\n \"category\" text,\n \"release_date\" text,\n \"version\" text\n);\n\nQuestion: What Developer has a Release date of 2010-12-16, and a Title of facebook?"
},
{
"role": "assistant",
"content": "SELECT \"developer\" FROM \"zune_hd_applications\" WHERE \"release_date\"='2010-12-16' AND \"title\"='facebook';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"zune_hd_applications\" (\n \"title\" text,\n \"developer\" text,\n \"category\" text,\n \"release_date\" text,\n \"version\" text\n);\n\nQuestion: What Title has a Version of 1.0.0.3?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"zune_hd_applications\" WHERE \"version\"='1.0.0.3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"zune_hd_applications\" (\n \"title\" text,\n \"developer\" text,\n \"category\" text,\n \"release_date\" text,\n \"version\" text\n);\n\nQuestion: What Version has a Title of alarm clock?"
},
{
"role": "assistant",
"content": "SELECT \"version\" FROM \"zune_hd_applications\" WHERE \"title\"='alarm clock';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"zune_hd_applications\" (\n \"title\" text,\n \"developer\" text,\n \"category\" text,\n \"release_date\" text,\n \"version\" text\n);\n\nQuestion: What Version has a Developer of dino games, and a Title of metronome?"
},
{
"role": "assistant",
"content": "SELECT \"version\" FROM \"zune_hd_applications\" WHERE \"developer\"='dino games' AND \"title\"='metronome';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1981\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Where did Wales play?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1981\" WHERE \"opposing_teams\"='wales';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1981\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What venue has 19 against?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"1981\" WHERE \"against\"=19;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_broadway_revival\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: Which Award Ceremony has a Nominee of sarah travis, and a Category of the best orchestrations?"
},
{
"role": "assistant",
"content": "SELECT \"award_ceremony\" FROM \"2005_broadway_revival\" WHERE \"nominee\"='sarah travis' AND \"category\"='best orchestrations';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_male_capital_artists_singers\" (\n \"english_name\" text,\n \"chinese_name\" text,\n \"year_signed\" real,\n \"year_separated\" text,\n \"reason_for_separation\" text\n);\n\nQuestion: What is the most current year signed for separation of \u2020 and a separation year of 1997?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year_signed\") FROM \"list_of_male_capital_artists_singers\" WHERE \"reason_for_separation\"='\u2020' AND \"year_separated\"='1997';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_male_capital_artists_singers\" (\n \"english_name\" text,\n \"chinese_name\" text,\n \"year_signed\" real,\n \"year_separated\" text,\n \"reason_for_separation\" text\n);\n\nQuestion: What is the Chinese name for the English name Andy Lau?"
},
{
"role": "assistant",
"content": "SELECT \"chinese_name\" FROM \"list_of_male_capital_artists_singers\" WHERE \"english_name\"='andy lau';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_male_capital_artists_singers\" (\n \"english_name\" text,\n \"chinese_name\" text,\n \"year_signed\" real,\n \"year_separated\" text,\n \"reason_for_separation\" text\n);\n\nQuestion: What year was Wilfred Lau separated because Capital stopped recording music?"
},
{
"role": "assistant",
"content": "SELECT \"year_separated\" FROM \"list_of_male_capital_artists_singers\" WHERE \"reason_for_separation\"='capital stopped recording music' AND \"english_name\"='wilfred lau';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_male_capital_artists_singers\" (\n \"english_name\" text,\n \"chinese_name\" text,\n \"year_signed\" real,\n \"year_separated\" text,\n \"reason_for_separation\" text\n);\n\nQuestion: What is the English name for the Chinese name of \u8607\u6c38\u5eb7 later than 1974?"
},
{
"role": "assistant",
"content": "SELECT \"english_name\" FROM \"list_of_male_capital_artists_singers\" WHERE \"year_signed\">1974 AND \"chinese_name\"='\u8607\u6c38\u5eb7';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.