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 \"fm\" (\n \"station\" text,\n \"frequency\" real,\n \"network_affiliation\" text,\n \"format\" text,\n \"city_of_license\" text,\n \"status\" text\n);\n\nQuestion: Which city station is owned by Coyote Communications?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"fm\" WHERE \"status\"='owned by coyote communications';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What year were the Olympic Games?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"achievements\" WHERE \"competition\"='olympic games';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What's the year in 5th position that happened in Osaka, Japan?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"position\"='5th' AND \"venue\"='osaka, japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What year was the venue in Barcelona, Spain?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"achievements\" WHERE \"venue\"='barcelona, spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"whakatane_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: For a school with authority of state and a roll of 798, what is the decile?" }, { "role": "assistant", "content": "SELECT \"decile\" FROM \"whakatane_district\" WHERE \"authority\"='state' AND \"roll\"=798;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"whakatane_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: Murupara has a roll greater than 296 for what years?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"whakatane_district\" WHERE \"roll\">296 AND \"area\"='murupara';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"whakatane_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: When a school has authority of state and a decile greater than 1, what is the roll number?" }, { "role": "assistant", "content": "SELECT \"roll\" FROM \"whakatane_district\" WHERE \"authority\"='state' AND \"decile\">1;" } ]
[ { "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: Who did the Jays play on August 30?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='august 30';" } ]
[ { "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\" text\n);\n\nQuestion: Which opponent has a record of 5-0-1?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='5-0-1';" } ]
[ { "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\" text\n);\n\nQuestion: What method does the opponent of Dan New use?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='dan new';" } ]
[ { "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\" text\n);\n\nQuestion: Which method has a record of 3-0?" }, { "role": "assistant", "content": "SELECT \"method\" FROM \"mixed_martial_arts_record\" WHERE \"record\"='3-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text\n);\n\nQuestion: Which event is a win by an opponent of Nicolas Smith, with the round marked n/a?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"res\"='win' AND \"round\"='n/a' AND \"opponent\"='nicolas smith';" } ]
[ { "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\" text\n);\n\nQuestion: Which event lasted 1 round and included an opponent of Dan Spychalski?" }, { "role": "assistant", "content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"round\"='1' AND \"opponent\"='dan spychalski';" } ]
[ { "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\" text\n);\n\nQuestion: What is Jimmy Smith's opponent's record?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"mixed_martial_arts_record\" WHERE \"opponent\"='jimmy smith';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fm_radio\" (\n \"frequency\" real,\n \"callsign\" text,\n \"brand\" text,\n \"format\" text,\n \"city_of_license\" text,\n \"website\" text,\n \"webcast\" text\n);\n\nQuestion: Name the sum of frequecy with brand of exa fm" }, { "role": "assistant", "content": "SELECT SUM(\"frequency\") FROM \"fm_radio\" WHERE \"brand\"='exa fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fm_radio\" (\n \"frequency\" real,\n \"callsign\" text,\n \"brand\" text,\n \"format\" text,\n \"city_of_license\" text,\n \"website\" text,\n \"webcast\" text\n);\n\nQuestion: Name the webcast for website of \u2022 and frequency of 103.3" }, { "role": "assistant", "content": "SELECT \"webcast\" FROM \"fm_radio\" WHERE \"website\"='\u2022' AND \"frequency\"=103.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fm_radio\" (\n \"frequency\" real,\n \"callsign\" text,\n \"brand\" text,\n \"format\" text,\n \"city_of_license\" text,\n \"website\" text,\n \"webcast\" text\n);\n\nQuestion: Name the lowest frequency for brand of radio manantial" }, { "role": "assistant", "content": "SELECT MIN(\"frequency\") FROM \"fm_radio\" WHERE \"brand\"='radio manantial';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Score of new york yankees \u2013 2, brooklyn dodgers \u2013 3 involves how many number of games?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"summary\" WHERE \"score\"='new york yankees \u2013 2, brooklyn dodgers \u2013 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: Date of october 5 had what score?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"summary\" WHERE \"date\"='october 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"game\" real,\n \"date\" text,\n \"score\" text,\n \"location\" text,\n \"time\" text,\n \"attendance\" real\n);\n\nQuestion: brooklyn dodgers \u2013 3, new york yankees \u2013 5, and a Game larger than 1 had what attendance figure?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"summary\" WHERE \"score\"='brooklyn dodgers \u2013 3, new york yankees \u2013 5' AND \"game\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"21st_century\" (\n \"season\" real,\n \"men_s_singles\" text,\n \"women_s_singles\" text,\n \"men_s_doubles\" text,\n \"women_s_doubles\" text,\n \"mixed_doubles\" text\n);\n\nQuestion: Who won mixed doubles in the 2002 season?" }, { "role": "assistant", "content": "SELECT \"mixed_doubles\" FROM \"21st_century\" WHERE \"season\"=2002;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"container_terminals\" (\n \"terminal\" text,\n \"operator\" text,\n \"depth_m\" text,\n \"berths\" real,\n \"quay_cranes\" real\n);\n\nQuestion: Name the lowest Quay cranes for Berths of 1 and operator of mtl with terminal of terminal 5 (ct5)" }, { "role": "assistant", "content": "SELECT MIN(\"quay_cranes\") FROM \"container_terminals\" WHERE \"berths\"=1 AND \"operator\"='mtl' AND \"terminal\"='terminal 5 (ct5)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"container_terminals\" (\n \"terminal\" text,\n \"operator\" text,\n \"depth_m\" text,\n \"berths\" real,\n \"quay_cranes\" real\n);\n\nQuestion: Name the operator with berths more than 1 and depth of 12.5-15.5" }, { "role": "assistant", "content": "SELECT \"operator\" FROM \"container_terminals\" WHERE \"berths\">1 AND \"depth_m\"='12.5-15.5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the average points that Centro Asegurador earned with the McLaren M23 chassis?" }, { "role": "assistant", "content": "SELECT AVG(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='mclaren m23' AND \"entrant\"='centro asegurador';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was the chassis of Emilio de Villota in 1981?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"year\">1981;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"film\" text,\n \"director_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: What directors won an award on 14/6/6?" }, { "role": "assistant", "content": "SELECT \"director_s\" FROM \"2006\" WHERE \"date\"='14/6/6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"film\" text,\n \"director_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: What date did Passion Pictures receive an award?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"2006\" WHERE \"recipient\"='passion pictures';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"film\" text,\n \"director_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: What award did Charlie Productions Ltd receive?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"2006\" WHERE \"recipient\"='charlie productions ltd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"film\" text,\n \"director_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: What film had Bub Ltd as the recipient?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"2006\" WHERE \"recipient\"='bub ltd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006\" (\n \"film\" text,\n \"director_s\" text,\n \"recipient\" text,\n \"date\" text,\n \"award\" text\n);\n\nQuestion: What film was awarded on 22/3/06?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"2006\" WHERE \"date\"='22/3/06';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"finals_6_3_titles_3_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What score resulted in a winner after 2008?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"finals_6_3_titles_3_runners_up\" WHERE \"outcome\"='winner' AND \"year\">2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"finals_6_3_titles_3_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What score has an opponent gan teik chai lin woon fui?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"finals_6_3_titles_3_runners_up\" WHERE \"opponent\"='gan teik chai lin woon fui';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"finals_6_3_titles_3_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What tournament has an opponent gan teik chai lin woon fui?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"finals_6_3_titles_3_runners_up\" WHERE \"opponent\"='gan teik chai lin woon fui';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"finals_6_3_titles_3_runners_up\" (\n \"outcome\" text,\n \"year\" real,\n \"tournament\" text,\n \"partner\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What tournament has an opponent jung jae-sung lee yong-dae?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"finals_6_3_titles_3_runners_up\" WHERE \"opponent\"='jung jae-sung lee yong-dae';" } ]
[ { "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 is the record of the team that lost to Alexander (5-2)?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='alexander (5-2)';" } ]
[ { "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: Which opponent has a record of 17-11?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='17-11';" } ]
[ { "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 is the score of the game that resulted in a 15-9 record?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='15-9';" } ]
[ { "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 on May 26?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"date\"='may 26';" } ]
[ { "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 is the score of the game that was a loss to Dotson (2-3)?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"loss\"='dotson (2-3)';" } ]
[ { "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: On what date was the record 19-11?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='19-11';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What were the highest points before the year 1974?" }, { "role": "assistant", "content": "SELECT MAX(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\"<1974;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was the chassis when the entrant was Lavazza March, and the points were 0.5?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='lavazza march' AND \"points\"=0.5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was the chassis when the entrant was Lavazza March, and the year was 1975?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='lavazza march' AND \"year\"=1975;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was the chassis when the points were greater than 0 and the entrant was March Engineering?" }, { "role": "assistant", "content": "SELECT \"chassis\" FROM \"complete_formula_one_world_championship_\" WHERE \"points\">0 AND \"entrant\"='march engineering';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: Who had a time of 56.07?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"semifinal_1\" WHERE \"time\"=56.07;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"year\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: What is the original title of Madame Rosa?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"1970s\" WHERE \"english_title\"='madame rosa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"year\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: What is the original title where Paul Verhoeven is the director?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"1970s\" WHERE \"director\"='paul verhoeven';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"year\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: What original title has a year of 1978?" }, { "role": "assistant", "content": "SELECT \"original_title\" FROM \"1970s\" WHERE \"year\"='1978';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"year\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: Who is the director of the best foreign film?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"1970s\" WHERE \"original_title\"='best foreign film';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1970s\" (\n \"year\" text,\n \"english_title\" text,\n \"original_title\" text,\n \"country\" text,\n \"director\" text\n);\n\nQuestion: What is the English title for Ansikte Mot Ansikte?" }, { "role": "assistant", "content": "SELECT \"english_title\" FROM \"1970s\" WHERE \"original_title\"='ansikte mot ansikte';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: What happened on 2009-09-05?" }, { "role": "assistant", "content": "SELECT \"circumstances\" FROM \"2009\" WHERE \"date\"='2009-09-05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: Where was the combat of 2009-09-16?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"2009\" WHERE \"circumstances\"='combat' AND \"date\"='2009-09-16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: What happened on 2009-03-14?" }, { "role": "assistant", "content": "SELECT \"circumstances\" FROM \"2009\" WHERE \"date\"='2009-03-14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: How many casualties from the combat in the Fayzabad area?" }, { "role": "assistant", "content": "SELECT \"casualties\" FROM \"2009\" WHERE \"circumstances\"='combat' AND \"location\"='fayzabad area';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2009\" (\n \"date\" text,\n \"location\" text,\n \"nature_of_incident\" text,\n \"circumstances\" text,\n \"casualties\" text\n);\n\nQuestion: Where was the incident of 2009-09-05?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"2009\" WHERE \"date\"='2009-09-05';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the home team of the game on January 22?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"regular_season\" WHERE \"date\"='january 22';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game on February 26 with the Chicago black hawks as the home team and the New York Rangers as the visitor team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"regular_season\" WHERE \"home\"='chicago black hawks' AND \"visitor\"='new york rangers' AND \"date\"='february 26';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What is the home team of the game on February 4?" }, { "role": "assistant", "content": "SELECT \"home\" FROM \"regular_season\" WHERE \"date\"='february 4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"formula_one_results\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What Team had less than 1 point with a Zakspeed 871 chassis?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"formula_one_results\" WHERE \"points\"<1 AND \"chassis\"='zakspeed 871';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"formula_one_results\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the lowest amount of points for a Ford Cosworth DFR (Mader) 3.5 V8 engine?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"formula_one_results\" WHERE \"engine\"='ford cosworth dfr (mader) 3.5 v8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"formula_one_results\" (\n \"year\" real,\n \"team\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What year was a Rial Arc2 chassis used?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"formula_one_results\" WHERE \"chassis\"='rial arc2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the bronze when silver is 1" }, { "role": "assistant", "content": "SELECT \"bronze\" FROM \"medal_table\" WHERE \"silver\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the least silver when gold is less than 0" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"gold\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Name the least silver for nation of total when bronze is more than 24" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_table\" WHERE \"nation\"='total' AND \"bronze\">24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"year\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Name the year with finish of 12th and record of 23-36" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"season_by_season\" WHERE \"finish\"='12th' AND \"record\"='23-36';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"year\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Name the record for 1997" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"season_by_season\" WHERE \"year\"='1997';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"year\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Name the year for jesus alfaro and finish of 6th" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"season_by_season\" WHERE \"manager\"='jesus alfaro' AND \"finish\"='6th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_by_season\" (\n \"year\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Name the manager for playoffs of missed for 1999" }, { "role": "assistant", "content": "SELECT \"manager\" FROM \"season_by_season\" WHERE \"playoffs\"='missed' AND \"year\"='1999';" } ]
[ { "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: What was the average attendance when the record was 17-18?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"record\"='17-18';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What was marlboro brm's lowest points by using brm p160b?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"entrant\"='marlboro brm' AND \"chassis\"='brm p160b';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the total points in 1974?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"year\"=1974;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: Who has 0 points in 1974?" }, { "role": "assistant", "content": "SELECT \"entrant\" FROM \"complete_formula_one_world_championship_\" WHERE \"points\"=0 AND \"year\"=1974;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"complete_formula_one_world_championship_\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What is the lowest points of using mclaren m14a as chassis?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"complete_formula_one_world_championship_\" WHERE \"chassis\"='mclaren m14a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006_season_junior_career\" (\n \"year\" real,\n \"competition\" text,\n \"location\" text,\n \"event\" text,\n \"final_rank\" real,\n \"final_score\" real\n);\n\nQuestion: Location of saint paul, and a Final-Score larger than 14.35, and a Event of all around is what sum of year?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"2006_season_junior_career\" WHERE \"location\"='saint paul' AND \"final_score\">14.35 AND \"event\"='all around';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2006_season_junior_career\" (\n \"year\" real,\n \"competition\" text,\n \"location\" text,\n \"event\" text,\n \"final_rank\" real,\n \"final_score\" real\n);\n\nQuestion: Competition of u.s championships, and a Event of all around has what average year?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"2006_season_junior_career\" WHERE \"competition\"='u.s championships' AND \"event\"='all around';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominated\" (\n \"year\" real,\n \"song\" text,\n \"film\" text,\n \"music_director_s\" text,\n \"lyricist\" text\n);\n\nQuestion: What film was in 1970?" }, { "role": "assistant", "content": "SELECT \"film\" FROM \"nominated\" WHERE \"year\"=1970;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominated\" (\n \"year\" real,\n \"song\" text,\n \"film\" text,\n \"music_director_s\" text,\n \"lyricist\" text\n);\n\nQuestion: Who wrote the lyrics for Mukti?" }, { "role": "assistant", "content": "SELECT \"lyricist\" FROM \"nominated\" WHERE \"film\"='mukti';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominated\" (\n \"year\" real,\n \"song\" text,\n \"film\" text,\n \"music_director_s\" text,\n \"lyricist\" text\n);\n\nQuestion: What song was directed by Shankar Jaikishan?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"nominated\" WHERE \"music_director_s\"='shankar jaikishan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nominated\" (\n \"year\" real,\n \"song\" text,\n \"film\" text,\n \"music_director_s\" text,\n \"lyricist\" text\n);\n\nQuestion: What song was written after 1976 and directed by Rahul Dev Burman?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"nominated\" WHERE \"year\">1976 AND \"music_director_s\"='rahul dev burman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"settlements_with_population_between_100_\" (\n \"rank\" real,\n \"population\" real,\n \"name\" text,\n \"former_name\" text,\n \"municipality\" text\n);\n\nQuestion: What is the population for the place with a Former Name of bluie west-1?" }, { "role": "assistant", "content": "SELECT MIN(\"population\") FROM \"settlements_with_population_between_100_\" WHERE \"former_name\"='bluie west-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"part_time_teams\" (\n \"team\" text,\n \"car_s\" text,\n \"driver_s\" text,\n \"primary_sponsor_s\" text,\n \"owner_s\" text,\n \"crew_chief\" text,\n \"rounds\" real\n);\n\nQuestion: What car does Scott Deware own that has rounds under 12?" }, { "role": "assistant", "content": "SELECT \"car_s\" FROM \"part_time_teams\" WHERE \"rounds\"<12 AND \"owner_s\"='scott deware';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"city_or_town\" text,\n \"position_in_2012_13_season\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"top_division_titles\" text,\n \"last_top_division_title\" text\n);\n\nQuestion: Which City or town has a Top division titles of 17" }, { "role": "assistant", "content": "SELECT \"city_or_town\" FROM \"clubs\" WHERE \"top_division_titles\"='17';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"clubs\" (\n \"club\" text,\n \"city_or_town\" text,\n \"position_in_2012_13_season\" text,\n \"first_season_in_top_division\" text,\n \"number_of_seasons_in_top_division\" real,\n \"first_season_of_current_spell_in_top_division\" text,\n \"top_division_titles\" text,\n \"last_top_division_title\" text\n);\n\nQuestion: Which City or town has top division smaller than 40 and Gaziantepspor Club ?" }, { "role": "assistant", "content": "SELECT \"city_or_town\" FROM \"clubs\" WHERE \"number_of_seasons_in_top_division\"<40 AND \"club\"='gaziantepspor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"2003\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2003 value with 2r in 2008 and 1r in 2011?" }, { "role": "assistant", "content": "SELECT \"2003\" FROM \"doubles\" WHERE \"2008\"='2r' AND \"2011\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"2003\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2007 value with 2r in 2011 and 2r in 2008?" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"doubles\" WHERE \"2011\"='2r' AND \"2008\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"2003\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2007 value with 1r in 2009 and 2r in 2011 at the Tournament of Wimbledon?" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"doubles\" WHERE \"2009\"='1r' AND \"2011\"='2r' AND \"tournament\"='wimbledon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"2003\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2011\" text\n);\n\nQuestion: What is the 2003 value with 1r in 2009 at the Australian Open?" }, { "role": "assistant", "content": "SELECT \"2003\" FROM \"doubles\" WHERE \"2009\"='1r' AND \"tournament\"='australian open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"home_grounds\" (\n \"stadium\" text,\n \"years\" text,\n \"played\" real,\n \"wins\" real,\n \"losses\" real,\n \"draw\" text,\n \"win_percentage\" text\n);\n\nQuestion: How many wins did they have at Richmond Cricket Ground Stadium?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"home_grounds\" WHERE \"stadium\"='richmond cricket ground';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"home_grounds\" (\n \"stadium\" text,\n \"years\" text,\n \"played\" real,\n \"wins\" real,\n \"losses\" real,\n \"draw\" text,\n \"win_percentage\" text\n);\n\nQuestion: How many games did they play in 1905?" }, { "role": "assistant", "content": "SELECT AVG(\"played\") FROM \"home_grounds\" WHERE \"years\"='1905';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: Which term in office has a qld state, a Party of labor, and an Electorate of fisher?" }, { "role": "assistant", "content": "SELECT \"term_in_office\" FROM \"see_also\" WHERE \"state\"='qld' AND \"party\"='labor' AND \"electorate\"='fisher';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: Which member has an Electorate of kennedy?" }, { "role": "assistant", "content": "SELECT \"member\" FROM \"see_also\" WHERE \"electorate\"='kennedy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: Which Party has a Member of david jull?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"see_also\" WHERE \"member\"='david jull';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: Which term in office has an Electorate of hinkler?" }, { "role": "assistant", "content": "SELECT \"term_in_office\" FROM \"see_also\" WHERE \"electorate\"='hinkler';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: Which Electorate has a State of qld, a Party of national, and a Member of hon evan adermann?" }, { "role": "assistant", "content": "SELECT \"electorate\" FROM \"see_also\" WHERE \"state\"='qld' AND \"party\"='national' AND \"member\"='hon evan adermann';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"member\" text,\n \"party\" text,\n \"electorate\" text,\n \"state\" text,\n \"term_in_office\" text\n);\n\nQuestion: Which state has a Term in office of 1984\u20131996, a Party of labor, and a Member of robert tickner?" }, { "role": "assistant", "content": "SELECT \"state\" FROM \"see_also\" WHERE \"term_in_office\"='1984\u20131996' AND \"party\"='labor' AND \"member\"='robert tickner';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"waipa_district\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the total amount of decile with the authority of state around the Pokuru School and a roll smaller than 109?" }, { "role": "assistant", "content": "SELECT SUM(\"decile\") FROM \"waipa_district\" WHERE \"authority\"='state' AND \"name\"='pokuru school' AND \"roll\"<109;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Name the most laps for corvette racing in 2004" }, { "role": "assistant", "content": "SELECT MAX(\"laps\") FROM \"24_hours_of_le_mans_results\" WHERE \"team\"='corvette racing' AND \"year\"=2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Name the class for 4th position with year before 2006" }, { "role": "assistant", "content": "SELECT \"class\" FROM \"24_hours_of_le_mans_results\" WHERE \"pos\"='4th' AND \"year\"<2006;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Name the total number of laps for 23rd position" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"24_hours_of_le_mans_results\" WHERE \"pos\"='23rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"24_hours_of_le_mans_results\" (\n \"year\" real,\n \"team\" text,\n \"co_drivers\" text,\n \"class\" text,\n \"laps\" real,\n \"pos\" text,\n \"class_pos\" text\n);\n\nQuestion: Name the team with laps less than 315 and co-drivers of david brabham franck lagorce?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"24_hours_of_le_mans_results\" WHERE \"laps\"<315 AND \"co_drivers\"='david brabham franck lagorce';" } ]