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 \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record for November 26, with the decision made by Prusek?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"november\" WHERE \"decision\"='prusek' AND \"date\"='november 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record for game where Columbus is visitor, Phoenix is home, and decision is made by Denis?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"november\" WHERE \"visitor\"='columbus' AND \"decision\"='denis' AND \"home\"='phoenix';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"november\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record for November 4, with a decision made by Denis?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"november\" WHERE \"decision\"='denis' AND \"date\"='november 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: What is the Intergiro classification of Nicolaj bo Larsen, who has a Fabrizio guidi point classification?" }, { "role": "assistant", "content": "SELECT \"intergiro_classification\" FROM \"classification_leadership_by_stage\" WHERE \"points_classification\"='fabrizio guidi' AND \"winner\"='nicolaj bo larsen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: What is the mountain classification of Mario Cipollini, who has a general classification of Pavel tonkov?" }, { "role": "assistant", "content": "SELECT \"mountains_classification\" FROM \"classification_leadership_by_stage\" WHERE \"winner\"='mario cipollini' AND \"general_classification\"='pavel tonkov';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: What is the stage of Fabiano Fontanelli, who had a Trofeo Fast Team of Gewiss Playbus and a point classification of Fabrizio Guidi?" }, { "role": "assistant", "content": "SELECT \"stage\" FROM \"classification_leadership_by_stage\" WHERE \"trofeo_fast_team\"='gewiss playbus' AND \"points_classification\"='fabrizio guidi' AND \"winner\"='fabiano fontanelli';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: What is the stage with a point classification of Silvio Martinello and Davide Rebellin as the general classification?" }, { "role": "assistant", "content": "SELECT \"stage\" FROM \"classification_leadership_by_stage\" WHERE \"points_classification\"='silvio martinello' AND \"general_classification\"='davide rebellin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"classification_leadership_by_stage\" (\n \"stage\" text,\n \"winner\" text,\n \"general_classification\" text,\n \"points_classification\" text,\n \"mountains_classification\" text,\n \"intergiro_classification\" text,\n \"trofeo_fast_team\" text\n);\n\nQuestion: What is the Trofeo Fast Team with a point classification of Silvio Martinello and stage 6?" }, { "role": "assistant", "content": "SELECT \"trofeo_fast_team\" FROM \"classification_leadership_by_stage\" WHERE \"points_classification\"='silvio martinello' AND \"stage\"='6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: How many points did the Castres have?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"table\" WHERE \"club\"='castres';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: Who is the club that had 617 points and a draw of 0?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"table\" WHERE \"drawn\"='0' AND \"points_for\"='617';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"bonus_points\" text,\n \"points\" text\n);\n\nQuestion: What number of bonus points did Stade Fran\u00e7ais?" }, { "role": "assistant", "content": "SELECT \"bonus_points\" FROM \"table\" WHERE \"club\"='stade fran\u00e7ais';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game when the record was 15\u201315?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='15\u201315';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game attended by 23,203?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"attendance\"='23,203';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the loss of the game when the record was 16\u201315?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='16\u201315';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the attendance at the game that had a score of 16\u20137?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"score\"='16\u20137';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game attended by 25,022?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"attendance\"='25,022';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Which record has an attendance larger than 28,459?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\">'28,459';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: When the record was 32-37 what was the score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='32-37';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: On the date of june 7 what was the score?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='june 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game when the record was 68-39?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='68-39';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the game of the game against the White Sox with a record of 81-48?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='white sox' AND \"record\"='81-48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game when the record was 66-38?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='66-38';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"original_broadway_production\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"category\" text,\n \"nominee\" text,\n \"result\" text\n);\n\nQuestion: What category was Brian D'arcy James nominated for?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"original_broadway_production\" WHERE \"nominee\"='brian d''arcy james' AND \"result\"='nominated';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the item \"Moving to\", when the Transfer fee is \u00a3300,000?" }, { "role": "assistant", "content": "SELECT \"moving_to\" FROM \"out\" WHERE \"transfer_fee\"='\u00a3300,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the Country, when the Transfer fee is \"loan\", and when the Name is Lynch?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"out\" WHERE \"transfer_fee\"='loan' AND \"name\"='lynch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the Transfer window, when the Transfer fee is \"free\", and when the Name is Dugdale?" }, { "role": "assistant", "content": "SELECT \"transfer_window\" FROM \"out\" WHERE \"transfer_fee\"='free' AND \"name\"='dugdale';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the Name, when the Transfer fee is \"loan\"?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"out\" WHERE \"transfer_fee\"='loan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the Transfer window, when the Transfer fee is \"free\", and when the item \"Moving to\" is Norwich City?" }, { "role": "assistant", "content": "SELECT \"transfer_window\" FROM \"out\" WHERE \"transfer_fee\"='free' AND \"moving_to\"='norwich city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"out\" (\n \"name\" text,\n \"country\" text,\n \"status\" text,\n \"moving_to\" text,\n \"transfer_window\" text,\n \"transfer_fee\" text\n);\n\nQuestion: What is the Transfer fee, when the Transfer window is \"winter\", and when the item \"Moving to\" is Northwich Victoria?" }, { "role": "assistant", "content": "SELECT \"transfer_fee\" FROM \"out\" WHERE \"transfer_window\"='winter' AND \"moving_to\"='northwich victoria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What companyw as the constructor when the Time/Retired was collision, and a Grid of 11?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"time_retired\"='collision' AND \"grid\"='11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What shows as the Time/Retired for Grid 8?" }, { "role": "assistant", "content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What is the number of laps for Grid 3?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"race\" WHERE \"grid\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What company was the constructor when Nick Heidfeld was the driver/" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"driver\"='nick heidfeld';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What shows for laps when the Time/Retired was +1:08.577?" }, { "role": "assistant", "content": "SELECT \"laps\" FROM \"race\" WHERE \"time_retired\"='+1:08.577';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: What is the name of the constructor for Grid 1?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"grid\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"player\" text,\n \"test_career\" text,\n \"tests\" real,\n \"catches\" real,\n \"stumpings\" real,\n \"total_dismissals\" real\n);\n\nQuestion: When was Mushfiqur Rahim's test career?" }, { "role": "assistant", "content": "SELECT \"test_career\" FROM \"see_also\" WHERE \"player\"='mushfiqur rahim';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indycar_career_results\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: Name the sum of points for 1984" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"indycar_career_results\" WHERE \"year\"<1984;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indycar_career_results\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: Name the points for Engine of chevrolet 265c" }, { "role": "assistant", "content": "SELECT \"points\" FROM \"indycar_career_results\" WHERE \"engine\"='chevrolet 265c';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indycar_career_results\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"rank\" text,\n \"points\" real\n);\n\nQuestion: Name the chassis of 147 points and engine of ford cosworth dfx" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"indycar_career_results\" WHERE \"points\"=147 AND \"engine\"='ford cosworth dfx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"state_house\" (\n \"name\" text,\n \"party\" text,\n \"hometown\" text,\n \"district\" text,\n \"term\" text,\n \"legislatures\" text\n);\n\nQuestion: Which term had a Democratic representative from district 7?" }, { "role": "assistant", "content": "SELECT \"term\" FROM \"state_house\" WHERE \"district\"='7' AND \"party\"='democratic';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"state_house\" (\n \"name\" text,\n \"party\" text,\n \"hometown\" text,\n \"district\" text,\n \"term\" text,\n \"legislatures\" text\n);\n\nQuestion: What was the term of Bruce Biers Kendall whose hometown is Anchorage?" }, { "role": "assistant", "content": "SELECT \"term\" FROM \"state_house\" WHERE \"hometown\"='anchorage' AND \"name\"='bruce biers kendall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"state_house\" (\n \"name\" text,\n \"party\" text,\n \"hometown\" text,\n \"district\" text,\n \"term\" text,\n \"legislatures\" text\n);\n\nQuestion: What is the hometown of the representative that served the twenty-sixth legislature?" }, { "role": "assistant", "content": "SELECT \"hometown\" FROM \"state_house\" WHERE \"legislatures\"='twenty-sixth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What is the qual with a 19 rank?" }, { "role": "assistant", "content": "SELECT \"qual\" FROM \"indy_500_results\" WHERE \"rank\"='19';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What rank has a 25 finish?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"finish\"='25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What finish has a 143.056 qual?" }, { "role": "assistant", "content": "SELECT \"finish\" FROM \"indy_500_results\" WHERE \"qual\"='143.056';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indy_500_results\" (\n \"year\" text,\n \"start\" text,\n \"qual\" text,\n \"rank\" text,\n \"finish\" text,\n \"laps\" real\n);\n\nQuestion: What rank had more than 165 laps and a finish of 5?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"indy_500_results\" WHERE \"laps\">165 AND \"finish\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What was the record at the game against the Blue Jays with a loss of Batista (0\u20133)?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"opponent\"='blue jays' AND \"loss\"='batista (0\u20133)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What was the loss of the game when the record was 14\u20138?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='14\u20138';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game when the record was 28\u201319?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='28\u201319';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What was the record at the game held on May 1st with a loss of Speier (1\u20133)?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='may 1' AND \"loss\"='speier (1\u20133)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ppl_2005_final_standings\" (\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How many goes played fot hteam that lost less than 12 games, drew 5, and had over 37 points?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"ppl_2005_final_standings\" WHERE \"lost\"<12 AND \"points\">37 AND \"drawn\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ppl_2005_final_standings\" (\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How many games lost for the team that drew 5 times and had over 41 points?" }, { "role": "assistant", "content": "SELECT AVG(\"lost\") FROM \"ppl_2005_final_standings\" WHERE \"drawn\"=5 AND \"points\">41;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ppl_2005_final_standings\" (\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How many games played for the army team with over 51 points and under 5 games drawn?" }, { "role": "assistant", "content": "SELECT COUNT(\"played\") FROM \"ppl_2005_final_standings\" WHERE \"drawn\"<5 AND \"team\"='army' AND \"points\">51;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ppl_2005_final_standings\" (\n \"team\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points\" real\n);\n\nQuestion: How many points for the navy team that lost over 11?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"ppl_2005_final_standings\" WHERE \"team\"='navy' AND \"lost\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_winners\" (\n \"year\" text,\n \"driver_s\" text,\n \"class\" text,\n \"vehicle\" text,\n \"race_title\" text\n);\n\nQuestion: What class of car had the XI Coppa Acerbo title?" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"race_winners\" WHERE \"race_title\"='xi coppa acerbo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_winners\" (\n \"year\" text,\n \"driver_s\" text,\n \"class\" text,\n \"vehicle\" text,\n \"race_title\" text\n);\n\nQuestion: Who won the III Coppa Acerbo title?" }, { "role": "assistant", "content": "SELECT \"driver_s\" FROM \"race_winners\" WHERE \"race_title\"='iii coppa acerbo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_winners\" (\n \"year\" text,\n \"driver_s\" text,\n \"class\" text,\n \"vehicle\" text,\n \"race_title\" text\n);\n\nQuestion: What's the name of the title for the Maserati A6GCS?" }, { "role": "assistant", "content": "SELECT \"race_title\" FROM \"race_winners\" WHERE \"vehicle\"='maserati a6gcs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_winners\" (\n \"year\" text,\n \"driver_s\" text,\n \"class\" text,\n \"vehicle\" text,\n \"race_title\" text\n);\n\nQuestion: Who won the XXIV Gran Premio di Pescara in the sports car class?" }, { "role": "assistant", "content": "SELECT \"driver_s\" FROM \"race_winners\" WHERE \"class\"='sports car' AND \"race_title\"='xxiv gran premio di pescara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What surface was the citt\u00e0 di caltanissetta played on?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles\" WHERE \"tournament\"='citt\u00e0 di caltanissetta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"outcome\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the score in Volkswagen Challenger tournament?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"doubles\" WHERE \"tournament\"='volkswagen challenger';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_grape_producing_countries_by_years_i\" (\n \"rank\" text,\n \"country\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: what is the production in 2010 with 2011 production of 2,240,000?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"top_grape_producing_countries_by_years_i\" WHERE \"2011\"='2,240,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_grape_producing_countries_by_years_i\" (\n \"rank\" text,\n \"country\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: what is the ranking for 2010 production of 2,903,000?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"top_grape_producing_countries_by_years_i\" WHERE \"2010\"='2,903,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_grape_producing_countries_by_years_i\" (\n \"rank\" text,\n \"country\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: what is the production in 2010 with rank of 8?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"top_grape_producing_countries_by_years_i\" WHERE \"rank\"='8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"marquee_player\" (\n \"club\" text,\n \"australian_marquee\" text,\n \"international_marquee\" text,\n \"junior_marquee_player\" text,\n \"captain\" text,\n \"vice_captain\" text\n);\n\nQuestion: What club captain is John Hutchinson in?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"marquee_player\" WHERE \"captain\"='john hutchinson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"marquee_player\" (\n \"club\" text,\n \"australian_marquee\" text,\n \"international_marquee\" text,\n \"junior_marquee_player\" text,\n \"captain\" text,\n \"vice_captain\" text\n);\n\nQuestion: What team is Michael McGlinchey vice captain of?" }, { "role": "assistant", "content": "SELECT \"international_marquee\" FROM \"marquee_player\" WHERE \"vice_captain\"='michael mcglinchey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"marquee_player\" (\n \"club\" text,\n \"australian_marquee\" text,\n \"international_marquee\" text,\n \"junior_marquee_player\" text,\n \"captain\" text,\n \"vice_captain\" text\n);\n\nQuestion: What Australian Marquee team is Michael Beauchamp a captain of?" }, { "role": "assistant", "content": "SELECT \"australian_marquee\" FROM \"marquee_player\" WHERE \"captain\"='michael beauchamp';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"marquee_player\" (\n \"club\" text,\n \"australian_marquee\" text,\n \"international_marquee\" text,\n \"junior_marquee_player\" text,\n \"captain\" text,\n \"vice_captain\" text\n);\n\nQuestion: What Junior Marquee team is Harry Kewell of?" }, { "role": "assistant", "content": "SELECT \"junior_marquee_player\" FROM \"marquee_player\" WHERE \"captain\"='harry kewell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the name of call sign that uses a Frequency MHz of 91.1 fm?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"translators\" WHERE \"frequency_m_hz\"='91.1 fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: How much is the total ERP W for an 107.9 fm freqeuncy MHz?" }, { "role": "assistant", "content": "SELECT COUNT(\"erp_w\") FROM \"translators\" WHERE \"frequency_m_hz\"='107.9 fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Can you tell me what is FCC info for harmony township, new jersey?" }, { "role": "assistant", "content": "SELECT \"fcc_info\" FROM \"translators\" WHERE \"city_of_license\"='harmony township, new jersey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" text,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the smallest ERP for allentown, pennsylvania?" }, { "role": "assistant", "content": "SELECT MIN(\"erp_w\") FROM \"translators\" WHERE \"city_of_license\"='allentown, pennsylvania';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which grid has a time/retired of +3.9 secs in less than 96 laps?" }, { "role": "assistant", "content": "SELECT AVG(\"grid\") FROM \"race\" WHERE \"time_retired\"='+3.9 secs' AND \"laps\"<96;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: Which driver has 7 points for team Australia?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"race\" WHERE \"points\"=7 AND \"team\"='team australia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What is the fewest number of laps for a Dale Coyne Racing team with a mechanical time/retired and fewer than 5 points?" }, { "role": "assistant", "content": "SELECT MIN(\"laps\") FROM \"race\" WHERE \"team\"='dale coyne racing' AND \"time_retired\"='mechanical' AND \"points\"<5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What is the highest points total scored by Dan Clarke in a grid higher than 10?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"race\" WHERE \"driver\"='dan clarke' AND \"grid\">10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_6\" (\n \"ep_num\" real,\n \"total\" real,\n \"title\" text,\n \"location\" text,\n \"party_theme\" text,\n \"airdate\" text\n);\n\nQuestion: What is the earliest episode of the series that is set in Boston, Massachusetts?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"season_6\" WHERE \"location\"='boston, massachusetts';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"general_election\" (\n \"poll_source\" text,\n \"date_s_administered\" text,\n \"sample_size\" text,\n \"margin_of_error\" text,\n \"jerry_brown_d\" text,\n \"meg_whitman_r\" text\n);\n\nQuestion: How many people were surveyed in the poll from June 30, 2010?" }, { "role": "assistant", "content": "SELECT \"sample_size\" FROM \"general_election\" WHERE \"date_s_administered\"='june 30, 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"general_election\" (\n \"poll_source\" text,\n \"date_s_administered\" text,\n \"sample_size\" text,\n \"margin_of_error\" text,\n \"jerry_brown_d\" text,\n \"meg_whitman_r\" text\n);\n\nQuestion: What percentage of the vote with a margin of error of \u00b1 3.3% did Meg Whitman (R) get?" }, { "role": "assistant", "content": "SELECT \"meg_whitman_r\" FROM \"general_election\" WHERE \"margin_of_error\"='\u00b1 3.3%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"general_election\" (\n \"poll_source\" text,\n \"date_s_administered\" text,\n \"sample_size\" text,\n \"margin_of_error\" text,\n \"jerry_brown_d\" text,\n \"meg_whitman_r\" text\n);\n\nQuestion: How many people participated in the Rasmussen Reports poll on October 13, 2010?" }, { "role": "assistant", "content": "SELECT \"sample_size\" FROM \"general_election\" WHERE \"poll_source\"='rasmussen reports' AND \"date_s_administered\"='october 13, 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"general_election\" (\n \"poll_source\" text,\n \"date_s_administered\" text,\n \"sample_size\" text,\n \"margin_of_error\" text,\n \"jerry_brown_d\" text,\n \"meg_whitman_r\" text\n);\n\nQuestion: What percent of the vote went to Meg Whitman in the poll taken on October 21, 2010." }, { "role": "assistant", "content": "SELECT \"meg_whitman_r\" FROM \"general_election\" WHERE \"date_s_administered\"='october 21, 2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_poker_tour\" (\n \"date\" text,\n \"city\" text,\n \"event\" text,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is the Prize, when the Event is Ept Deauville?" }, { "role": "assistant", "content": "SELECT \"prize\" FROM \"european_poker_tour\" WHERE \"event\"='ept deauville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_poker_tour\" (\n \"date\" text,\n \"city\" text,\n \"event\" text,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is the City, when the Prize is \u20ac880,000?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"european_poker_tour\" WHERE \"prize\"='\u20ac880,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_poker_tour\" (\n \"date\" text,\n \"city\" text,\n \"event\" text,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is the City, when the Winner is Ruben Visser?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"european_poker_tour\" WHERE \"winner\"='ruben visser';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_poker_tour\" (\n \"date\" text,\n \"city\" text,\n \"event\" text,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: Who is the Winner, when the Prize is \u20ac880,000?" }, { "role": "assistant", "content": "SELECT \"winner\" FROM \"european_poker_tour\" WHERE \"prize\"='\u20ac880,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_poker_tour\" (\n \"date\" text,\n \"city\" text,\n \"event\" text,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is the City, when the Prize is $1,859,000?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"european_poker_tour\" WHERE \"prize\"='$1,859,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"european_poker_tour\" (\n \"date\" text,\n \"city\" text,\n \"event\" text,\n \"winner\" text,\n \"prize\" text\n);\n\nQuestion: What is the Prize, when the Event is Ept Sanremo?" }, { "role": "assistant", "content": "SELECT \"prize\" FROM \"european_poker_tour\" WHERE \"event\"='ept sanremo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"west_indies_in_england\" (\n \"date\" text,\n \"home_captain\" text,\n \"away_captain\" text,\n \"venue\" text,\n \"result\" text\n);\n\nQuestion: On what date was the venue at Edgbaston?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"west_indies_in_england\" WHERE \"venue\"='edgbaston';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reconstruction_in_the_british_museum\" (\n \"image\" real,\n \"smith\" text,\n \"ashmolean\" real,\n \"foster\" real,\n \"hahland\" real,\n \"dinsmoor\" text,\n \"hofkes_brukker\" text,\n \"harrison\" text,\n \"cooper\" text,\n \"bm_corbett\" text\n);\n\nQuestion: What is the lowest image with a 20w Harrison, and less than 20 for Ashmolean?" }, { "role": "assistant", "content": "SELECT MIN(\"image\") FROM \"reconstruction_in_the_british_museum\" WHERE \"harrison\"='20w' AND \"ashmolean\"<20;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reconstruction_in_the_british_museum\" (\n \"image\" real,\n \"smith\" text,\n \"ashmolean\" real,\n \"foster\" real,\n \"hahland\" real,\n \"dinsmoor\" text,\n \"hofkes_brukker\" text,\n \"harrison\" text,\n \"cooper\" text,\n \"bm_corbett\" text\n);\n\nQuestion: What is the number of Ashmolean with 14s Harrison, and image less than 542?" }, { "role": "assistant", "content": "SELECT COUNT(\"ashmolean\") FROM \"reconstruction_in_the_british_museum\" WHERE \"harrison\"='14s' AND \"image\"<542;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reconstruction_in_the_british_museum\" (\n \"image\" real,\n \"smith\" text,\n \"ashmolean\" real,\n \"foster\" real,\n \"hahland\" real,\n \"dinsmoor\" text,\n \"hofkes_brukker\" text,\n \"harrison\" text,\n \"cooper\" text,\n \"bm_corbett\" text\n);\n\nQuestion: What is the cooper with an Ashmolean less than 21, and hahland smaller than 4?" }, { "role": "assistant", "content": "SELECT \"cooper\" FROM \"reconstruction_in_the_british_museum\" WHERE \"ashmolean\"<21 AND \"hahland\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"reconstruction_in_the_british_museum\" (\n \"image\" real,\n \"smith\" text,\n \"ashmolean\" real,\n \"foster\" real,\n \"hahland\" real,\n \"dinsmoor\" text,\n \"hofkes_brukker\" text,\n \"harrison\" text,\n \"cooper\" text,\n \"bm_corbett\" text\n);\n\nQuestion: What is the smith with a 16 ashmolean?" }, { "role": "assistant", "content": "SELECT \"smith\" FROM \"reconstruction_in_the_british_museum\" WHERE \"ashmolean\"=16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rodentia\" (\n \"name\" text,\n \"species_authority\" text,\n \"order\" text,\n \"family\" text,\n \"red_list\" real\n);\n\nQuestion: What order has the Species Authority of hydrochaeris hydrochaeris (linnaeus, 1766)?" }, { "role": "assistant", "content": "SELECT \"order\" FROM \"rodentia\" WHERE \"species_authority\"='hydrochaeris hydrochaeris (linnaeus, 1766)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rodentia\" (\n \"name\" text,\n \"species_authority\" text,\n \"order\" text,\n \"family\" text,\n \"red_list\" real\n);\n\nQuestion: What is the highest Red List for the muridae family and species Authority of microtus pinetorum (le conte, 1830)?" }, { "role": "assistant", "content": "SELECT MAX(\"red_list\") FROM \"rodentia\" WHERE \"family\"='muridae' AND \"species_authority\"='microtus pinetorum (le conte, 1830)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rodentia\" (\n \"name\" text,\n \"species_authority\" text,\n \"order\" text,\n \"family\" text,\n \"red_list\" real\n);\n\nQuestion: What is the name for the species Authority of sigmodon hispidus say & ord, 1825?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"rodentia\" WHERE \"species_authority\"='sigmodon hispidus say & ord, 1825';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_standings\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the largest total with a Silver of 1, and a Rank larger than 7?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"medal_standings\" WHERE \"silver\"=1 AND \"rank\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_standings\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many totals have a Bronze smaller than 3, a Nation of zimbabwe, and a Silver smaller than 6?" }, { "role": "assistant", "content": "SELECT COUNT(\"total\") FROM \"medal_standings\" WHERE \"bronze\"<3 AND \"nation\"='zimbabwe' AND \"silver\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_standings\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the smallest silver with a Bronze smaller than 6, a Total of 3, and a Rank smaller than 9?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_standings\" WHERE \"bronze\"<6 AND \"total\"=3 AND \"rank\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_standings\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many ranks have 0 golds, a Nation of namibia, and a Total smaller than 1?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"medal_standings\" WHERE \"gold\"=0 AND \"nation\"='namibia' AND \"total\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_standings\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many totals have a Bronze of 0, and a Gold smaller than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"medal_standings\" WHERE \"bronze\"=0 AND \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_standings\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the total silver with a Rank larger than 9, and a Total larger than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"silver\") FROM \"medal_standings\" WHERE \"rank\">9 AND \"total\">1;" } ]