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 \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the score of the game home team gillingham played on 23 january 1982?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fourth_round_proper\" WHERE \"date\"='23 january 1982' AND \"home_team\"='gillingham';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fourth_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What is the tie no of the game that home team huddersfield town played?"
},
{
"role": "assistant",
"content": "SELECT \"tie_no\" FROM \"fourth_round_proper\" WHERE \"home_team\"='huddersfield town';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_st_louis_blues_1\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the home team of the game with a 2-0 record?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"chicago_black_hawks_4_st_louis_blues_1\" WHERE \"record\"='2-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_st_louis_blues_1\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game with a 3-0 record?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"chicago_black_hawks_4_st_louis_blues_1\" WHERE \"record\"='3-0';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_st_louis_blues_1\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the visitor team on April 4?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"chicago_black_hawks_4_st_louis_blues_1\" WHERE \"date\"='april 4';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chicago_black_hawks_4_st_louis_blues_1\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game with the chicago black hawks as the visitor and a 3-1 record?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"chicago_black_hawks_4_st_louis_blues_1\" WHERE \"visitor\"='chicago black hawks' AND \"record\"='3-1';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_features\" (\n \"name\" text,\n \"e_mail_server\" text,\n \"faxing\" text,\n \"instant_messaging\" text,\n \"telephony\" text,\n \"videoconferencing\" text,\n \"web_conferencing\" text,\n \"data_conferencing\" text,\n \"application_sharing\" text,\n \"electronic_meeting_system\" text,\n \"synchronous_conferencing\" text\n);\n\nQuestion: What is Instant Messaging, when Telephony is \"Yes with integrated Sametime\"?"
},
{
"role": "assistant",
"content": "SELECT \"instant_messaging\" FROM \"comparison_of_features\" WHERE \"telephony\"='yes with integrated sametime';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_features\" (\n \"name\" text,\n \"e_mail_server\" text,\n \"faxing\" text,\n \"instant_messaging\" text,\n \"telephony\" text,\n \"videoconferencing\" text,\n \"web_conferencing\" text,\n \"data_conferencing\" text,\n \"application_sharing\" text,\n \"electronic_meeting_system\" text,\n \"synchronous_conferencing\" text\n);\n\nQuestion: What is Videoconferencing, when Synchronous Conferencing is \"No\", when Web Conferencing is \"No\", and when Faxing is \"Yes\"?"
},
{
"role": "assistant",
"content": "SELECT \"videoconferencing\" FROM \"comparison_of_features\" WHERE \"synchronous_conferencing\"='no' AND \"web_conferencing\"='no' AND \"faxing\"='yes';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_features\" (\n \"name\" text,\n \"e_mail_server\" text,\n \"faxing\" text,\n \"instant_messaging\" text,\n \"telephony\" text,\n \"videoconferencing\" text,\n \"web_conferencing\" text,\n \"data_conferencing\" text,\n \"application_sharing\" text,\n \"electronic_meeting_system\" text,\n \"synchronous_conferencing\" text\n);\n\nQuestion: What is Videoconferencing, when Data Conferencing is \"No\", and when Web Conferencing is \"No\"?"
},
{
"role": "assistant",
"content": "SELECT \"videoconferencing\" FROM \"comparison_of_features\" WHERE \"data_conferencing\"='no' AND \"web_conferencing\"='no';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_features\" (\n \"name\" text,\n \"e_mail_server\" text,\n \"faxing\" text,\n \"instant_messaging\" text,\n \"telephony\" text,\n \"videoconferencing\" text,\n \"web_conferencing\" text,\n \"data_conferencing\" text,\n \"application_sharing\" text,\n \"electronic_meeting_system\" text,\n \"synchronous_conferencing\" text\n);\n\nQuestion: What is Application Sharing, when Web Conferencing is \"Web Conferencing\"?"
},
{
"role": "assistant",
"content": "SELECT \"application_sharing\" FROM \"comparison_of_features\" WHERE \"web_conferencing\"='web conferencing';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"comparison_of_features\" (\n \"name\" text,\n \"e_mail_server\" text,\n \"faxing\" text,\n \"instant_messaging\" text,\n \"telephony\" text,\n \"videoconferencing\" text,\n \"web_conferencing\" text,\n \"data_conferencing\" text,\n \"application_sharing\" text,\n \"electronic_meeting_system\" text,\n \"synchronous_conferencing\" text\n);\n\nQuestion: What is Instant Messaging, when Electronic Meeting System is \"Yes\", and when Name is \"Microsoft Sharepoint\"?"
},
{
"role": "assistant",
"content": "SELECT \"instant_messaging\" FROM \"comparison_of_features\" WHERE \"electronic_meeting_system\"='yes' AND \"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_features\" (\n \"name\" text,\n \"e_mail_server\" text,\n \"faxing\" text,\n \"instant_messaging\" text,\n \"telephony\" text,\n \"videoconferencing\" text,\n \"web_conferencing\" text,\n \"data_conferencing\" text,\n \"application_sharing\" text,\n \"electronic_meeting_system\" text,\n \"synchronous_conferencing\" text\n);\n\nQuestion: What is Instant Messaging, when Telephony is \"Yes with integrated Sametime\"?"
},
{
"role": "assistant",
"content": "SELECT \"instant_messaging\" FROM \"comparison_of_features\" WHERE \"telephony\"='yes with integrated sametime';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_the_most_populous_us_counties_so\" (\n \"rank\" text,\n \"county\" text,\n \"state\" text,\n \"land_area_km\" text,\n \"land_area_mi\" text,\n \"april_1_2010_census\" text,\n \"april_1_2010_density_km\" text,\n \"april_1_2010_density_mi\" text,\n \"july_1_2010_official_estimate\" text,\n \"july_1_2010_density_km\" text,\n \"july_1_2010_density_mi\" text,\n \"july_1_2011_official_estimate\" text,\n \"july_1_2011_density_km\" text,\n \"july_1_2011_density_mi\" text,\n \"mid_2010_to_mid_2011_change_absolute\" text,\n \"mid_2010_to_mid_2011_change_pct\" text,\n \"county_seat_or_courthouse\" text\n);\n\nQuestion: What is the July 1, 2010 density when the April 1, 2010 density is 1,694?"
},
{
"role": "assistant",
"content": "SELECT \"july_1_2010_density_km\" FROM \"list_of_the_most_populous_us_counties_so\" WHERE \"april_1_2010_density_mi\"='1,694';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_the_most_populous_us_counties_so\" (\n \"rank\" text,\n \"county\" text,\n \"state\" text,\n \"land_area_km\" text,\n \"land_area_mi\" text,\n \"april_1_2010_census\" text,\n \"april_1_2010_density_km\" text,\n \"april_1_2010_density_mi\" text,\n \"july_1_2010_official_estimate\" text,\n \"july_1_2010_density_km\" text,\n \"july_1_2010_density_mi\" text,\n \"july_1_2011_official_estimate\" text,\n \"july_1_2011_density_km\" text,\n \"july_1_2011_density_mi\" text,\n \"mid_2010_to_mid_2011_change_absolute\" text,\n \"mid_2010_to_mid_2011_change_pct\" text,\n \"county_seat_or_courthouse\" text\n);\n\nQuestion: Name the mid-2010 to mid-2011 change in the case where then April 1, 2010 census reports 662,564?"
},
{
"role": "assistant",
"content": "SELECT \"mid_2010_to_mid_2011_change_absolute\" FROM \"list_of_the_most_populous_us_counties_so\" WHERE \"april_1_2010_census\"='662,564';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_the_most_populous_us_counties_so\" (\n \"rank\" text,\n \"county\" text,\n \"state\" text,\n \"land_area_km\" text,\n \"land_area_mi\" text,\n \"april_1_2010_census\" text,\n \"april_1_2010_density_km\" text,\n \"april_1_2010_density_mi\" text,\n \"july_1_2010_official_estimate\" text,\n \"july_1_2010_density_km\" text,\n \"july_1_2010_density_mi\" text,\n \"july_1_2011_official_estimate\" text,\n \"july_1_2011_density_km\" text,\n \"july_1_2011_density_mi\" text,\n \"mid_2010_to_mid_2011_change_absolute\" text,\n \"mid_2010_to_mid_2011_change_pct\" text,\n \"county_seat_or_courthouse\" text\n);\n\nQuestion: What is the rank where the July 1, 2010 density equals 437?"
},
{
"role": "assistant",
"content": "SELECT \"rank\" FROM \"list_of_the_most_populous_us_counties_so\" WHERE \"july_1_2010_density_km\"='437';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_the_most_populous_us_counties_so\" (\n \"rank\" text,\n \"county\" text,\n \"state\" text,\n \"land_area_km\" text,\n \"land_area_mi\" text,\n \"april_1_2010_census\" text,\n \"april_1_2010_density_km\" text,\n \"april_1_2010_density_mi\" text,\n \"july_1_2010_official_estimate\" text,\n \"july_1_2010_density_km\" text,\n \"july_1_2010_density_mi\" text,\n \"july_1_2011_official_estimate\" text,\n \"july_1_2011_density_km\" text,\n \"july_1_2011_density_mi\" text,\n \"mid_2010_to_mid_2011_change_absolute\" text,\n \"mid_2010_to_mid_2011_change_pct\" text,\n \"county_seat_or_courthouse\" text\n);\n\nQuestion: What is the July 1, 2011 density if the July 1, 2010 official estimate is 800,482?"
},
{
"role": "assistant",
"content": "SELECT \"july_1_2011_density_mi\" FROM \"list_of_the_most_populous_us_counties_so\" WHERE \"july_1_2010_official_estimate\"='800,482';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_the_most_populous_us_counties_so\" (\n \"rank\" text,\n \"county\" text,\n \"state\" text,\n \"land_area_km\" text,\n \"land_area_mi\" text,\n \"april_1_2010_census\" text,\n \"april_1_2010_density_km\" text,\n \"april_1_2010_density_mi\" text,\n \"july_1_2010_official_estimate\" text,\n \"july_1_2010_density_km\" text,\n \"july_1_2010_density_mi\" text,\n \"july_1_2011_official_estimate\" text,\n \"july_1_2011_density_km\" text,\n \"july_1_2011_density_mi\" text,\n \"mid_2010_to_mid_2011_change_absolute\" text,\n \"mid_2010_to_mid_2011_change_pct\" text,\n \"county_seat_or_courthouse\" text\n);\n\nQuestion: What is the mid-2010 to mid-2011 change where the July 1, 2011 density is 508?"
},
{
"role": "assistant",
"content": "SELECT \"mid_2010_to_mid_2011_change_pct\" FROM \"list_of_the_most_populous_us_counties_so\" WHERE \"july_1_2011_density_mi\"='508';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_the_most_populous_us_counties_so\" (\n \"rank\" text,\n \"county\" text,\n \"state\" text,\n \"land_area_km\" text,\n \"land_area_mi\" text,\n \"april_1_2010_census\" text,\n \"april_1_2010_density_km\" text,\n \"april_1_2010_density_mi\" text,\n \"july_1_2010_official_estimate\" text,\n \"july_1_2010_density_km\" text,\n \"july_1_2010_density_mi\" text,\n \"july_1_2011_official_estimate\" text,\n \"july_1_2011_density_km\" text,\n \"july_1_2011_density_mi\" text,\n \"mid_2010_to_mid_2011_change_absolute\" text,\n \"mid_2010_to_mid_2011_change_pct\" text,\n \"county_seat_or_courthouse\" text\n);\n\nQuestion: What country had a July 1, 2010 density of 41?"
},
{
"role": "assistant",
"content": "SELECT \"county\" FROM \"list_of_the_most_populous_us_counties_so\" WHERE \"july_1_2010_density_km\"='41';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_20_8_12\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What Tournament has an Outcome of winner, and Opponents of eddie dibbs harold solomon?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_20_8_12\" WHERE \"outcome\"='winner' AND \"opponents\"='eddie dibbs harold solomon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_20_8_12\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What Partner has a Score of 3\u20136, 2\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_20_8_12\" WHERE \"score\"='3\u20136, 2\u20136';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_20_8_12\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What Tournament has a Partner of tom gorman?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_20_8_12\" WHERE \"partner\"='tom gorman';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_20_8_12\" (\n \"outcome\" text,\n \"date\" real,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What Outcome has Opponents of bob hewitt frew mcmillan?"
},
{
"role": "assistant",
"content": "SELECT \"outcome\" FROM \"doubles_20_8_12\" WHERE \"opponents\"='bob hewitt frew mcmillan';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1961\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Who was the name of the opposing team on 11/02/1961?"
},
{
"role": "assistant",
"content": "SELECT \"opposing_teams\" FROM \"1961\" WHERE \"date\"='11/02/1961';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1961\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Opposing team had an Against smaller Than 5?"
},
{
"role": "assistant",
"content": "SELECT \"opposing_teams\" FROM \"1961\" WHERE \"against\"<5;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1961\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the status for 07/01/1961?"
},
{
"role": "assistant",
"content": "SELECT \"status\" FROM \"1961\" WHERE \"date\"='07/01/1961';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick\" real,\n \"afl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position does Karl Singer play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_one\" WHERE \"player\"='karl singer';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick\" real,\n \"afl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which player is an offensive tackle for the New York Jets?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_one\" WHERE \"position\"='offensive tackle' AND \"afl_team\"='new york jets';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick\" real,\n \"afl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What position does Mike Dennis play?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"round_one\" WHERE \"player\"='mike dennis';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_one\" (\n \"pick\" real,\n \"afl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which AFL team has a pick 4 for the offensive tackle position?"
},
{
"role": "assistant",
"content": "SELECT \"afl_team\" FROM \"round_one\" WHERE \"position\"='offensive tackle' AND \"pick\"=4;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loans\" (\n \"name\" text,\n \"country\" text,\n \"loan_club\" text,\n \"started\" text,\n \"ended\" text,\n \"start_source\" text\n);\n\nQuestion: From which country was Sodje loaned?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"loans\" WHERE \"name\"='sodje';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"loans\" (\n \"name\" text,\n \"country\" text,\n \"loan_club\" text,\n \"started\" text,\n \"ended\" text,\n \"start_source\" text\n);\n\nQuestion: From which club is player C. Dickinson?"
},
{
"role": "assistant",
"content": "SELECT \"loan_club\" FROM \"loans\" WHERE \"name\"='c. dickinson';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_ships\" (\n \"ship\" text,\n \"tonnage\" text,\n \"builder\" text,\n \"original_operator\" text,\n \"fate\" text\n);\n\nQuestion: What is the fate for the Bremen ship?"
},
{
"role": "assistant",
"content": "SELECT \"fate\" FROM \"the_ships\" WHERE \"ship\"='bremen';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_ships\" (\n \"ship\" text,\n \"tonnage\" text,\n \"builder\" text,\n \"original_operator\" text,\n \"fate\" text\n);\n\nQuestion: Who is the original operator for the AG Vulcan builder and the Prinzess Irene ship?"
},
{
"role": "assistant",
"content": "SELECT \"original_operator\" FROM \"the_ships\" WHERE \"builder\"='ag vulcan' AND \"ship\"='prinzess irene';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"the_ships\" (\n \"ship\" text,\n \"tonnage\" text,\n \"builder\" text,\n \"original_operator\" text,\n \"fate\" text\n);\n\nQuestion: What is the Tonnage that has builder AG Vulcan, and the original operator NDL, and the ship, Prinzess Irene?"
},
{
"role": "assistant",
"content": "SELECT \"tonnage\" FROM \"the_ships\" WHERE \"builder\"='ag vulcan' AND \"original_operator\"='ndl' AND \"ship\"='prinzess irene';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"swimming_and_diving\" (\n \"combined\" text,\n \"50_yard_freestyle\" text,\n \"100_yard_freestyle\" text,\n \"200_yard_freestyle\" text,\n \"500_yard_freestyle\" text,\n \"100_yard_backstroke\" text,\n \"100_yard_butterfly\" text\n);\n\nQuestion: What Combined has a 100 yard Freestyle of cody miller (palo verde)?"
},
{
"role": "assistant",
"content": "SELECT \"combined\" FROM \"swimming_and_diving\" WHERE \"100_yard_freestyle\"='cody miller (palo verde)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"swimming_and_diving\" (\n \"combined\" text,\n \"50_yard_freestyle\" text,\n \"100_yard_freestyle\" text,\n \"200_yard_freestyle\" text,\n \"500_yard_freestyle\" text,\n \"100_yard_backstroke\" text,\n \"100_yard_butterfly\" text\n);\n\nQuestion: What 100 yard Backstroke has a 100 yard Freestyle of helen yee (sierra vista)?"
},
{
"role": "assistant",
"content": "SELECT \"100_yard_backstroke\" FROM \"swimming_and_diving\" WHERE \"100_yard_freestyle\"='helen yee (sierra vista)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"swimming_and_diving\" (\n \"combined\" text,\n \"50_yard_freestyle\" text,\n \"100_yard_freestyle\" text,\n \"200_yard_freestyle\" text,\n \"500_yard_freestyle\" text,\n \"100_yard_backstroke\" text,\n \"100_yard_butterfly\" text\n);\n\nQuestion: What 50 yard Freestyle has a 100 yard Butterfly of diving?"
},
{
"role": "assistant",
"content": "SELECT \"50_yard_freestyle\" FROM \"swimming_and_diving\" WHERE \"100_yard_butterfly\"='diving';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"swimming_and_diving\" (\n \"combined\" text,\n \"50_yard_freestyle\" text,\n \"100_yard_freestyle\" text,\n \"200_yard_freestyle\" text,\n \"500_yard_freestyle\" text,\n \"100_yard_backstroke\" text,\n \"100_yard_butterfly\" text\n);\n\nQuestion: What 100 yard Butterfly has a 100 yard Freestyle of cody miller (palo verde)?"
},
{
"role": "assistant",
"content": "SELECT \"100_yard_butterfly\" FROM \"swimming_and_diving\" WHERE \"100_yard_freestyle\"='cody miller (palo verde)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"swimming_and_diving\" (\n \"combined\" text,\n \"50_yard_freestyle\" text,\n \"100_yard_freestyle\" text,\n \"200_yard_freestyle\" text,\n \"500_yard_freestyle\" text,\n \"100_yard_backstroke\" text,\n \"100_yard_butterfly\" text\n);\n\nQuestion: What 500 yard Freestyle has a Combined of palo verde, and a 100 yard Butterfly of edward kollar (douglas)?"
},
{
"role": "assistant",
"content": "SELECT \"500_yard_freestyle\" FROM \"swimming_and_diving\" WHERE \"combined\"='palo verde' AND \"100_yard_butterfly\"='edward kollar (douglas)';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"swimming_and_diving\" (\n \"combined\" text,\n \"50_yard_freestyle\" text,\n \"100_yard_freestyle\" text,\n \"200_yard_freestyle\" text,\n \"500_yard_freestyle\" text,\n \"100_yard_backstroke\" text,\n \"100_yard_butterfly\" text\n);\n\nQuestion: What 100 yard Freestyle has a 100 yard Backstroke of palo verde?"
},
{
"role": "assistant",
"content": "SELECT \"100_yard_freestyle\" FROM \"swimming_and_diving\" WHERE \"100_yard_backstroke\"='palo verde';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Who has a Score of 68-71-70=208?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='68-71-70=208';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: Which country has -9 to par with a Score of 70-69-68=207?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"to_par\"='-9' AND \"score\"='70-69-68=207';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Tiger Woods' to par?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"third_round\" WHERE \"player\"='tiger woods';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: Which away team played against Peterborough United, with a tie no of replay?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"first_round_proper\" WHERE \"tie_no\"='replay' AND \"home_team\"='peterborough united';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wickets\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"runs\" real,\n \"wickets\" real,\n \"best\" text,\n \"econ\" real,\n \"s_rate\" real,\n \"4_inns\" real,\n \"5_inns\" real,\n \"average\" real\n);\n\nQuestion: What are the lowest matches that have wickets greater than 16, 3/15 as the best, and an econ less than 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"matches\") FROM \"wickets\" WHERE \"wickets\">16 AND \"best\"='3/15' AND \"econ\"<8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wickets\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"runs\" real,\n \"wickets\" real,\n \"best\" text,\n \"econ\" real,\n \"s_rate\" real,\n \"4_inns\" real,\n \"5_inns\" real,\n \"average\" real\n);\n\nQuestion: How many econs have 13.76 as the S/Rate, with runs less than 325?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"econ\") FROM \"wickets\" WHERE \"s_rate\"=13.76 AND \"runs\"<325;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wickets\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"runs\" real,\n \"wickets\" real,\n \"best\" text,\n \"econ\" real,\n \"s_rate\" real,\n \"4_inns\" real,\n \"5_inns\" real,\n \"average\" real\n);\n\nQuestion: What is the average wickets that have overs greater than 44, danish kaneria as the player, with an average greater than 13.8?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wickets\") FROM \"wickets\" WHERE \"overs\">44 AND \"player\"='danish kaneria' AND \"average\">13.8;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wickets\" (\n \"player\" text,\n \"team\" text,\n \"matches\" real,\n \"overs\" real,\n \"runs\" real,\n \"wickets\" real,\n \"best\" text,\n \"econ\" real,\n \"s_rate\" real,\n \"4_inns\" real,\n \"5_inns\" real,\n \"average\" real\n);\n\nQuestion: How many 5+/inns have tyron henderson as the player, with wickets less than 21?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"5_inns\") FROM \"wickets\" WHERE \"player\"='tyron henderson' AND \"wickets\"<21;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_titles_4\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What is the surface when the partner was Robert Haybittel?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"doubles_titles_4\" WHERE \"partner\"='robert haybittel';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"episode_ratings\" (\n \"episode_no\" text,\n \"airdate\" text,\n \"time\" text,\n \"ratings_5_capital_cities\" real,\n \"timeslot_rank\" text,\n \"overall_nightly_rank\" text\n);\n\nQuestion: What was the rating of the episode Wonder Drug?"
},
{
"role": "assistant",
"content": "SELECT \"ratings_5_capital_cities\" FROM \"episode_ratings\" WHERE \"episode_no\"='wonder drug';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"round\" text,\n \"date\" text,\n \"event\" text,\n \"circuit\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who was the winning team on May 12?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"race_results\" WHERE \"date\"='may 12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"round\" text,\n \"date\" text,\n \"event\" text,\n \"circuit\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who was the winning team for circuit zolder?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"race_results\" WHERE \"circuit\"='circuit zolder';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"round\" text,\n \"date\" text,\n \"event\" text,\n \"circuit\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who was the winning team for round 3?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"race_results\" WHERE \"round\"='3';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race_results\" (\n \"round\" text,\n \"date\" text,\n \"event\" text,\n \"circuit\" text,\n \"winning_driver\" text,\n \"winning_team\" text\n);\n\nQuestion: Who was the winning team on July 13?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"race_results\" WHERE \"date\"='july 13';"
}
]
|
[
{
"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);\n\nQuestion: Name the highest Year which has a Venue of narbonne , france?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"achievements\" WHERE \"venue\"='narbonne , france';"
}
]
|
[
{
"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);\n\nQuestion: Which Competition has a Year larger than 1990 in seville , spain?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"achievements\" WHERE \"year\">1990 AND \"venue\"='seville , spain';"
}
]
|
[
{
"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);\n\nQuestion: COunt the Year which has a Venue of latakia , syria?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"achievements\" WHERE \"venue\"='latakia , syria';"
}
]
|
[
{
"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);\n\nQuestion: Which Position has an Event of 4x400 m relay, and a Venue of stuttgart , germany?"
},
{
"role": "assistant",
"content": "SELECT \"position\" FROM \"achievements\" WHERE \"event\"='4x400 m relay' AND \"venue\"='stuttgart , germany';"
}
]
|
[
{
"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);\n\nQuestion: Which Year has a Competition of european indoor championships, and a Venue of budapest , hungary?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"achievements\" WHERE \"competition\"='european indoor championships' AND \"venue\"='budapest , hungary';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"driver\" text,\n \"class\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rounds\" text\n);\n\nQuestion: How many rounds did satrio hermanto go with an opc-challenge engine?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"engine\"='opc-challenge' AND \"driver\"='satrio hermanto';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"driver\" text,\n \"class\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rounds\" text\n);\n\nQuestion: How many rounds did fr\u00e9d\u00e9ric vervisch go?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"driver\"='fr\u00e9d\u00e9ric vervisch';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"driver\" text,\n \"class\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rounds\" text\n);\n\nQuestion: How many rounds did shirley van der lof go?"
},
{
"role": "assistant",
"content": "SELECT \"rounds\" FROM \"teams_and_drivers\" WHERE \"driver\"='shirley van der lof';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"driver\" text,\n \"class\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rounds\" text\n);\n\nQuestion: What c class engine did philipp eng and team hs technik motorsport use?"
},
{
"role": "assistant",
"content": "SELECT \"engine\" FROM \"teams_and_drivers\" WHERE \"class\"='c' AND \"team\"='hs technik motorsport' AND \"driver\"='philipp eng';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"teams_and_drivers\" (\n \"team\" text,\n \"driver\" text,\n \"class\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rounds\" text\n);\n\nQuestion: What is the chassis of rahel frey's volkswagen engine?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"teams_and_drivers\" WHERE \"engine\"='volkswagen' AND \"driver\"='rahel frey';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the greatest number of losses when the against is 1465 and there are more than 7 wins?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"losses\") FROM \"2005_ladder\" WHERE \"against\"=1465 AND \"wins\">7;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total of against matches when there are less than 12 wins, less than 0 draws, and Moulamein is the golden river?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"against\") FROM \"2005_ladder\" WHERE \"wins\"<12 AND \"golden_rivers\"='moulamein' AND \"draws\"<0;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total losses when Hay is the golden river and there are more than 2 byes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"losses\") FROM \"2005_ladder\" WHERE \"golden_rivers\"='hay' AND \"byes\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the total number of draws when there are 1465 against matches and less than 2 byes?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"draws\") FROM \"2005_ladder\" WHERE \"against\"=1465 AND \"byes\"<2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the greatest number of losses when there are more than 0 draws and 1390 against matches?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"losses\") FROM \"2005_ladder\" WHERE \"draws\">0 AND \"against\"=1390;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the highest number of wins when there are more than 2 byes?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins\") FROM \"2005_ladder\" WHERE \"byes\">2;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaching_history\" (\n \"name\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"pct\" real\n);\n\nQuestion: Which percent has Wins larger than 72, and a Name of john yovicsin?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pct\") FROM \"head_coaching_history\" WHERE \"wins\">72 AND \"name\"='john yovicsin';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaching_history\" (\n \"name\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"pct\" real\n);\n\nQuestion: How many Ties have Years of 1919\u20131925, and a Pct larger than 0.734?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"ties\") FROM \"head_coaching_history\" WHERE \"years\"='1919\u20131925' AND \"pct\">0.734;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaching_history\" (\n \"name\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"pct\" real\n);\n\nQuestion: Which Pct has Years of 1957\u20131970, and Wins smaller than 78?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pct\") FROM \"head_coaching_history\" WHERE \"years\"='1957\u20131970' AND \"wins\"<78;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"head_coaching_history\" (\n \"name\" text,\n \"years\" text,\n \"wins\" real,\n \"losses\" real,\n \"ties\" real,\n \"pct\" real\n);\n\nQuestion: Which Wins have Years of 1881, and a Pct larger than 0.75?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"head_coaching_history\" WHERE \"years\"='1881' AND \"pct\">0.75;"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_hall_of_fame\" (\n \"year_recorded\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"year_inducted\" text\n);\n\nQuestion: What's the genre of the song recorded in 1929?"
},
{
"role": "assistant",
"content": "SELECT \"genre\" FROM \"grammy_hall_of_fame\" WHERE \"year_recorded\"='1929';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_hall_of_fame\" (\n \"year_recorded\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"year_inducted\" text\n);\n\nQuestion: What label is \"weather bird\" under?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"grammy_hall_of_fame\" WHERE \"title\"='\\\"weather bird\\\"';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_hall_of_fame\" (\n \"year_recorded\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"year_inducted\" text\n);\n\nQuestion: What's the year inducted for the label of label?"
},
{
"role": "assistant",
"content": "SELECT \"year_inducted\" FROM \"grammy_hall_of_fame\" WHERE \"label\"='label';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_hall_of_fame\" (\n \"year_recorded\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"year_inducted\" text\n);\n\nQuestion: What genre is the song recorded in 1929?"
},
{
"role": "assistant",
"content": "SELECT \"genre\" FROM \"grammy_hall_of_fame\" WHERE \"year_recorded\"='1929';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grammy_hall_of_fame\" (\n \"year_recorded\" text,\n \"title\" text,\n \"genre\" text,\n \"label\" text,\n \"year_inducted\" text\n);\n\nQuestion: What genre is the song recorded in 1926?"
},
{
"role": "assistant",
"content": "SELECT \"genre\" FROM \"grammy_hall_of_fame\" WHERE \"year_recorded\"='1926';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: Which Party has a Residence of san diego?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"current_members\" WHERE \"residence\"='san diego';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: Which Years in Senate has a Years in Assembly of 2010\u2013present, and toni atkins?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_senate\" FROM \"current_members\" WHERE \"years_in_assembly\"='2010\u2013present' AND \"name\"='toni atkins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: Which Party has Years in Senate of \u2014, and Years in Assembly of 2012\u2013present?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"current_members\" WHERE \"years_in_senate\"='\u2014' AND \"years_in_assembly\"='2012\u2013present';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: Show the Residence whose Name is rich gordon?"
},
{
"role": "assistant",
"content": "SELECT \"residence\" FROM \"current_members\" WHERE \"name\"='rich gordon';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: Which Years in Assembly has a Name of toni atkins?"
},
{
"role": "assistant",
"content": "SELECT \"years_in_assembly\" FROM \"current_members\" WHERE \"name\"='toni atkins';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_members\" (\n \"name\" text,\n \"residence\" text,\n \"party\" text,\n \"years_in_assembly\" text,\n \"years_in_senate\" text\n);\n\nQuestion: Which Party has Years in Assembly of 2008\u2013present, and a Name of tom ammiano?"
},
{
"role": "assistant",
"content": "SELECT \"party\" FROM \"current_members\" WHERE \"years_in_assembly\"='2008\u2013present' AND \"name\"='tom ammiano';"
}
]
|
[
{
"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 year(s) did Raymond Floyd have a total of less than 291 and a To par of +10?"
},
{
"role": "assistant",
"content": "SELECT \"year_s_won\" FROM \"made_the_cut\" WHERE \"total\"<291 AND \"to_par\"='+10' AND \"player\"='raymond floyd';"
}
]
|
[
{
"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 was Jeff Sluman's To par when his total was smaller than 284?"
},
{
"role": "assistant",
"content": "SELECT \"to_par\" FROM \"made_the_cut\" WHERE \"total\"<284 AND \"player\"='jeff sluman';"
}
]
|
[
{
"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 was the finish for Lanny Wadkins of the United States?"
},
{
"role": "assistant",
"content": "SELECT \"finish\" FROM \"made_the_cut\" WHERE \"country\"='united states' AND \"player\"='lanny wadkins';"
}
]
|
[
{
"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 To par of +11?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"to_par\"='+11';"
}
]
|
[
{
"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: From which country was the player whose year(s) won was 1983?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"year_s_won\"='1983';"
}
]
|
[
{
"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 total for the player whose finish was t66?"
},
{
"role": "assistant",
"content": "SELECT \"total\" FROM \"made_the_cut\" WHERE \"finish\"='t66';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives_and_wagons\" (\n \"class\" text,\n \"quantity\" real,\n \"type\" text,\n \"delivered\" text,\n \"k_b_sts_b_class\" text,\n \"retired\" text\n);\n\nQuestion: What is the type of the locomotive which was delivered in 1857-59?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"locomotives_and_wagons\" WHERE \"delivered\"='1857-59';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives_and_wagons\" (\n \"class\" text,\n \"quantity\" real,\n \"type\" text,\n \"delivered\" text,\n \"k_b_sts_b_class\" text,\n \"retired\" text\n);\n\nQuestion: What is the highest quantity of the b ix k.b.sts.b.?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"quantity\") FROM \"locomotives_and_wagons\" WHERE \"k_b_sts_b_class\"='b ix';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives_and_wagons\" (\n \"class\" text,\n \"quantity\" real,\n \"type\" text,\n \"delivered\" text,\n \"k_b_sts_b_class\" text,\n \"retired\" text\n);\n\nQuestion: What is the lowest quantity of the 1b n2 type, which was retired in 1907-12?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"quantity\") FROM \"locomotives_and_wagons\" WHERE \"type\"='1b n2' AND \"retired\"='1907-12';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"virginia\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What district is Jim Moran the incumbent for."
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"virginia\" WHERE \"incumbent\"='jim moran';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"virginia\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What was the election result before 2004 where Eric Cantor was the incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"virginia\" WHERE \"first_elected\"<2004 AND \"incumbent\"='eric cantor';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_in_national_languages\" (\n \"abbr\" text,\n \"common_english\" text,\n \"french\" text,\n \"italian\" text,\n \"romansh\" text\n);\n\nQuestion: What is the common English for the Italian word san gallo?"
},
{
"role": "assistant",
"content": "SELECT \"common_english\" FROM \"names_in_national_languages\" WHERE \"italian\"='san gallo';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_in_national_languages\" (\n \"abbr\" text,\n \"common_english\" text,\n \"french\" text,\n \"italian\" text,\n \"romansh\" text\n);\n\nQuestion: What is the italian word for Glarus?"
},
{
"role": "assistant",
"content": "SELECT \"italian\" FROM \"names_in_national_languages\" WHERE \"common_english\"='glarus';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_in_national_languages\" (\n \"abbr\" text,\n \"common_english\" text,\n \"french\" text,\n \"italian\" text,\n \"romansh\" text\n);\n\nQuestion: What is the common english word with the abbr of ai?"
},
{
"role": "assistant",
"content": "SELECT \"common_english\" FROM \"names_in_national_languages\" WHERE \"abbr\"='ai';"
}
]
|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"names_in_national_languages\" (\n \"abbr\" text,\n \"common_english\" text,\n \"french\" text,\n \"italian\" text,\n \"romansh\" text\n);\n\nQuestion: What is the abbr of argovia?"
},
{
"role": "assistant",
"content": "SELECT \"abbr\" FROM \"names_in_national_languages\" WHERE \"italian\"='argovia';"
}
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.