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 \"pool_f\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Score has a Set 1 of 25\u201316?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"pool_f\" WHERE \"set_1\"='25\u201316';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pool_f\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text\n);\n\nQuestion: Which Date has a Score of 2\u20133, a Time of 20:30, and a Set 3 of 16\u201325?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"pool_f\" WHERE \"score\"='2\u20133' AND \"time\"='20:30' AND \"set_3\"='16\u201325';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kit\" (\n \"year\" text,\n \"supplier\" text,\n \"chest\" text,\n \"sleeves\" text,\n \"back\" text\n);\n\nQuestion: Which Back has a Supplier of Kooga and a Year of 2006-2008?" }, { "role": "assistant", "content": "SELECT \"back\" FROM \"kit\" WHERE \"supplier\"='kooga' AND \"year\"='2006-2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kit\" (\n \"year\" text,\n \"supplier\" text,\n \"chest\" text,\n \"sleeves\" text,\n \"back\" text\n);\n\nQuestion: Which Supplier has a Year of 2006-2008?" }, { "role": "assistant", "content": "SELECT \"supplier\" FROM \"kit\" WHERE \"year\"='2006-2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kit\" (\n \"year\" text,\n \"supplier\" text,\n \"chest\" text,\n \"sleeves\" text,\n \"back\" text\n);\n\nQuestion: Which Sleeves have a Back of Unknown?" }, { "role": "assistant", "content": "SELECT \"sleeves\" FROM \"kit\" WHERE \"back\"='unknown';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kit\" (\n \"year\" text,\n \"supplier\" text,\n \"chest\" text,\n \"sleeves\" text,\n \"back\" text\n);\n\nQuestion: What is the Year for Supplier Kooga?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"kit\" WHERE \"supplier\"='kooga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kit\" (\n \"year\" text,\n \"supplier\" text,\n \"chest\" text,\n \"sleeves\" text,\n \"back\" text\n);\n\nQuestion: Which Sleeves have a Year of 2006-2008?" }, { "role": "assistant", "content": "SELECT \"sleeves\" FROM \"kit\" WHERE \"year\"='2006-2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kit\" (\n \"year\" text,\n \"supplier\" text,\n \"chest\" text,\n \"sleeves\" text,\n \"back\" text\n);\n\nQuestion: Which Chest is Supplied by Gilbert?" }, { "role": "assistant", "content": "SELECT \"chest\" FROM \"kit\" WHERE \"supplier\"='gilbert';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canada\" (\n \"year_started\" real,\n \"number_of_cars\" real,\n \"current_car\" text,\n \"car_num\" text,\n \"website\" text\n);\n\nQuestion: Which website was started in 2008?" }, { "role": "assistant", "content": "SELECT \"website\" FROM \"canada\" WHERE \"year_started\"=2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canada\" (\n \"year_started\" real,\n \"number_of_cars\" real,\n \"current_car\" text,\n \"car_num\" text,\n \"website\" text\n);\n\nQuestion: Which Year started is the highest one that has a Current car of arctic sun, and a Number of cars smaller than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"year_started\") FROM \"canada\" WHERE \"current_car\"='arctic sun' AND \"number_of_cars\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canada\" (\n \"year_started\" real,\n \"number_of_cars\" real,\n \"current_car\" text,\n \"car_num\" text,\n \"website\" text\n);\n\nQuestion: Which Current car has a Number of cars of 1, and a Year started of 1999?" }, { "role": "assistant", "content": "SELECT \"current_car\" FROM \"canada\" WHERE \"number_of_cars\"=1 AND \"year_started\"=1999;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"canada\" (\n \"year_started\" real,\n \"number_of_cars\" real,\n \"current_car\" text,\n \"car_num\" text,\n \"website\" text\n);\n\nQuestion: Which Year started is the lowest one that has a Number of cars larger than 7, and a Car # of 100?" }, { "role": "assistant", "content": "SELECT MIN(\"year_started\") FROM \"canada\" WHERE \"number_of_cars\">7 AND \"car_num\"='100';" } ]
[ { "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 \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is the total number of Round, when Position is \"D\", and when Player is \"Andrew Campbell\"?" }, { "role": "assistant", "content": "SELECT COUNT(\"round\") FROM \"draft_picks\" WHERE \"position\"='d' AND \"player\"='andrew campbell';" } ]
[ { "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 \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Nationality, when College/Junior/Club Team (League) is \"Guelph Storm ( OHL )\"?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='guelph storm ( ohl )';" } ]
[ { "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 \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Nationality, when Player is \"Andrew Campbell\"?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='andrew campbell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"salmson_post_world_war_one_engines\" (\n \"name\" text,\n \"cyl\" text,\n \"bore\" text,\n \"capacity\" text,\n \"power\" text,\n \"weight\" text\n);\n\nQuestion: Which Power has a Name of 9 nc?" }, { "role": "assistant", "content": "SELECT \"power\" FROM \"salmson_post_world_war_one_engines\" WHERE \"name\"='9 nc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"salmson_post_world_war_one_engines\" (\n \"name\" text,\n \"cyl\" text,\n \"bore\" text,\n \"capacity\" text,\n \"power\" text,\n \"weight\" text\n);\n\nQuestion: Which Weight has a Power of kw (hp) at 1,800rpm, and a Name of 9 nc?" }, { "role": "assistant", "content": "SELECT \"weight\" FROM \"salmson_post_world_war_one_engines\" WHERE \"power\"='kw (hp) at 1,800rpm' AND \"name\"='9 nc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"salmson_post_world_war_one_engines\" (\n \"name\" text,\n \"cyl\" text,\n \"bore\" text,\n \"capacity\" text,\n \"power\" text,\n \"weight\" text\n);\n\nQuestion: Which Bore has a Name of 9 adr?" }, { "role": "assistant", "content": "SELECT \"bore\" FROM \"salmson_post_world_war_one_engines\" WHERE \"name\"='9 adr';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"salmson_post_world_war_one_engines\" (\n \"name\" text,\n \"cyl\" text,\n \"bore\" text,\n \"capacity\" text,\n \"power\" text,\n \"weight\" text\n);\n\nQuestion: Which Power has a Name of 9 ad?" }, { "role": "assistant", "content": "SELECT \"power\" FROM \"salmson_post_world_war_one_engines\" WHERE \"name\"='9 ad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: When the pick was below 42 and the player was Chris Horton, what's the highest Overall pick found?" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='chris horton' AND \"pick\"<42;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: When Kansas State had a pick of over 35, what's the highest Overall pick found?" }, { "role": "assistant", "content": "SELECT MAX(\"overall\") FROM \"washington_redskins_draft_history\" WHERE \"college\"='kansas state' AND \"pick\">35;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1991_92\" text,\n \"1992_93\" text,\n \"1993_94\" real\n);\n\nQuestion: Total points with 114 played and average of 0.982?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"relegation\" WHERE \"played\"=114 AND \"average\"=0.982;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1991_92\" text,\n \"1992_93\" text,\n \"1993_94\" real\n);\n\nQuestion: Team with average of 1.035?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"relegation\" WHERE \"average\"=1.035;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1991_92\" text,\n \"1992_93\" text,\n \"1993_94\" real\n);\n\nQuestion: Total average with less than 105 points, 1993-1994 less than 30, and the team of gimnasia y tiro?" }, { "role": "assistant", "content": "SELECT SUM(\"average\") FROM \"relegation\" WHERE \"points\"<105 AND \"team\"='gimnasia y tiro' AND \"1993_94\"<30;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was Chris Hanburger's position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"washington_redskins_draft_history\" WHERE \"name\"='chris hanburger';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"washington_redskins_draft_history\" (\n \"round\" real,\n \"pick\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What was John Strohmeyer's average pick before round 12?" }, { "role": "assistant", "content": "SELECT AVG(\"pick\") FROM \"washington_redskins_draft_history\" WHERE \"name\"='john strohmeyer' AND \"round\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the average points when position is more than 5 and played is less than 10?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"relegation_round\" WHERE \"position\">5 AND \"played\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the average points when drawn is 0, lost is 5 and played is more than 10?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"relegation_round\" WHERE \"drawn\"=0 AND \"lost\"=5 AND \"played\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the average number lost when points is 14 and position is more than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"relegation_round\" WHERE \"points\"=14 AND \"position\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"relegation_round\" (\n \"position\" real,\n \"name\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: what is the average points when played is 9, name is ev pegnitz and position is larger than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"relegation_round\" WHERE \"played\"=9 AND \"name\"='ev pegnitz' AND \"position\">1;" } ]
[ { "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 Score is 72-72=144, when Country is United States, and when Player is Scott McCarron?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"score\"='72-72=144' AND \"country\"='united states' AND \"player\"='scott mccarron';" } ]
[ { "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 Score is 70-73=143?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round\" WHERE \"score\"='70-73=143';" } ]
[ { "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 Place is 2?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"second_round\" WHERE \"place\"='2';" } ]
[ { "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 Billy Mayfair?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"second_round\" WHERE \"player\"='billy mayfair';" } ]
[ { "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 To Par, when Player is K. J. Choi?" }, { "role": "assistant", "content": "SELECT \"to_par\" FROM \"second_round\" WHERE \"player\"='k. j. choi';" } ]
[ { "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 Billy Mayfair?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='billy mayfair';" } ]
[ { "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 place did Don Whitt finish?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='don whitt';" } ]
[ { "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 did Phil Rodgers score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"second_round\" WHERE \"player\"='phil rodgers';" } ]
[ { "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 place was Gary Player after two rounds?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"second_round\" WHERE \"player\"='gary player';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is 1993, when Tournament is \"Cincinnati\"?" }, { "role": "assistant", "content": "SELECT \"1993\" FROM \"singles_performance_timeline\" WHERE \"tournament\"='cincinnati';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is 1994, when 1996 is \"Grand Slams\"?" }, { "role": "assistant", "content": "SELECT \"1994\" FROM \"singles_performance_timeline\" WHERE \"1996\"='grand slams';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is Tournament, when 1996 is \"1R\", and when 1990 is \"SF\"?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_performance_timeline\" WHERE \"1996\"='1r' AND \"1990\"='sf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text\n);\n\nQuestion: What is 1993, when 1992 is \"SF\", and when Tournament is \"Paris\"?" }, { "role": "assistant", "content": "SELECT \"1993\" FROM \"singles_performance_timeline\" WHERE \"1992\"='sf' AND \"tournament\"='paris';" } ]
[ { "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 country has a 70-73-70=213 score?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"third_round\" WHERE \"score\"='70-73-70=213';" } ]
[ { "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 player johnny miller, who has a to par of +2?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"to_par\"='+2' AND \"player\"='johnny miller';" } ]
[ { "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 country is player mike sullivan from?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='mike sullivan';" } ]
[ { "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 with a 71-72-70=213 score?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"third_round\" WHERE \"score\"='71-72-70=213';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text\n);\n\nQuestion: What was the record after the game on May 1, 2004?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"date\"='may 1, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text\n);\n\nQuestion: What was the record after the game with the Manchester Wolves on July 30, 2004?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"regular_season\" WHERE \"opponent\"='manchester wolves' AND \"date\"='july 30, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text\n);\n\nQuestion: Which game site hosted a match on April 10, 2004?" }, { "role": "assistant", "content": "SELECT \"game_site\" FROM \"regular_season\" WHERE \"date\"='april 10, 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"school\" text,\n \"bask\" text,\n \"golf\" text,\n \"soccer\" text,\n \"soft\" text,\n \"swimming\" text,\n \"tennis\" text,\n \"indoor_track\" text,\n \"volleyball\" text\n);\n\nQuestion: Does Green Bay have a golf team?" }, { "role": "assistant", "content": "SELECT \"golf\" FROM \"women_s\" WHERE \"school\"='green bay';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"school\" text,\n \"bask\" text,\n \"golf\" text,\n \"soccer\" text,\n \"soft\" text,\n \"swimming\" text,\n \"tennis\" text,\n \"indoor_track\" text,\n \"volleyball\" text\n);\n\nQuestion: Does Detroit have a soccer team?" }, { "role": "assistant", "content": "SELECT \"soccer\" FROM \"women_s\" WHERE \"school\"='detroit';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_carl_levin\" text,\n \"republican_jack_hoogendyk\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is Poll Source, when Democrat: Carl Levin is 61%?" }, { "role": "assistant", "content": "SELECT \"poll_source\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"democrat_carl_levin\"='61%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_carl_levin\" text,\n \"republican_jack_hoogendyk\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is Democrat: Carl Levin, when Lead Margin is 22?" }, { "role": "assistant", "content": "SELECT \"democrat_carl_levin\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"lead_margin\"=22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_carl_levin\" text,\n \"republican_jack_hoogendyk\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is Dates Administered, when Poll Source is Rasmussen Reports, when Lead Margin is greater than 18, when Republican: Jack Hoogendyk is 36%, and when Democrat: Carl Levin is 59%?" }, { "role": "assistant", "content": "SELECT \"dates_administered\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"poll_source\"='rasmussen reports' AND \"lead_margin\">18 AND \"republican_jack_hoogendyk\"='36%' AND \"democrat_carl_levin\"='59%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"opinion_polling_for_the_united_states_se\" (\n \"poll_source\" text,\n \"dates_administered\" text,\n \"democrat_carl_levin\" text,\n \"republican_jack_hoogendyk\" text,\n \"lead_margin\" real\n);\n\nQuestion: What is Dates Administered, when Democrat: Carl Levin is 61%?" }, { "role": "assistant", "content": "SELECT \"dates_administered\" FROM \"opinion_polling_for_the_united_states_se\" WHERE \"democrat_carl_levin\"='61%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_head_coaches\" (\n \"coach\" text,\n \"years\" text,\n \"win_loss\" text,\n \"win_pct\" text,\n \"conference_titles\" text\n);\n\nQuestion: What is Win %, when Conference Titles is 0, and when Win-Loss is 20-10?" }, { "role": "assistant", "content": "SELECT \"win_pct\" FROM \"all_time_head_coaches\" WHERE \"conference_titles\"='0' AND \"win_loss\"='20-10';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_head_coaches\" (\n \"coach\" text,\n \"years\" text,\n \"win_loss\" text,\n \"win_pct\" text,\n \"conference_titles\" text\n);\n\nQuestion: What is Conference Titles, when Win % is .667?" }, { "role": "assistant", "content": "SELECT \"conference_titles\" FROM \"all_time_head_coaches\" WHERE \"win_pct\"='.667';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_head_coaches\" (\n \"coach\" text,\n \"years\" text,\n \"win_loss\" text,\n \"win_pct\" text,\n \"conference_titles\" text\n);\n\nQuestion: What is Coach, when Win % is .352?" }, { "role": "assistant", "content": "SELECT \"coach\" FROM \"all_time_head_coaches\" WHERE \"win_pct\"='.352';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_head_coaches\" (\n \"coach\" text,\n \"years\" text,\n \"win_loss\" text,\n \"win_pct\" text,\n \"conference_titles\" text\n);\n\nQuestion: What is Win-Loss, when Win % is .456?" }, { "role": "assistant", "content": "SELECT \"win_loss\" FROM \"all_time_head_coaches\" WHERE \"win_pct\"='.456';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"all_time_head_coaches\" (\n \"coach\" text,\n \"years\" text,\n \"win_loss\" text,\n \"win_pct\" text,\n \"conference_titles\" text\n);\n\nQuestion: What is Years, when Win-Loss is 11-60?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"all_time_head_coaches\" WHERE \"win_loss\"='11-60';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_records\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"place\" text\n);\n\nQuestion: What is the Date that has a Record of 33.952?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"women_s_records\" WHERE \"record\"='33.952';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_records\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"place\" text\n);\n\nQuestion: What is the Place that has a Date of 4 august 2012?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"women_s_records\" WHERE \"date\"='4 august 2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_records\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"place\" text\n);\n\nQuestion: What is the Place that has a Date of 22 august 2004?" }, { "role": "assistant", "content": "SELECT \"place\" FROM \"women_s_records\" WHERE \"date\"='22 august 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_records\" (\n \"event\" text,\n \"record\" text,\n \"athlete\" text,\n \"nationality\" text,\n \"date\" text,\n \"meet\" text,\n \"place\" text\n);\n\nQuestion: What is the Record that has a Nationality of new zealand?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"women_s_records\" WHERE \"nationality\"='new zealand';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: WHAT IS THE SKIP WITH A THIRD OF DEANNA DOIG?" }, { "role": "assistant", "content": "SELECT \"skip\" FROM \"women_s\" WHERE \"third\"='deanna doig';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: WHAT IS THE THIRD WITH LEAD CINDY SIMMONS?" }, { "role": "assistant", "content": "SELECT \"third\" FROM \"women_s\" WHERE \"lead\"='cindy simmons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: WHAT IS THE LEAD WITH THIRD AS JEANNA SCHRAEDER?" }, { "role": "assistant", "content": "SELECT \"lead\" FROM \"women_s\" WHERE \"third\"='jeanna schraeder';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: WHAT IS THE LEAD WITH THIRD AS TARA GEORGE?" }, { "role": "assistant", "content": "SELECT \"lead\" FROM \"women_s\" WHERE \"third\"='tara george';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: WHAT IS TEH SECOND WITH REGINA AS CITY AND SKIP OF MICHELLE ENGLOT?" }, { "role": "assistant", "content": "SELECT \"second\" FROM \"women_s\" WHERE \"city\"='regina' AND \"skip\"='michelle englot';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s\" (\n \"skip\" text,\n \"third\" text,\n \"second\" text,\n \"lead\" text,\n \"city\" text\n);\n\nQuestion: WHAT IS THE CITY WITH THIRD AS LORI OLSON-JOHNS?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"women_s\" WHERE \"third\"='lori olson-johns';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What event has a 0:49 time?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='0:49';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" real,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What is the record with a 3:56 time?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='3:56';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kfk_competition_of_ukraine\" (\n \"season\" text,\n \"zone\" real,\n \"champion\" text,\n \"second\" text,\n \"third\" text,\n \"top_scorer\" text\n);\n\nQuestion: Which Champion has a Third of blaho blahoyeve, and a Season of 1995-96?" }, { "role": "assistant", "content": "SELECT \"champion\" FROM \"kfk_competition_of_ukraine\" WHERE \"third\"='blaho blahoyeve' AND \"season\"='1995-96';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kfk_competition_of_ukraine\" (\n \"season\" text,\n \"zone\" real,\n \"champion\" text,\n \"second\" text,\n \"third\" text,\n \"top_scorer\" text\n);\n\nQuestion: Which Zone has a Champion of surozh sudak?" }, { "role": "assistant", "content": "SELECT SUM(\"zone\") FROM \"kfk_competition_of_ukraine\" WHERE \"champion\"='surozh sudak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kfk_competition_of_ukraine\" (\n \"season\" text,\n \"zone\" real,\n \"champion\" text,\n \"second\" text,\n \"third\" text,\n \"top_scorer\" text\n);\n\nQuestion: Which Third has a Champion of metalurh novomoskovsk?" }, { "role": "assistant", "content": "SELECT \"third\" FROM \"kfk_competition_of_ukraine\" WHERE \"champion\"='metalurh novomoskovsk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"parishes\" (\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 census ranking for the parish with an area larger than 243.31 square km?" }, { "role": "assistant", "content": "SELECT \"census_ranking\" FROM \"parishes\" WHERE \"area_km_2\">243.31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the verb meaning for Saugen in part 1?" }, { "role": "assistant", "content": "SELECT \"verb_meaning\" FROM \"german\" WHERE \"part_1\"='saugen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the verb meaning for Gaben in part 3?" }, { "role": "assistant", "content": "SELECT \"verb_meaning\" FROM \"german\" WHERE \"part_3\"='gaben';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the class for Geholfen Gedroschen in part 4?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"german\" WHERE \"part_4\"='geholfen gedroschen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the class for trafen in part 3?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"german\" WHERE \"part_3\"='trafen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"german\" (\n \"class\" text,\n \"part_1\" text,\n \"part_2\" text,\n \"part_3\" text,\n \"part_4\" text,\n \"verb_meaning\" text\n);\n\nQuestion: What is the verb meaning for class 4?" }, { "role": "assistant", "content": "SELECT \"verb_meaning\" FROM \"german\" WHERE \"class\"='4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1928_1939\" (\n \"name\" text,\n \"born_died\" text,\n \"term_start\" text,\n \"term_end\" text,\n \"political_party\" text\n);\n\nQuestion: Who is the prime minister that had a term that ended on 5 March 1930?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"1928_1939\" WHERE \"term_end\"='5 march 1930';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What are the Poles for Season 2006" }, { "role": "assistant", "content": "SELECT \"poles\" FROM \"career_summary\" WHERE \"season\"=2006;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: If Podiums is 2 and F/Laps are 2, what are the wins?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"career_summary\" WHERE \"podiums\"='2' AND \"f_laps\"='2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" real,\n \"series\" text,\n \"races\" text,\n \"wins\" text,\n \"poles\" text,\n \"f_laps\" text,\n \"podiums\" text,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: If the Races is Test Driver what is the Position?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"career_summary\" WHERE \"races\"='test driver';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"points\" real,\n \"final_placing\" text\n);\n\nQuestion: Can you tell me the lowest Races that has the Team Name of piquet gp, and the Points larger than 24?" }, { "role": "assistant", "content": "SELECT MIN(\"races\") FROM \"career_summary\" WHERE \"team_name\"='piquet gp' AND \"points\">24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"points\" real,\n \"final_placing\" text\n);\n\nQuestion: Can you tell me the sum of Poles that has the Season of 2005, and the Series of formula three sudamericana?" }, { "role": "assistant", "content": "SELECT SUM(\"poles\") FROM \"career_summary\" WHERE \"season\"='2005' AND \"series\"='formula three sudamericana';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team_name\" text,\n \"races\" real,\n \"poles\" real,\n \"wins\" real,\n \"points\" real,\n \"final_placing\" text\n);\n\nQuestion: Can you tell me the Series that has the Wins of 0, and the Season of a 2002?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"career_summary\" WHERE \"wins\"=0 AND \"season\"='2002';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"football_league_two\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is Venue, when Game is greater than 18, and when Opponent is Morecambe?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"football_league_two\" WHERE \"game\">18 AND \"opponent\"='morecambe';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"football_league_two\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the sum of Game, when Date is 29 January 2008?" }, { "role": "assistant", "content": "SELECT SUM(\"game\") FROM \"football_league_two\" WHERE \"date\"='29 january 2008';" } ]
[ { "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 \"date\" text,\n \"label\" text,\n \"catalog\" text,\n \"format\" text\n);\n\nQuestion: What date had a catalog of kicp-1321?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"catalog\"='kicp-1321';" } ]
[ { "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 \"date\" text,\n \"label\" text,\n \"catalog\" text,\n \"format\" text\n);\n\nQuestion: What was the catalog when the label was frontiers records?" }, { "role": "assistant", "content": "SELECT \"catalog\" FROM \"release_history\" WHERE \"label\"='frontiers records';" } ]
[ { "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 \"date\" text,\n \"label\" text,\n \"catalog\" text,\n \"format\" text\n);\n\nQuestion: What was the format for the region of europe?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"region\"='europe';" } ]
[ { "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 \"date\" text,\n \"label\" text,\n \"catalog\" text,\n \"format\" text\n);\n\nQuestion: What was the region when the label was the universal music group?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"release_history\" WHERE \"label\"='universal music group';" } ]
[ { "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 \"date\" text,\n \"label\" text,\n \"catalog\" text,\n \"format\" text\n);\n\nQuestion: What was the format when the label was loen entertainment?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"label\"='loen entertainment';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" real\n);\n\nQuestion: With a works number of 40864 for the builder of Baldwin Locomotive Works, the number listed is?" }, { "role": "assistant", "content": "SELECT \"number\" FROM \"locomotives\" WHERE \"builder\"='baldwin locomotive works' AND \"works_number\"=40864;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" real\n);\n\nQuestion: Builder H. K. Porter, inc who had a type of 0-4-4 Forney locomotive, has what works number?" }, { "role": "assistant", "content": "SELECT \"works_number\" FROM \"locomotives\" WHERE \"type\"='0-4-4 forney locomotive' AND \"builder\"='h. k. porter, inc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" real\n);\n\nQuestion: Baldwin Locomotive Works, also with works number 40864, is listed as what number?" }, { "role": "assistant", "content": "SELECT \"number\" FROM \"locomotives\" WHERE \"builder\"='baldwin locomotive works' AND \"works_number\"=40864;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" text,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" real\n);\n\nQuestion: Hinkley Locomotive Works is listed as what number as it has a works number smaller than 1563?" }, { "role": "assistant", "content": "SELECT \"number\" FROM \"locomotives\" WHERE \"works_number\"<1563 AND \"builder\"='hinkley locomotive works';" } ]