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 \"mining_disasters_in_the_rhondda_valley_1\" (\n \"colliery\" text,\n \"location\" text,\n \"date\" text,\n \"year\" real,\n \"death_toll\" real,\n \"cause\" text\n);\n\nQuestion: Which Colliery has a Death toll of 7?" }, { "role": "assistant", "content": "SELECT \"colliery\" FROM \"mining_disasters_in_the_rhondda_valley_1\" WHERE \"death_toll\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Score 1 of Tie no 6?" }, { "role": "assistant", "content": "SELECT \"score_1\" FROM \"south\" WHERE \"tie_no\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Attendance of Tie no 3?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"south\" WHERE \"tie_no\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Attendance at the Hereford United Away game?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"south\" WHERE \"away_team\"='hereford united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Home team of Tie no 11?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"south\" WHERE \"tie_no\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Tie no of Hereford United's Away game?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"south\" WHERE \"away_team\"='hereford united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"south\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score_1\" text,\n \"away_team\" text,\n \"attendance\" text\n);\n\nQuestion: What is the Score 1 of the game with Attendance of 2,571?" }, { "role": "assistant", "content": "SELECT \"score_1\" FROM \"south\" WHERE \"attendance\"='2,571';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text\n);\n\nQuestion: What is the sum of the clubs remaining with 34 new entries this round and more than 34 clubs involved?" }, { "role": "assistant", "content": "SELECT SUM(\"clubs_remaining\") FROM \"teams\" WHERE \"new_entries_this_round\"='34' AND \"clubs_involved\">34;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"teams\" (\n \"round\" text,\n \"clubs_remaining\" real,\n \"clubs_involved\" real,\n \"winners_from_previous_round\" text,\n \"new_entries_this_round\" text\n);\n\nQuestion: What are the clubs involved with 16 clubs remaining?" }, { "role": "assistant", "content": "SELECT \"clubs_involved\" FROM \"teams\" WHERE \"clubs_remaining\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_taijiquan_taijijian_combined\" (\n \"rank\" real,\n \"athlete\" text,\n \"taijijian\" real,\n \"taijiquan\" real,\n \"total\" real\n);\n\nQuestion: What is the total rank of the athlete with a total larger than 19.42 and a taijiquan less than 9.87?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"men_s_taijiquan_taijijian_combined\" WHERE \"total\">19.42 AND \"taijiquan\"<9.87;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_taijiquan_taijijian_combined\" (\n \"rank\" real,\n \"athlete\" text,\n \"taijijian\" real,\n \"taijiquan\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest rank of the athlete with a taijiquan greater than 9.42 and a 19.02 total?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"men_s_taijiquan_taijijian_combined\" WHERE \"taijiquan\">9.42 AND \"total\"=19.02;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men_s_taijiquan_taijijian_combined\" (\n \"rank\" real,\n \"athlete\" text,\n \"taijijian\" real,\n \"taijiquan\" real,\n \"total\" real\n);\n\nQuestion: What is the highest taijijian with a 9.87 taijiquan and a total less than 19.77?" }, { "role": "assistant", "content": "SELECT MAX(\"taijijian\") FROM \"men_s_taijiquan_taijijian_combined\" WHERE \"taijiquan\"=9.87 AND \"total\"<19.77;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who is the cyber girl in week 3 when Demi Jessica was the cyber girl in week 1?" }, { "role": "assistant", "content": "SELECT \"week_3\" FROM \"2008\" WHERE \"week_1\"='demi jessica';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: What is the name of the cyber girl in week 4 when Lexi Lombardelli was the cyber girl in week 2?" }, { "role": "assistant", "content": "SELECT \"week_4\" FROM \"2008\" WHERE \"week_2\"='lexi lombardelli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: When Alinna D Penta was the cyber girl in week 3, who was the cyber girl in week 1?" }, { "role": "assistant", "content": "SELECT \"week_1\" FROM \"2008\" WHERE \"week_3\"='alinna d penta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Felicia Taylor was cyber girl in week 3, so who was the cyber girl in week 5?" }, { "role": "assistant", "content": "SELECT \"week_5\" FROM \"2008\" WHERE \"week_3\"='felicia taylor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: Who is the cyber girl in week 3 when Ashley Lowe was the cyber girl in week 2?" }, { "role": "assistant", "content": "SELECT \"week_3\" FROM \"2008\" WHERE \"week_2\"='ashley lowe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2008\" (\n \"week_1\" text,\n \"week_2\" text,\n \"week_3\" text,\n \"week_4\" text,\n \"week_5\" text\n);\n\nQuestion: When Diane Deluna was the cyber girl in week 4 who was the cyber girl in week 2?" }, { "role": "assistant", "content": "SELECT \"week_2\" FROM \"2008\" WHERE \"week_4\"='diane deluna';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fed_cup_results_10_8\" (\n \"year\" real,\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"location\" text,\n \"surface\" text,\n \"against\" text,\n \"opponent_s\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Which Round has a Year later than 2011?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"fed_cup_results_10_8\" WHERE \"year\">2011;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fed_cup_results_10_8\" (\n \"year\" real,\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"location\" text,\n \"surface\" text,\n \"against\" text,\n \"opponent_s\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: When was the Result of 3\u20132, with a Score of 6\u20130, 6\u20134?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"fed_cup_results_10_8\" WHERE \"result\"='3\u20132' AND \"score\"='6\u20130, 6\u20134';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fed_cup_results_10_8\" (\n \"year\" real,\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"location\" text,\n \"surface\" text,\n \"against\" text,\n \"opponent_s\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Which Surface has an Opponent(s) of anna-lena gr\u00f6nefeld tatjana malek?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"fed_cup_results_10_8\" WHERE \"opponent_s\"='anna-lena gr\u00f6nefeld tatjana malek';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fed_cup_results_10_8\" (\n \"year\" real,\n \"edition\" text,\n \"round\" text,\n \"date\" text,\n \"location\" text,\n \"surface\" text,\n \"against\" text,\n \"opponent_s\" text,\n \"score\" text,\n \"result\" text\n);\n\nQuestion: Which Year has a Date of 5\u20136 february?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"fed_cup_results_10_8\" WHERE \"date\"='5\u20136 february';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What home team has 27 as the tie no.?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"tie_no\"='27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What date has 1 as the tie no.?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"third_round_proper\" WHERE \"tie_no\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What score has west ham united as the away team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"third_round_proper\" WHERE \"away_team\"='west ham united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round_proper\" (\n \"tie_no\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"date\" text\n);\n\nQuestion: What home team has Southampton as the away team?" }, { "role": "assistant", "content": "SELECT \"home_team\" FROM \"third_round_proper\" WHERE \"away_team\"='southampton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fiba_world_olympic_qualifying_tournament\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born_age\" text,\n \"current_club\" text\n);\n\nQuestion: What current club has a Height of 1.96?" }, { "role": "assistant", "content": "SELECT \"current_club\" FROM \"fiba_world_olympic_qualifying_tournament\" WHERE \"height\"=1.96;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fiba_world_olympic_qualifying_tournament\" (\n \"player\" text,\n \"height\" real,\n \"position\" text,\n \"year_born_age\" text,\n \"current_club\" text\n);\n\nQuestion: What is the Age of f/c Posiiton?" }, { "role": "assistant", "content": "SELECT \"year_born_age\" FROM \"fiba_world_olympic_qualifying_tournament\" WHERE \"position\"='f/c';" } ]
[ { "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 is the player with a score of 70-68-70=208?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='70-68-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: What place is the player with score of 70-68-70=208 from?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"score\"='70-68-70=208';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ministry_of_higher_education\" (\n \"name_in_english\" text,\n \"name_in_malay\" text,\n \"acronym\" text,\n \"foundation\" text,\n \"location\" text\n);\n\nQuestion: What is the name for Malay with a foundation in Iptura?" }, { "role": "assistant", "content": "SELECT \"name_in_malay\" FROM \"ministry_of_higher_education\" WHERE \"foundation\"='iptura';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ministry_of_higher_education\" (\n \"name_in_english\" text,\n \"name_in_malay\" text,\n \"acronym\" text,\n \"foundation\" text,\n \"location\" text\n);\n\nQuestion: What is the acronym for the name Malay of Kolej Komuniti Sungai Petani?" }, { "role": "assistant", "content": "SELECT \"acronym\" FROM \"ministry_of_higher_education\" WHERE \"name_in_malay\"='kolej komuniti sungai petani';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ministry_of_higher_education\" (\n \"name_in_english\" text,\n \"name_in_malay\" text,\n \"acronym\" text,\n \"foundation\" text,\n \"location\" text\n);\n\nQuestion: What is the acronym for the English name Northern management and technological institute?" }, { "role": "assistant", "content": "SELECT \"acronym\" FROM \"ministry_of_higher_education\" WHERE \"name_in_english\"='northern management and technological institute';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ministry_of_higher_education\" (\n \"name_in_english\" text,\n \"name_in_malay\" text,\n \"acronym\" text,\n \"foundation\" text,\n \"location\" text\n);\n\nQuestion: What is the location of the Kkspe Foundation?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"ministry_of_higher_education\" WHERE \"foundation\"='kkspe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Country, when Place is \"T3\", and when Score is \"67-70=137\"?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round\" WHERE \"place\"='t3' AND \"score\"='67-70=137';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Score, when Player is \"David Toms\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='david toms';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: What is Score, when Player is \"Tom Lehman\"?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='tom lehman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"title\" text,\n \"label\" text,\n \"format\" text,\n \"catalog_nr\" text\n);\n\nQuestion: What is the Title of the Pye Label mono LP release?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"release_history\" WHERE \"format\"='mono lp' AND \"label\"='pye';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"title\" text,\n \"label\" text,\n \"format\" text,\n \"catalog_nr\" text\n);\n\nQuestion: What is the Catalog-Nr of the Epic Label Stereo LP named For Little Ones?" }, { "role": "assistant", "content": "SELECT \"catalog_nr\" FROM \"release_history\" WHERE \"format\"='stereo lp' AND \"label\"='epic' AND \"title\"='for little ones';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"prime_minister\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: What is the assumed office date of the prime minister ranked 22?" }, { "role": "assistant", "content": "SELECT \"assumed_office\" FROM \"rank_by_time_in_office\" WHERE \"rank\"=22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"prime_minister\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: What is the total time in office of the prime minister from the liberal party and left office in 19 December 1967?" }, { "role": "assistant", "content": "SELECT \"total_time_in_office\" FROM \"rank_by_time_in_office\" WHERE \"party\"='liberal' AND \"left_office\"='19 december 1967';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"prime_minister\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: What is the party of the prime minister who left office on 11 March 1983?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"rank_by_time_in_office\" WHERE \"left_office\"='11 march 1983';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"westmorland_county_new_brunswick\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the total area with the census ranking of 3,129 of 5,008, and a Population smaller than 460?" }, { "role": "assistant", "content": "SELECT COUNT(\"area_km_2\") FROM \"westmorland_county_new_brunswick\" WHERE \"census_ranking\"='3,129 of 5,008' AND \"population\"<460;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"westmorland_county_new_brunswick\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What is the total area with the Census Ranking of 3,129 of 5,008, and a Population larger than 460?" }, { "role": "assistant", "content": "SELECT COUNT(\"area_km_2\") FROM \"westmorland_county_new_brunswick\" WHERE \"census_ranking\"='3,129 of 5,008' AND \"population\">460;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"westmorland_county_new_brunswick\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: What census ranking has an area greater than 578.28 km2?" }, { "role": "assistant", "content": "SELECT \"census_ranking\" FROM \"westmorland_county_new_brunswick\" WHERE \"area_km_2\">578.28;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What is the position for Jani Lajunen?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"draft_picks\" WHERE \"player\"='jani lajunen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What is the round number when nationality was United States, and player is Jeffrey Foss?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"draft_picks\" WHERE \"nationality\"='united states' AND \"player\"='jeffrey foss';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What player has a round larger than 2, and position of (d)?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"round\">2 AND \"position\"='(d)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"pick\" text,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college\" text\n);\n\nQuestion: What is the nationality for the position of (d), and college was SC Bern ( Swiss )?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"position\"='(d)' AND \"college\"='sc bern ( swiss )';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: Who is the athlete with a run 1 larger than 54.95 and a 56.19 run 2?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"men\" WHERE \"run_1\">54.95 AND \"run_2\"=56.19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: What is the highest run 2 of athlete eric neilson, who has a run 3 larger than 55.97?" }, { "role": "assistant", "content": "SELECT MAX(\"run_2\") FROM \"men\" WHERE \"athlete\"='eric neilson' AND \"run_3\">55.97;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: What is the highest run 3 of the athlete with a 55.44 run 2?" }, { "role": "assistant", "content": "SELECT MAX(\"run_3\") FROM \"men\" WHERE \"run_2\"=55.44;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: Who is the athlete with a run 1 less than 54.13 and a 55.21 run 3?" }, { "role": "assistant", "content": "SELECT \"athlete\" FROM \"men\" WHERE \"run_1\"<54.13 AND \"run_3\"=55.21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"men\" (\n \"athlete\" text,\n \"country\" text,\n \"run_1\" real,\n \"run_2\" real,\n \"run_3\" real\n);\n\nQuestion: What is the sum of the run 1 of athlete matthias guggenberger, who has a run 2 greater than 55.24?" }, { "role": "assistant", "content": "SELECT SUM(\"run_1\") FROM \"men\" WHERE \"run_2\">55.24 AND \"athlete\"='matthias guggenberger';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_iv\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is the dissolved date of the parliament assembled on 3 June 1467?" }, { "role": "assistant", "content": "SELECT \"dissolved\" FROM \"parliaments_of_king_edward_iv\" WHERE \"assembled\"='3 june 1467';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_iv\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is the dissolved date of the parliament assembled on 4 November 1461?" }, { "role": "assistant", "content": "SELECT \"dissolved\" FROM \"parliaments_of_king_edward_iv\" WHERE \"assembled\"='4 november 1461';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_iv\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is the assembled date of the parliament with an unknown 2nd member who was elected in 1482/83?" }, { "role": "assistant", "content": "SELECT \"assembled\" FROM \"parliaments_of_king_edward_iv\" WHERE \"2nd_member\"='unknown' AND \"elected\"='1482/83';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_iv\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is the dissolved date of the parliament assembled on 4 November 1461 with an unknown 2nd member?" }, { "role": "assistant", "content": "SELECT \"dissolved\" FROM \"parliaments_of_king_edward_iv\" WHERE \"2nd_member\"='unknown' AND \"assembled\"='4 november 1461';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_iv\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: Who is the 2nd member elected in 1461?" }, { "role": "assistant", "content": "SELECT \"2nd_member\" FROM \"parliaments_of_king_edward_iv\" WHERE \"elected\"='1461';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_iv\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"dissolved\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is the dissolved date of the parliament summoned on 28 February 1467?" }, { "role": "assistant", "content": "SELECT \"dissolved\" FROM \"parliaments_of_king_edward_iv\" WHERE \"summoned\"='28 february 1467';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_i\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is 2nd Member, when Assembled is \"30 March 1298\"?" }, { "role": "assistant", "content": "SELECT \"2nd_member\" FROM \"parliaments_of_king_edward_i\" WHERE \"assembled\"='30 march 1298';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_i\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is Assembled, when 2nd Member is \"Unknown\"?" }, { "role": "assistant", "content": "SELECT \"assembled\" FROM \"parliaments_of_king_edward_i\" WHERE \"2nd_member\"='unknown';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_i\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is 1st Member, when Summoned is \"14 July 1302\"?" }, { "role": "assistant", "content": "SELECT \"1st_member\" FROM \"parliaments_of_king_edward_i\" WHERE \"summoned\"='14 july 1302';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_i\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is Assembled, when Summoned is \"6 October 1297\"?" }, { "role": "assistant", "content": "SELECT \"assembled\" FROM \"parliaments_of_king_edward_i\" WHERE \"summoned\"='6 october 1297';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_i\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is 1st Member, when 2nd Member is \"William Benne\", and when Elected is \"1300/01\"?" }, { "role": "assistant", "content": "SELECT \"1st_member\" FROM \"parliaments_of_king_edward_i\" WHERE \"2nd_member\"='william benne' AND \"elected\"='1300/01';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parliaments_of_king_edward_i\" (\n \"summoned\" text,\n \"elected\" text,\n \"assembled\" text,\n \"1st_member\" text,\n \"2nd_member\" text\n);\n\nQuestion: What is Summoned, when Elected is \"March 1298\"?" }, { "role": "assistant", "content": "SELECT \"summoned\" FROM \"parliaments_of_king_edward_i\" WHERE \"elected\"='march 1298';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekdays\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"transcription\" text,\n \"color\" text,\n \"sanskrit_word\" text,\n \"planet\" text\n);\n\nQuestion: Which Planet has a Sanskrit word of budha?" }, { "role": "assistant", "content": "SELECT \"planet\" FROM \"weekdays\" WHERE \"sanskrit_word\"='budha';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekdays\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"transcription\" text,\n \"color\" text,\n \"sanskrit_word\" text,\n \"planet\" text\n);\n\nQuestion: WHich Thai name has a Transcription of wan phruehatsabodi?" }, { "role": "assistant", "content": "SELECT \"thai_name\" FROM \"weekdays\" WHERE \"transcription\"='wan phruehatsabodi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekdays\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"transcription\" text,\n \"color\" text,\n \"sanskrit_word\" text,\n \"planet\" text\n);\n\nQuestion: Show the Thai name of wan phruehatsabodi?" }, { "role": "assistant", "content": "SELECT \"thai_name\" FROM \"weekdays\" WHERE \"transcription\"='wan phruehatsabodi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekdays\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"transcription\" text,\n \"color\" text,\n \"sanskrit_word\" text,\n \"planet\" text\n);\n\nQuestion: Show the Color which has a Thai name of \u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35?" }, { "role": "assistant", "content": "SELECT \"color\" FROM \"weekdays\" WHERE \"thai_name\"='\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekdays\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"transcription\" text,\n \"color\" text,\n \"sanskrit_word\" text,\n \"planet\" text\n);\n\nQuestion: Which Color has a Transcription of wan suk?" }, { "role": "assistant", "content": "SELECT \"color\" FROM \"weekdays\" WHERE \"transcription\"='wan suk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"weekdays\" (\n \"english_name\" text,\n \"thai_name\" text,\n \"transcription\" text,\n \"color\" text,\n \"sanskrit_word\" text,\n \"planet\" text\n);\n\nQuestion: Which English name has a Color of green?" }, { "role": "assistant", "content": "SELECT \"english_name\" FROM \"weekdays\" WHERE \"color\"='green';" } ]
[ { "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 Gil Morgan's Place?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"player\"='gil morgan';" } ]
[ { "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 the Place of the Player with a To par of \u20135?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"to_par\"='\u20135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which Player has a Money ($) of 137, and a Score of 73-70-73-74=290?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"money\"=137 AND \"score\"='73-70-73-74=290';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_leaderboard\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text,\n \"money\" real\n);\n\nQuestion: Which To Par has a Money ($) of 350, and a Player of henry picard?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"final_leaderboard\" WHERE \"money\"=350 AND \"player\"='henry picard';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_london_production\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What year had Best Actor in a Musical as a category?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"original_london_production\" WHERE \"category\"='best actor in a musical';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_composition_of_the_executive_board\" (\n \"president\" text,\n \"treasurer\" text,\n \"secretary\" text,\n \"social_ao\" text,\n \"academic_ao\" text,\n \"internal_co\" text,\n \"external_co\" text\n);\n\nQuestion: What Secretary has a Social AO of lieke de boer?" }, { "role": "assistant", "content": "SELECT \"secretary\" FROM \"past_composition_of_the_executive_board\" WHERE \"social_ao\"='lieke de boer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_composition_of_the_executive_board\" (\n \"president\" text,\n \"treasurer\" text,\n \"secretary\" text,\n \"social_ao\" text,\n \"academic_ao\" text,\n \"internal_co\" text,\n \"external_co\" text\n);\n\nQuestion: What Social AO has an External CO of elena buscher, and a President of harm van leeuwen?" }, { "role": "assistant", "content": "SELECT \"social_ao\" FROM \"past_composition_of_the_executive_board\" WHERE \"external_co\"='elena buscher' AND \"president\"='harm van leeuwen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_composition_of_the_executive_board\" (\n \"president\" text,\n \"treasurer\" text,\n \"secretary\" text,\n \"social_ao\" text,\n \"academic_ao\" text,\n \"internal_co\" text,\n \"external_co\" text\n);\n\nQuestion: What Social AO has an External CO of simonas savickas, and an Internal CO of pieter kuijsten?" }, { "role": "assistant", "content": "SELECT \"social_ao\" FROM \"past_composition_of_the_executive_board\" WHERE \"external_co\"='simonas savickas' AND \"internal_co\"='pieter kuijsten';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_composition_of_the_executive_board\" (\n \"president\" text,\n \"treasurer\" text,\n \"secretary\" text,\n \"social_ao\" text,\n \"academic_ao\" text,\n \"internal_co\" text,\n \"external_co\" text\n);\n\nQuestion: What Secretary has an Internal CO of isabel voets?" }, { "role": "assistant", "content": "SELECT \"secretary\" FROM \"past_composition_of_the_executive_board\" WHERE \"internal_co\"='isabel voets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_composition_of_the_executive_board\" (\n \"president\" text,\n \"treasurer\" text,\n \"secretary\" text,\n \"social_ao\" text,\n \"academic_ao\" text,\n \"internal_co\" text,\n \"external_co\" text\n);\n\nQuestion: What Academic AO has a President of harm van leeuwen?" }, { "role": "assistant", "content": "SELECT \"academic_ao\" FROM \"past_composition_of_the_executive_board\" WHERE \"president\"='harm van leeuwen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"past_composition_of_the_executive_board\" (\n \"president\" text,\n \"treasurer\" text,\n \"secretary\" text,\n \"social_ao\" text,\n \"academic_ao\" text,\n \"internal_co\" text,\n \"external_co\" text\n);\n\nQuestion: What Social AO has a President of harm van leeuwen?" }, { "role": "assistant", "content": "SELECT \"social_ao\" FROM \"past_composition_of_the_executive_board\" WHERE \"president\"='harm van leeuwen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which country has a to par of +2 for Bernhard Langer?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"first_round\" WHERE \"to_par\"='+2' AND \"player\"='bernhard langer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: Which country has a score of 72 by Andrew Brooks?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"first_round\" WHERE \"score\"=72 AND \"player\"='andrew brooks';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" real,\n \"to_par\" text\n);\n\nQuestion: What is Anders Forsbrand's score with a to par of +1?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round\" WHERE \"to_par\"='+1' AND \"player\"='anders forsbrand';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" text,\n \"height\" text,\n \"name\" text,\n \"road_number\" text,\n \"type\" text\n);\n\nQuestion: What is the rad number for the dead end in rank 22?" }, { "role": "assistant", "content": "SELECT \"road_number\" FROM \"see_also\" WHERE \"type\"='dead end' AND \"rank\"='22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" text,\n \"height\" text,\n \"name\" text,\n \"road_number\" text,\n \"type\" text\n);\n\nQuestion: What is the name of the dead end type ranked 22?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"see_also\" WHERE \"type\"='dead end' AND \"rank\"='22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"rank\" text,\n \"height\" text,\n \"name\" text,\n \"road_number\" text,\n \"type\" text\n);\n\nQuestion: What is the type ranked 13?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"see_also\" WHERE \"rank\"='13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"standings\" (\n \"position\" real,\n \"number\" real,\n \"name\" text,\n \"team\" text,\n \"points\" real\n);\n\nQuestion: Who had 1344 points?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"standings\" WHERE \"points\"=1344;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What was the total number of wins that had an against greater than 1136 but losses less than 15 with Ultima with less than 2 byes?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"2012_ladder\" WHERE \"against\">1136 AND \"losses\"<15 AND \"golden_rivers\"='ultima' AND \"byes\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the average number of wins for those with less than 2 byes?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"2012_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 \"2012_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the greatest losses for those with more than 13 wins?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"2012_ladder\" WHERE \"wins\">13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What was the greatest number of wins for a team that had 7 losses and more than 0 draws?" }, { "role": "assistant", "content": "SELECT MAX(\"wins\") FROM \"2012_ladder\" WHERE \"losses\"=7 AND \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the number of byes for someone who had 7 wins and an against number greater than 1412?" }, { "role": "assistant", "content": "SELECT SUM(\"byes\") FROM \"2012_ladder\" WHERE \"wins\"=7 AND \"against\">1412;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"golden_rivers\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What's the total wins of a team with more than 2 byes?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"2012_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 \"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: Who had a finish of t16?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"finish\"='t16';" } ]
[ { "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 is jack nicklaus from?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"player\"='jack nicklaus';" } ]
[ { "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: Who has a total of 272?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"total\"=272;" } ]
[ { "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 won in 1977?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"year_s_won\"='1977';" } ]