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 \"second_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 in Tie 2?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round_proper\" WHERE \"tie_no\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_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 when Scarborough is the Home team?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"second_round_proper\" WHERE \"home_team\"='scarborough';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"second_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 when Swansea City is the Away team with a Score of 2\u20132?" }, { "role": "assistant", "content": "SELECT \"tie_no\" FROM \"second_round_proper\" WHERE \"score\"='2\u20132' AND \"away_team\"='swansea city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the name of constituency 5?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"assembly_segments\" WHERE \"constituency_number\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"studio_albums\" (\n \"date_of_release\" text,\n \"title\" text,\n \"billboard_peak\" real,\n \"riaa_cert\" text,\n \"label\" text\n);\n\nQuestion: What label is released on September 20, 2005?" }, { "role": "assistant", "content": "SELECT \"label\" FROM \"studio_albums\" WHERE \"date_of_release\"='september 20, 2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_rope\" (\n \"place\" real,\n \"name\" text,\n \"all_around\" real,\n \"rope\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest total with an all around of 10 and a rope higher than 10?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"individual_rope\" WHERE \"all_around\"=10 AND \"rope\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_rope\" (\n \"place\" real,\n \"name\" text,\n \"all_around\" real,\n \"rope\" real,\n \"total\" real\n);\n\nQuestion: What is Bianka Panova's highest total with lower than place 1?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"individual_rope\" WHERE \"name\"='bianka panova' AND \"place\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual_rope\" (\n \"place\" real,\n \"name\" text,\n \"all_around\" real,\n \"rope\" real,\n \"total\" real\n);\n\nQuestion: What is Milena Reljin's place with a smaller than 9.8 rope?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"individual_rope\" WHERE \"rope\"<9.8 AND \"name\"='milena reljin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"hornets_score\" real,\n \"opponent_score\" real,\n \"record\" text\n);\n\nQuestion: What is the highest game with a 24-23 record?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"record\"='24-23';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"hornets_score\" real,\n \"opponent_score\" real,\n \"record\" text\n);\n\nQuestion: What is the highest game with a 1-0 record, and the Hornets scored more than 100?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"record\"='1-0' AND \"hornets_score\">100;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spain\" (\n \"name\" text,\n \"pos\" text,\n \"height\" text,\n \"weight\" text,\n \"date_of_birth\" text,\n \"club\" text\n);\n\nQuestion: When was Daniel Moro born?" }, { "role": "assistant", "content": "SELECT \"date_of_birth\" FROM \"spain\" WHERE \"name\"='daniel moro';" } ]
[ { "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: What was the score for the player than won $450?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"money\"=450;" } ]
[ { "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: What is the score of the player that had a to par score of +9 and took home less than $1,000?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"final_leaderboard\" WHERE \"money\"<'1,000' AND \"to_par\"='+9';" } ]
[ { "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: What place did the player that took won $350 finish in?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"final_leaderboard\" WHERE \"money\"=350;" } ]
[ { "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 had a score of 71-73-68-75=287?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"final_leaderboard\" WHERE \"score\"='71-73-68-75=287';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_incidents\" (\n \"name\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What is Year, when Name is \"Dong Shihou, 29 (\u8463\u4e16\u4faf)\"?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"other_incidents\" WHERE \"name\"='dong shihou, 29 (\u8463\u4e16\u4faf)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_incidents\" (\n \"name\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What is Name, when Location is \"DZ\"?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"other_incidents\" WHERE \"location\"='dz';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_incidents\" (\n \"name\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What is Injured, when Date is \"09.15 Sep. 15\"?" }, { "role": "assistant", "content": "SELECT \"injured\" FROM \"other_incidents\" WHERE \"date\"='09.15 sep. 15';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"other_incidents\" (\n \"name\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What is Date, when Name is \"Guay, Albert , 32\"?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"other_incidents\" WHERE \"name\"='guay, albert , 32';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the highest grid for rider Fonsi Nieto?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"superbike_race_2_classification\" WHERE \"rider\"='fonsi nieto';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What was the total number of Laps for the rider whose time was +7.951?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"superbike_race_2_classification\" WHERE \"time\"='+7.951';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What was the highest number of laps for rider Shuhei Aoyama in a grid higher than 24?" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"superbike_race_2_classification\" WHERE \"rider\"='shuhei aoyama' AND \"grid\">24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What was the grid for rider Russell Holland, riding a Honda CBR1000rr?" }, { "role": "assistant", "content": "SELECT \"grid\" FROM \"superbike_race_2_classification\" WHERE \"bike\"='honda cbr1000rr' AND \"rider\"='russell holland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"superbike_race_2_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Who was the rider who went 14 laps on a Honda CBR1000rr, with a time of +1'04.877 on a grid larger than 23?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"superbike_race_2_classification\" WHERE \"laps\"=14 AND \"grid\">23 AND \"bike\"='honda cbr1000rr' AND \"time\"='+1''04.877';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What is the earliest year with a Drama Desk award when the Mineola Twins was a nominated work?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"awards_and_nominations\" WHERE \"award\"='drama desk award' AND \"nominated_work\"='the mineola twins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: Which nominated work is in the category of best performance by a leading actress in a play earlier than 2007?" }, { "role": "assistant", "content": "SELECT \"nominated_work\" FROM \"awards_and_nominations\" WHERE \"category\"='best performance by a leading actress in a play' AND \"year\"<2007;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What is the most recent year that the Mineola Twins was nominated for outstanding actress in a play and a Drama Desk award?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"awards_and_nominations\" WHERE \"nominated_work\"='the mineola twins' AND \"category\"='outstanding actress in a play' AND \"award\"='drama desk award';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: What is the result for the Outer Critics Circle award earlier than 2004?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"awards_and_nominations\" WHERE \"award\"='outer critics circle award' AND \"year\"<2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" real,\n \"award\" text,\n \"category\" text,\n \"nominated_work\" text,\n \"result\" text\n);\n\nQuestion: In what year was The House of Blue Leaves nominated for outstanding actress in a play?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"awards_and_nominations\" WHERE \"nominated_work\"='the house of blue leaves' AND \"category\"='outstanding actress in a play';" } ]
[ { "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 Country has a Total smaller than 284?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"made_the_cut\" WHERE \"total\"<284;" } ]
[ { "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 To par has a Year(s) won of 1983?" }, { "role": "assistant", "content": "SELECT \"to_par\" 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: How many Total has a Player of dave stockton?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"made_the_cut\" WHERE \"player\"='dave stockton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_4_titles_6_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the result in 1973 when the surface was clay?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"women_s_doubles_10_4_titles_6_runner_ups\" WHERE \"year\"=1973 AND \"surface\"='clay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_4_titles_6_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome in 1975?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"women_s_doubles_10_4_titles_6_runner_ups\" WHERE \"year\"=1975;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_10_4_titles_6_runner_ups\" (\n \"outcome\" text,\n \"year\" real,\n \"championship\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who was Margaret Court's opponent on clay in 1975?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"women_s_doubles_10_4_titles_6_runner_ups\" WHERE \"surface\"='clay' AND \"partner\"='margaret court' AND \"year\"=1975;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"central_murray\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the number of against when Central Murray is Tooleybuc Manangatang and there are fewer than 13 wins?" }, { "role": "assistant", "content": "SELECT MAX(\"against\") FROM \"2011_ladder\" WHERE \"central_murray\"='tooleybuc manangatang' AND \"wins\"<13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"central_murray\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many byes when the draws are fewer than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"byes\") FROM \"2011_ladder\" WHERE \"draws\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"central_murray\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: What is the byes for Woorineen when losses are more than 13?" }, { "role": "assistant", "content": "SELECT SUM(\"byes\") FROM \"2011_ladder\" WHERE \"central_murray\"='woorineen' AND \"losses\">13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"central_murray\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many wins when there are 4 losses and against are fewer than 1281?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"2011_ladder\" WHERE \"losses\"=4 AND \"against\"<1281;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_ladder\" (\n \"central_murray\" text,\n \"wins\" real,\n \"byes\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many against when losses are 11 and wins are fewer than 5?" }, { "role": "assistant", "content": "SELECT AVG(\"against\") FROM \"2011_ladder\" WHERE \"losses\"=11 AND \"wins\"<5;" } ]
[ { "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 Player has a To par of \u20137, and a Country of spain?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"third_round\" WHERE \"to_par\"='\u20137' AND \"country\"='spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"title\" text,\n \"author\" text,\n \"doctor\" text,\n \"companion_s\" text,\n \"published\" text\n);\n\nQuestion: What doctor published on June 2003?" }, { "role": "assistant", "content": "SELECT \"doctor\" FROM \"external_links\" WHERE \"published\"='june 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"title\" text,\n \"author\" text,\n \"doctor\" text,\n \"companion_s\" text,\n \"published\" text\n);\n\nQuestion: What title was published on November 2001 and has a 1st Doctor?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"external_links\" WHERE \"doctor\"='1st' AND \"published\"='november 2001';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"title\" text,\n \"author\" text,\n \"doctor\" text,\n \"companion_s\" text,\n \"published\" text\n);\n\nQuestion: What is the title of the 8th doctor published in January 2003?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"external_links\" WHERE \"doctor\"='8th' AND \"published\"='january 2003';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"external_links\" (\n \"title\" text,\n \"author\" text,\n \"doctor\" text,\n \"companion_s\" text,\n \"published\" text\n);\n\nQuestion: What is the companion for the author Dave Stone?" }, { "role": "assistant", "content": "SELECT \"companion_s\" FROM \"external_links\" WHERE \"author\"='dave stone';" } ]
[ { "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\" real,\n \"finish\" text\n);\n\nQuestion: What Player won the PGA in 1989?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"made_the_cut\" WHERE \"year_s_won\"='1989';" } ]
[ { "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 player is from Northern Ireland?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"third_round\" WHERE \"country\"='northern ireland';" } ]
[ { "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 player has a score of 69-68-68=205?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"third_round\" WHERE \"score\"='69-68-68=205';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which Week has an Attendance larger than 63,369?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\">'63,369';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result on september 26?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='september 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" real\n);\n\nQuestion: Which Week has a Game site of oakland-alameda county coliseum, and an Attendance larger than 52,169?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"game_site\"='oakland-alameda county coliseum' AND \"attendance\">'52,169';" } ]
[ { "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 Player, when Score is \"68-71=139\"?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"second_round\" WHERE \"score\"='68-71=139';" } ]
[ { "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 Player is \"Tom Watson\"?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='tom watson';" } ]
[ { "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 Place, when Player is \"Steve Pate\"?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='steve pate';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: How many against on the date of 08/06/1985?" }, { "role": "assistant", "content": "SELECT SUM(\"against\") FROM \"1985\" WHERE \"date\"='08/06/1985';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the venue for the match on 30/03/1985?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"1985\" WHERE \"date\"='30/03/1985';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the status of the match with 24 against?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"1985\" WHERE \"against\"=24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Who was the opposing team when the status is second test?" }, { "role": "assistant", "content": "SELECT \"opposing_teams\" FROM \"1985\" WHERE \"status\"='second test';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1985\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the status when Wales is the opposing team and there are more than 13 against?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"1985\" WHERE \"against\">13 AND \"opposing_teams\"='wales';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"alabama_counties_ranked_by_per_capita_in\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income_1_000_000\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the lowest number of households for the entry with a median income of $41,778 and a population greater than 38,319?" }, { "role": "assistant", "content": "SELECT MIN(\"number_of_households\") FROM \"alabama_counties_ranked_by_per_capita_in\" WHERE \"median_family_income\"='$41,778' AND \"population\">'38,319';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ahrend_brunzema_1954_1971\" (\n \"year\" text,\n \"opus\" real,\n \"town\" text,\n \"church\" text,\n \"kind\" text,\n \"manuals\" text,\n \"stops\" text\n);\n\nQuestion: Which Church has 27 stops?" }, { "role": "assistant", "content": "SELECT \"church\" FROM \"ahrend_brunzema_1954_1971\" WHERE \"stops\"='27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: Who is the opponent(s) in round 6?" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"fa_cup\" WHERE \"round\"='round 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"female_athlete_of_the_year\" (\n \"year\" real,\n \"winner\" text,\n \"sport\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: In what year was the winner a soccer player from Virginia?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"female_athlete_of_the_year\" WHERE \"sport\"='soccer' AND \"college\"='virginia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"female_athlete_of_the_year\" (\n \"year\" real,\n \"winner\" text,\n \"sport\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: In what year did Morgan Brian win?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"female_athlete_of_the_year\" WHERE \"winner\"='morgan brian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"female_athlete_of_the_year\" (\n \"year\" real,\n \"winner\" text,\n \"sport\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: Who is the winner who attended college at Connecticut and is from North Syracuse, NY?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"female_athlete_of_the_year\" WHERE \"college\"='connecticut' AND \"hometown\"='north syracuse, ny';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"female_athlete_of_the_year\" (\n \"year\" real,\n \"winner\" text,\n \"sport\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the hometown of the player who went to college at USC?" }, { "role": "assistant", "content": "SELECT \"hometown\" FROM \"female_athlete_of_the_year\" WHERE \"college\"='usc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_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 lowest Draws, when Against is \"1547\", and when Wins is greater than 3?" }, { "role": "assistant", "content": "SELECT MIN(\"draws\") FROM \"2010_ladder\" WHERE \"against\"=1547 AND \"wins\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_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 Wins, when Losses is \"6\", and when Draws is greater than \"0\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"2010_ladder\" WHERE \"losses\"=6 AND \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_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 lowest Draws, when Byes is less than 2?" }, { "role": "assistant", "content": "SELECT MIN(\"draws\") FROM \"2010_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 \"2010_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 Against is \"1134\", and when Byes is less than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"draws\") FROM \"2010_ladder\" WHERE \"against\"=1134 AND \"byes\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2010_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 sum of Wins, when Against is less than 1033, when Golden Rivers is \"Nullawil\", and when Byes is less than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"2010_ladder\" WHERE \"against\"<1033 AND \"golden_rivers\"='nullawil' AND \"byes\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1999\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is 7:00 am, when 7:30 am is \"Good Morning America\"?" }, { "role": "assistant", "content": "SELECT \"7_00_am\" FROM \"spring_1999\" WHERE \"7_30_am\"='good morning america';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1999\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is 1:30 pm, when 7:00 am is \"Tiny Toon Adventures\"?" }, { "role": "assistant", "content": "SELECT \"1_30_pm\" FROM \"spring_1999\" WHERE \"7_00_am\"='tiny toon adventures';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1999\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is 8:00 am, when 11:00 am is \"Local Programs\"?" }, { "role": "assistant", "content": "SELECT \"8_00_am\" FROM \"spring_1999\" WHERE \"11_00_am\"='local programs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1999\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is 1:30 pm, when 3:30 pm is \"Young Hercules\"?" }, { "role": "assistant", "content": "SELECT \"1_30_pm\" FROM \"spring_1999\" WHERE \"3_30_pm\"='young hercules';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"spring_1999\" (\n \"7_00_am\" text,\n \"7_30_am\" text,\n \"8_00_am\" text,\n \"9_00_am\" text,\n \"11_00_am\" text,\n \"noon\" text,\n \"12_30_pm\" text,\n \"1_00_pm\" text,\n \"1_30_pm\" text,\n \"2_00_pm\" text,\n \"3_00_pm\" text,\n \"3_30_pm\" text,\n \"4_00_pm\" text,\n \"4_30_pm\" text,\n \"5_00_pm\" text,\n \"6_30_pm\" text\n);\n\nQuestion: What is 4:30 pm, when Noon is \"Local Programs\", and when 11:00 am is \"Local Programs\"?" }, { "role": "assistant", "content": "SELECT \"4_30_pm\" FROM \"spring_1999\" WHERE \"noon\"='local programs' AND \"11_00_am\"='local programs';" } ]
[ { "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 \"notes\" text\n);\n\nQuestion: Which Year has a Competition of european championships, and Notes of 66.81 m?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"achievements\" WHERE \"competition\"='european championships' AND \"notes\"='66.81 m';" } ]
[ { "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 \"notes\" text\n);\n\nQuestion: Which Position has a Venue of berlin, germany?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"achievements\" WHERE \"venue\"='berlin, 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 \"notes\" text\n);\n\nQuestion: Which competition was held in Arles, France?" }, { "role": "assistant", "content": "SELECT \"competition\" FROM \"achievements\" WHERE \"venue\"='arles, france';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_to_the_alternatives\" (\n \"lince\" text,\n \"leopard_2_a4\" text,\n \"leclerc\" text,\n \"m1_a1_abrams\" text,\n \"m60_a3_patton\" text\n);\n\nQuestion: What is the M1A1 when the M60A3 was T (Short Tons)?" }, { "role": "assistant", "content": "SELECT \"m1_a1_abrams\" FROM \"comparison_to_the_alternatives\" WHERE \"m60_a3_patton\"='t (short tons)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_to_the_alternatives\" (\n \"lince\" text,\n \"leopard_2_a4\" text,\n \"leclerc\" text,\n \"m1_a1_abrams\" text,\n \"m60_a3_patton\" text\n);\n\nQuestion: What is the M60A3 when the M1A1 is T (Short Tons)?" }, { "role": "assistant", "content": "SELECT \"m60_a3_patton\" FROM \"comparison_to_the_alternatives\" WHERE \"m1_a1_abrams\"='t (short tons)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_to_the_alternatives\" (\n \"lince\" text,\n \"leopard_2_a4\" text,\n \"leclerc\" text,\n \"m1_a1_abrams\" text,\n \"m60_a3_patton\" text\n);\n\nQuestion: What is the M60A3 that has an M1A1 of Km (mi)?" }, { "role": "assistant", "content": "SELECT \"m60_a3_patton\" FROM \"comparison_to_the_alternatives\" WHERE \"m1_a1_abrams\"='km (mi)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_to_the_alternatives\" (\n \"lince\" text,\n \"leopard_2_a4\" text,\n \"leclerc\" text,\n \"m1_a1_abrams\" text,\n \"m60_a3_patton\" text\n);\n\nQuestion: What is the M60A3 that has 40 rounds as Leclerc?" }, { "role": "assistant", "content": "SELECT \"m60_a3_patton\" FROM \"comparison_to_the_alternatives\" WHERE \"leclerc\"='40 rounds';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_to_the_alternatives\" (\n \"lince\" text,\n \"leopard_2_a4\" text,\n \"leclerc\" text,\n \"m1_a1_abrams\" text,\n \"m60_a3_patton\" text\n);\n\nQuestion: What's the lince when Leclerc was Hp (kw)?" }, { "role": "assistant", "content": "SELECT \"lince\" FROM \"comparison_to_the_alternatives\" WHERE \"leclerc\"='hp (kw)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_to_the_alternatives\" (\n \"lince\" text,\n \"leopard_2_a4\" text,\n \"leclerc\" text,\n \"m1_a1_abrams\" text,\n \"m60_a3_patton\" text\n);\n\nQuestion: What is the M1A1 when the Lince was T (Short Tons)?" }, { "role": "assistant", "content": "SELECT \"m1_a1_abrams\" FROM \"comparison_to_the_alternatives\" WHERE \"lince\"='t (short tons)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_records\" (\n \"distance\" text,\n \"event\" text,\n \"time\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: Which Distance has a Time of 2:20.00?" }, { "role": "assistant", "content": "SELECT \"distance\" FROM \"world_records\" WHERE \"time\"='2:20.00';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_records\" (\n \"distance\" text,\n \"event\" text,\n \"time\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: Which Distance has an Event of breaststroke, and a Location of beijing, chn?" }, { "role": "assistant", "content": "SELECT \"distance\" FROM \"world_records\" WHERE \"event\"='breaststroke' AND \"location\"='beijing, chn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_records\" (\n \"distance\" text,\n \"event\" text,\n \"time\" text,\n \"meet\" text,\n \"location\" text\n);\n\nQuestion: What Meet has a Time of 1:04.84?" }, { "role": "assistant", "content": "SELECT \"meet\" FROM \"world_records\" WHERE \"time\"='1:04.84';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"season\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"viewer_rank_num\" text,\n \"households_viewers_in_millions\" real\n);\n\nQuestion: What season had a viewer rank of #4?" }, { "role": "assistant", "content": "SELECT COUNT(\"season\") FROM \"ratings\" WHERE \"viewer_rank_num\"='#4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"season\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"viewer_rank_num\" text,\n \"households_viewers_in_millions\" real\n);\n\nQuestion: Which season had less than 25.4 viewers and had a viewer rank of #6?" }, { "role": "assistant", "content": "SELECT MIN(\"season\") FROM \"ratings\" WHERE \"households_viewers_in_millions\"<25.4 AND \"viewer_rank_num\"='#6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings\" (\n \"season\" real,\n \"season_premiere\" text,\n \"season_finale\" text,\n \"tv_season\" text,\n \"viewer_rank_num\" text,\n \"households_viewers_in_millions\" real\n);\n\nQuestion: When did the season premiere that had a viewer rank of #6?" }, { "role": "assistant", "content": "SELECT \"season_premiere\" FROM \"ratings\" WHERE \"viewer_rank_num\"='#6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of gold medals of the ranked 2nd nation, which has less than 2 silvers?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"rank\"='2' AND \"silver\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total number of gold medals of the nation with 0 silver and more than 1 bronze?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"medal_table\" WHERE \"silver\"=0 AND \"bronze\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest number of bronze of the nation with more than 13 total medals, more than 10 gold medals, and less than 22 silvers?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"total\">13 AND \"gold\">10 AND \"silver\"<22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text\n);\n\nQuestion: What was the main date of the round with 20 fixtures?" }, { "role": "assistant", "content": "SELECT \"main_date\" FROM \"calendar\" WHERE \"number_of_fixtures\"=20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" text,\n \"main_date\" text,\n \"number_of_fixtures\" real,\n \"clubs\" text,\n \"new_entries_this_round\" text,\n \"prize_money\" text\n);\n\nQuestion: What were the new entries for the Semi-Finals round with fewer than 8 fixtures?" }, { "role": "assistant", "content": "SELECT \"new_entries_this_round\" FROM \"calendar\" WHERE \"number_of_fixtures\"<8 AND \"round\"='semi-finals';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current\" (\n \"club\" text,\n \"nickname\" text,\n \"location\" text,\n \"home_ground\" text,\n \"gfl_premierships\" text,\n \"years_in_gfl\" text\n);\n\nQuestion: What was the club when home ground was Central Reserve?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"current\" WHERE \"home_ground\"='central reserve';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current\" (\n \"club\" text,\n \"nickname\" text,\n \"location\" text,\n \"home_ground\" text,\n \"gfl_premierships\" text,\n \"years_in_gfl\" text\n);\n\nQuestion: What's the GFL Premiership when the home ground was Leopold Memorial Park?" }, { "role": "assistant", "content": "SELECT \"gfl_premierships\" FROM \"current\" WHERE \"home_ground\"='leopold memorial park';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current\" (\n \"club\" text,\n \"nickname\" text,\n \"location\" text,\n \"home_ground\" text,\n \"gfl_premierships\" text,\n \"years_in_gfl\" text\n);\n\nQuestion: What's the location where the Years in GFL was 1988-?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"current\" WHERE \"years_in_gfl\"='1988-';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"current\" (\n \"club\" text,\n \"nickname\" text,\n \"location\" text,\n \"home_ground\" text,\n \"gfl_premierships\" text,\n \"years_in_gfl\" text\n);\n\nQuestion: What's the home ground of the Lions?" }, { "role": "assistant", "content": "SELECT \"home_ground\" FROM \"current\" WHERE \"nickname\"='lions';" } ]