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 \"federal_republic_of_yugoslavia\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"serbian_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: What is the Film title used in nomination of the Film with a Serbian title of \u0431\u0435\u043b\u043e \u043e\u0434\u0435\u043b\u043e?" }, { "role": "assistant", "content": "SELECT \"film_title_used_in_nomination\" FROM \"federal_republic_of_yugoslavia\" WHERE \"serbian_title\"='\u0431\u0435\u043b\u043e \u043e\u0434\u0435\u043b\u043e';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"federal_republic_of_yugoslavia\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"serbian_title\" text,\n \"director\" text,\n \"result\" text\n);\n\nQuestion: In what Year was Labyrinth nominated?" }, { "role": "assistant", "content": "SELECT \"year_ceremony\" FROM \"federal_republic_of_yugoslavia\" WHERE \"film_title_used_in_nomination\"='labyrinth';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the High assists for march 25?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"date\"='march 25';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the Score when Donyell Marshall (26) had the high points?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"high_points\"='donyell marshall (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 \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the highest Game when Morris Peterson (8) had the high assists?" }, { "role": "assistant", "content": "SELECT MAX(\"game\") FROM \"game_log\" WHERE \"high_assists\"='morris peterson (8)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the High assists when jalen rose (22) had the high points?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"high_points\"='jalen rose (22)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What is the High assists when the record was 28\u201340?" }, { "role": "assistant", "content": "SELECT \"high_assists\" FROM \"game_log\" WHERE \"record\"='28\u201340';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: Who were the Brazil scorers who scored 3-3?" }, { "role": "assistant", "content": "SELECT \"brazil_scorers\" FROM \"brazil_national_team\" WHERE \"score\"='3-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: Who is the Brazil scorer who scored 6-0?" }, { "role": "assistant", "content": "SELECT \"brazil_scorers\" FROM \"brazil_national_team\" WHERE \"score\"='6-0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"brazil_national_team\" (\n \"date\" text,\n \"result\" text,\n \"score\" text,\n \"brazil_scorers\" text,\n \"competition\" text\n);\n\nQuestion: With a score of 2-2, what was the Result?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"brazil_national_team\" WHERE \"score\"='2-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"candidates\" (\n \"background\" text,\n \"original_team\" text,\n \"hometown\" text,\n \"result\" text,\n \"raised\" text\n);\n\nQuestion: Which Original Team has a Hometown of Brooklyn, New York and a Background of Comedienne?" }, { "role": "assistant", "content": "SELECT \"original_team\" FROM \"candidates\" WHERE \"hometown\"='brooklyn, new york' AND \"background\"='comedienne';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"candidates\" (\n \"background\" text,\n \"original_team\" text,\n \"hometown\" text,\n \"result\" text,\n \"raised\" text\n);\n\nQuestion: What is the Background of the contestant with a Hometown listed as Los Angeles, California?" }, { "role": "assistant", "content": "SELECT \"background\" FROM \"candidates\" WHERE \"hometown\"='los angeles, california';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"candidates\" (\n \"background\" text,\n \"original_team\" text,\n \"hometown\" text,\n \"result\" text,\n \"raised\" text\n);\n\nQuestion: What is the Background of the contestant with a Result of 07 fired in task 6 (2009-04-05)?" }, { "role": "assistant", "content": "SELECT \"background\" FROM \"candidates\" WHERE \"result\"='07 fired in task 6 (2009-04-05)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"candidates\" (\n \"background\" text,\n \"original_team\" text,\n \"hometown\" text,\n \"result\" text,\n \"raised\" text\n);\n\nQuestion: What is the Original Team of the contestant from Wrightsville, Georgia ?" }, { "role": "assistant", "content": "SELECT \"original_team\" FROM \"candidates\" WHERE \"hometown\"='wrightsville, georgia';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which Attendance has an Opponent of carolina panthers?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponent\"='carolina panthers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Which Date has a Week smaller than 11, and a Attendance of 54,094?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"<11 AND \"attendance\"='54,094';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"uk_ratings\" (\n \"episode_number\" real,\n \"title\" text,\n \"original_airing_on_channel_4\" text,\n \"time_of_airing_on_channel_4\" text,\n \"total_viewers_and_rank_on_c4\" text,\n \"total_viewers\" text\n);\n\nQuestion: What is the number of the episode titled 'Sugar Daddy'?" }, { "role": "assistant", "content": "SELECT AVG(\"episode_number\") FROM \"uk_ratings\" WHERE \"title\"='sugar daddy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which nations have more than 1 gold medal and 4 silver medals?" }, { "role": "assistant", "content": "SELECT \"nation\" FROM \"medal_table\" WHERE \"gold\">1 AND \"silver\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: In Week 7, what is the highest attendance number?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"week\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: In Week 13, who was the opponent?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What date did Week 9 begin?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"=9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" text,\n \"award\" text,\n \"production\" text,\n \"role\" text,\n \"result\" text\n);\n\nQuestion: Which award was given in 2012?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"year\"='2012';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" text,\n \"award\" text,\n \"production\" text,\n \"role\" text,\n \"result\" text\n);\n\nQuestion: Which award was given for the role of Elphaba in 2009?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"role\"='elphaba' AND \"year\"='2009';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" text,\n \"award\" text,\n \"production\" text,\n \"role\" text,\n \"result\" text\n);\n\nQuestion: What was the result for the role of Ellie Greenwich in 2005?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"awards_and_nominations\" WHERE \"role\"='ellie greenwich' AND \"year\"='2005';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" text,\n \"award\" text,\n \"production\" text,\n \"role\" text,\n \"result\" text\n);\n\nQuestion: Which award was An Officer and a Gentleman nominated for?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards_and_nominations\" WHERE \"result\"='nominated' AND \"production\"='an officer and a gentleman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_and_nominations\" (\n \"year\" text,\n \"award\" text,\n \"production\" text,\n \"role\" text,\n \"result\" text\n);\n\nQuestion: During what year was Wicked associated with the Green Room Awards?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"awards_and_nominations\" WHERE \"production\"='wicked' AND \"award\"='green room awards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_roster\" (\n \"locomotive_number\" text,\n \"model\" text,\n \"type\" text,\n \"propulsion\" text,\n \"manufacturer\" text\n);\n\nQuestion: What manufacturer makes locomotive number CTN 46?" }, { "role": "assistant", "content": "SELECT \"manufacturer\" FROM \"engine_roster\" WHERE \"locomotive_number\"='ctn 46';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_roster\" (\n \"locomotive_number\" text,\n \"model\" text,\n \"type\" text,\n \"propulsion\" text,\n \"manufacturer\" text\n);\n\nQuestion: What type is locomotive number CTN 46?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"engine_roster\" WHERE \"locomotive_number\"='ctn 46';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"engine_roster\" (\n \"locomotive_number\" text,\n \"model\" text,\n \"type\" text,\n \"propulsion\" text,\n \"manufacturer\" text\n);\n\nQuestion: What type is locomotive CTN 1364?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"engine_roster\" WHERE \"locomotive_number\"='ctn 1364';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What cuts made has a wins less than 3 and 23 for the events?" }, { "role": "assistant", "content": "SELECT \"cuts_made\" FROM \"summary\" WHERE \"wins\"<3 AND \"events\"=23;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the lowest events that have 17 as the cuts made, with a top-25 less than 8?" }, { "role": "assistant", "content": "SELECT MIN(\"events\") FROM \"summary\" WHERE \"cuts_made\"=17 AND \"top_25\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What are the lowest cuts made that have events less than 4?" }, { "role": "assistant", "content": "SELECT MIN(\"cuts_made\") FROM \"summary\" WHERE \"events\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the highest top-10 that has a u.s. open for the tournament, and a top-25 greater than 12?" }, { "role": "assistant", "content": "SELECT MAX(\"top_10\") FROM \"summary\" WHERE \"tournament\"='u.s. open' AND \"top_25\">12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1_lyga\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: How many points are there with more losses than 16, more goals than 44, and a smaller position than 13?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"1_lyga\" WHERE \"loses\">16 AND \"goals_scored\">44 AND \"position\"<13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1_lyga\" (\n \"position\" real,\n \"club\" text,\n \"games_played\" real,\n \"wins\" real,\n \"draws\" real,\n \"loses\" real,\n \"goals_scored\" real,\n \"goals_conceded\" real,\n \"points\" real\n);\n\nQuestion: What is the sum of the points with less goals conceded than 51, larger than position 1, has a draw of 7, and more losses than 5?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"1_lyga\" WHERE \"goals_conceded\"<51 AND \"position\">1 AND \"draws\"=7 AND \"loses\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which has a Score of 6\u20131, 3\u20130 ret.?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"titles\" WHERE \"score\"='6\u20131, 3\u20130 ret.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Surface is on 23 january 2011?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"titles\" WHERE \"date\"='23 january 2011';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: When has a Surface of hard, a Tournament of wrexham , great britain?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"titles\" WHERE \"surface\"='hard' AND \"tournament\"='wrexham , great britain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has an Opponent in the final of st\u00e9phane robert?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"titles\" WHERE \"opponent_in_the_final\"='st\u00e9phane robert';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What kind of Surface has a Score of 6\u20134, 0\u20136, 6\u20132?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"titles\" WHERE \"score\"='6\u20134, 0\u20136, 6\u20132';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Which Call sign has a Branding of cbc radio one?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"radio\" WHERE \"branding\"='cbc radio one';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: WHich Frequency has a Format of country / news / sports?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"radio\" WHERE \"format\"='country / news / sports';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Which Format has a Frequency of 100.5 fm?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"radio\" WHERE \"frequency\"='100.5 fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: Which Frequency has a Branding of country 600?" }, { "role": "assistant", "content": "SELECT \"frequency\" FROM \"radio\" WHERE \"branding\"='country 600';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"radio\" (\n \"frequency\" text,\n \"call_sign\" text,\n \"branding\" text,\n \"format\" text,\n \"owner\" text\n);\n\nQuestion: WHich format has a Frequency of 99.3 fm?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"radio\" WHERE \"frequency\"='99.3 fm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What is the Class AA where Class AA is Hale Center and Class AAAAA is Del Rio?" }, { "role": "assistant", "content": "SELECT \"class_aaa\" FROM \"individual\" WHERE \"class_aa\"='hale center' AND \"class_aaaaa\"='del rio';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What School Year has a Class AAAA of Dickinson?" }, { "role": "assistant", "content": "SELECT \"school_year\" FROM \"individual\" WHERE \"class_aaaa\"='dickinson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: If the Class A is Anton and Class AAA is Burnet, what is Class AA?" }, { "role": "assistant", "content": "SELECT \"class_aa\" FROM \"individual\" WHERE \"class_a\"='anton' AND \"class_aaa\"='burnet';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: If Class AAAA is Schertz Clemens and SChool Year is 1987-88, what is Class AA?" }, { "role": "assistant", "content": "SELECT \"class_aa\" FROM \"individual\" WHERE \"class_aaaa\"='schertz clemens' AND \"school_year\"='1987-88';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Where Class AAA is Atlanta and Class AA is Weimar, what is Class AAAAA?" }, { "role": "assistant", "content": "SELECT \"class_aaaaa\" FROM \"individual\" WHERE \"class_aaa\"='atlanta' AND \"class_aa\"='weimar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result of the game on week 11?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: After week 2, how many people attended the game at Rich Stadium against the Miami Dolphins?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"schedule\" WHERE \"game_site\"='rich stadium' AND \"opponent\"='miami dolphins' AND \"week\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the attendance when the opponent is the San Francisco 49ers?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"opponent\"='san francisco 49ers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the result when the week is greater than 6 and the Buffalo Bills are the opponent?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\">6 AND \"opponent\"='buffalo bills';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the result when the attendance is 54,814?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='54,814';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the total number of weeks when the New York Jets are the opponent?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"opponent\"='new york jets';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What is the result of the game when the attendance is 56,906?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='56,906';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episode_5_23_february_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What Song has a Group Song of Ring Ring Ring and a Score of 6.0 + 6.5 + 5.0 + 6.5 = 24.0?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"episode_5_23_february_2008\" WHERE \"group_song\"='ring ring ring' AND \"score\"='6.0 + 6.5 + 5.0 + 6.5 = 24.0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episode_5_23_february_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What is Song's \u4f1a\u547c\u5438\u7684\u75db Index?" }, { "role": "assistant", "content": "SELECT \"index\" FROM \"episode_5_23_february_2008\" WHERE \"song\"='\u4f1a\u547c\u5438\u7684\u75db';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episode_5_23_february_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What Song's Index is F6?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"episode_5_23_february_2008\" WHERE \"index\"='f6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episode_5_23_february_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What Group Song of Shine \u738b\u5e78\u513f?" }, { "role": "assistant", "content": "SELECT \"group_song\" FROM \"episode_5_23_february_2008\" WHERE \"name\"='shine \u738b\u5e78\u513f';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episode_5_23_february_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What is the Score of \u6211\u7b49\u7684\u4eba\u4f1a\u662f\u8c01?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"episode_5_23_february_2008\" WHERE \"song\"='\u6211\u7b49\u7684\u4eba\u4f1a\u662f\u8c01';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episode_5_23_february_2008\" (\n \"index\" text,\n \"name\" text,\n \"song\" text,\n \"group_song\" text,\n \"score\" text\n);\n\nQuestion: What is the Name of Index F3?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"episode_5_23_february_2008\" WHERE \"index\"='f3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the record after the game on Feb 10?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"february\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the earliest day that had a game against the Boston Bruins?" }, { "role": "assistant", "content": "SELECT MIN(\"february\") FROM \"schedule_and_results\" WHERE \"opponent\"='boston bruins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_metal_alloys_mentioned_in_the_uk_mo\" (\n \"sn_sb_pct\" text,\n \"liquidat_c\" real,\n \"solidat_c\" real,\n \"hardness_brinell\" real,\n \"purpose\" text\n);\n\nQuestion: What is the sum of Solidat (c) that's purpose is display type, heavy duty jobs, and a hardness (brinell) is smaller than 33?" }, { "role": "assistant", "content": "SELECT SUM(\"solidat_c\") FROM \"type_metal_alloys_mentioned_in_the_uk_mo\" WHERE \"purpose\"='display type, heavy duty jobs' AND \"hardness_brinell\"<33;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_metal_alloys_mentioned_in_the_uk_mo\" (\n \"sn_sb_pct\" text,\n \"liquidat_c\" real,\n \"solidat_c\" real,\n \"hardness_brinell\" real,\n \"purpose\" text\n);\n\nQuestion: When the Sn/Sb (%) of 13/17, and a Liquidat (c) bigger than 283 what's the solidat (c)?" }, { "role": "assistant", "content": "SELECT SUM(\"solidat_c\") FROM \"type_metal_alloys_mentioned_in_the_uk_mo\" WHERE \"sn_sb_pct\"='13/17' AND \"liquidat_c\">283;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"type_metal_alloys_mentioned_in_the_uk_mo\" (\n \"sn_sb_pct\" text,\n \"liquidat_c\" real,\n \"solidat_c\" real,\n \"hardness_brinell\" real,\n \"purpose\" text\n);\n\nQuestion: How many Liquidat (c) have a purpose of dual (machine & hand composition)?" }, { "role": "assistant", "content": "SELECT COUNT(\"liquidat_c\") FROM \"type_metal_alloys_mentioned_in_the_uk_mo\" WHERE \"purpose\"='dual (machine & hand composition)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the record for the Chargers on Week 10?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"week\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game on week 4?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: How many weeks did a game happen on September 17, 2000?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"date\"='september 17, 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"record\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game against San Francisco 49ers before week 16?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"<16 AND \"opponent\"='san francisco 49ers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"february\" (\n \"week_of\" text,\n \"tier\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"semi_finalists\" text\n);\n\nQuestion: Who were semi-finalists in the event with a runner-up of Lisa Raymond?" }, { "role": "assistant", "content": "SELECT \"semi_finalists\" FROM \"february\" WHERE \"runner_up\"='lisa raymond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: Which song by David Essex spent 2 weeks on top of the charts?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"see_also\" WHERE \"weeks_on_top\"=2 AND \"artist\"='david essex';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: What is the Volume:Issue number of the George McCrae song that spent less than 2 weeks on top of the charts?" }, { "role": "assistant", "content": "SELECT \"volume_issue\" FROM \"see_also\" WHERE \"weeks_on_top\"<2 AND \"artist\"='george mccrae';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defunct\" (\n \"venue\" text,\n \"location\" text,\n \"environment\" text,\n \"closed\" text,\n \"reason\" text\n);\n\nQuestion: Which venues closed in the 1990s?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"defunct\" WHERE \"closed\"='1990s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defunct\" (\n \"venue\" text,\n \"location\" text,\n \"environment\" text,\n \"closed\" text,\n \"reason\" text\n);\n\nQuestion: Which venues were closed because they were replaced?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"defunct\" WHERE \"reason\"='replaced';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defunct\" (\n \"venue\" text,\n \"location\" text,\n \"environment\" text,\n \"closed\" text,\n \"reason\" text\n);\n\nQuestion: Which venue closed in 1996?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"defunct\" WHERE \"closed\"='1996';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defunct\" (\n \"venue\" text,\n \"location\" text,\n \"environment\" text,\n \"closed\" text,\n \"reason\" text\n);\n\nQuestion: What were the reasons that venues closed in the 1990s?" }, { "role": "assistant", "content": "SELECT \"reason\" FROM \"defunct\" WHERE \"closed\"='1990s';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"defunct\" (\n \"venue\" text,\n \"location\" text,\n \"environment\" text,\n \"closed\" text,\n \"reason\" text\n);\n\nQuestion: Why did the Belk Gymnasium close?" }, { "role": "assistant", "content": "SELECT \"reason\" FROM \"defunct\" WHERE \"venue\"='belk gymnasium';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_finals\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Can you tell me the Score that has the Home team of townsville crocodiles?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"semi_finals\" WHERE \"home_team\"='townsville crocodiles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_finals\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Can you tell me the Venue that has the Away team of south dragons?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"semi_finals\" WHERE \"away_team\"='south dragons';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_finals\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Can you tell me the lowest Crowd that has the Away team of melbourne tigers?" }, { "role": "assistant", "content": "SELECT MIN(\"crowd\") FROM \"semi_finals\" WHERE \"away_team\"='melbourne tigers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semi_finals\" (\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text,\n \"crowd\" real,\n \"box_score\" text,\n \"report\" text\n);\n\nQuestion: Can you tell me the Away team that has the Home team of south dragons, and the Score of 94-81?" }, { "role": "assistant", "content": "SELECT \"away_team\" FROM \"semi_finals\" WHERE \"home_team\"='south dragons' AND \"score\"='94-81';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which position has a pick # of 238 and a round above 3?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"nfl_draft\" WHERE \"round\">3 AND \"pick_num\"=238;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which player went to Vanderbilt?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"college\"='vanderbilt';" } ]
[ { "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\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many grids had a Time/Retired of +4 laps?" }, { "role": "assistant", "content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"time_retired\"='+4 laps';" } ]
[ { "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\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many laps had a constructor of toyota and a Time/Retired of +13.409?" }, { "role": "assistant", "content": "SELECT COUNT(\"laps\") FROM \"race\" WHERE \"constructor\"='toyota' AND \"time_retired\"='+13.409';" } ]
[ { "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\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What was the constructor when the laps were larger than 54, and the time/retired was +1 lap on a grid of 20?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"laps\">54 AND \"time_retired\"='+1 lap' AND \"grid\"=20;" } ]
[ { "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\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: How many grids had a constructor of renault and less than 4 laps?" }, { "role": "assistant", "content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"constructor\"='renault' AND \"laps\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: Which census ranking is 57.06 km big?" }, { "role": "assistant", "content": "SELECT \"census_ranking\" FROM \"communities\" WHERE \"area_km_2\"=57.06;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"communities\" (\n \"official_name\" text,\n \"status\" text,\n \"area_km_2\" real,\n \"population\" real,\n \"census_ranking\" text\n);\n\nQuestion: Which status is 75.35 km2 and is named sussex?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"communities\" WHERE \"area_km_2\"<75.35 AND \"official_name\"='sussex';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1930_31_season_as_a_four_year_old\" (\n \"result\" text,\n \"race\" text,\n \"distance\" text,\n \"weight\" real,\n \"winner_or_2nd\" text,\n \"pos_n\" text\n);\n\nQuestion: What was the distance for the winner or 2nd Waterline?" }, { "role": "assistant", "content": "SELECT \"distance\" FROM \"1930_31_season_as_a_four_year_old\" WHERE \"winner_or_2nd\"='waterline';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1930_31_season_as_a_four_year_old\" (\n \"result\" text,\n \"race\" text,\n \"distance\" text,\n \"weight\" real,\n \"winner_or_2nd\" text,\n \"pos_n\" text\n);\n\nQuestion: What is the result for the distance of 10f, and a winner or 2nd of Lampra?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"1930_31_season_as_a_four_year_old\" WHERE \"distance\"='10f' AND \"winner_or_2nd\"='lampra';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1978\" text,\n \"1979\" text,\n \"1980\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"career_sr\" text\n);\n\nQuestion: What is 1987, when 1986 is \"1R\"?" }, { "role": "assistant", "content": "SELECT \"1987\" FROM \"singles_performance_timeline\" WHERE \"1986\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1978\" text,\n \"1979\" text,\n \"1980\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"career_sr\" text\n);\n\nQuestion: What is 1986, when 1978 is \"A\", when 1979 is \"A\", and when 1980 is \"1R\"?" }, { "role": "assistant", "content": "SELECT \"1986\" FROM \"singles_performance_timeline\" WHERE \"1978\"='a' AND \"1979\"='a' AND \"1980\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1978\" text,\n \"1979\" text,\n \"1980\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"career_sr\" text\n);\n\nQuestion: What is 1984, when 1979 is \"1R\"?" }, { "role": "assistant", "content": "SELECT \"1984\" FROM \"singles_performance_timeline\" WHERE \"1979\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1978\" text,\n \"1979\" text,\n \"1980\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"career_sr\" text\n);\n\nQuestion: What is 1982, when 1978 is \"A\", when 1985 is \"4R\", and when 1991 is \"1R\"?" }, { "role": "assistant", "content": "SELECT \"1982\" FROM \"singles_performance_timeline\" WHERE \"1978\"='a' AND \"1985\"='4r' AND \"1991\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1978\" text,\n \"1979\" text,\n \"1980\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"career_sr\" text\n);\n\nQuestion: What is 1989, when 1982 is \"SF\"?" }, { "role": "assistant", "content": "SELECT \"1989\" FROM \"singles_performance_timeline\" WHERE \"1982\"='sf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"1978\" text,\n \"1979\" text,\n \"1980\" text,\n \"1982\" text,\n \"1983\" text,\n \"1984\" text,\n \"1985\" text,\n \"1986\" text,\n \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"career_sr\" text\n);\n\nQuestion: What is 1992, when 1990 is \"Grand Slams\"?" }, { "role": "assistant", "content": "SELECT \"1992\" FROM \"singles_performance_timeline\" WHERE \"1990\"='grand slams';" } ]