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 \"awards\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"role\" text,\n \"production\" text,\n \"result\" text\n);\n\nQuestion: Which Production in 2009 had a Result of Nominated at the Helpmann awards Award Ceremony?" }, { "role": "assistant", "content": "SELECT \"production\" FROM \"awards\" WHERE \"result\"='nominated' AND \"year\"=2009 AND \"award_ceremony\"='helpmann awards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"role\" text,\n \"production\" text,\n \"result\" text\n);\n\nQuestion: Which Award Ceremony in 2009 has a Role of Glinda?" }, { "role": "assistant", "content": "SELECT \"award_ceremony\" FROM \"awards\" WHERE \"role\"='glinda' 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\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"role\" text,\n \"production\" text,\n \"result\" text\n);\n\nQuestion: Which Year saw the Production of Wicked at the Helpmann Awards Award ceremony?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"awards\" WHERE \"production\"='wicked' AND \"award_ceremony\"='helpmann awards';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"year\" real,\n \"award_ceremony\" text,\n \"role\" text,\n \"production\" text,\n \"result\" text\n);\n\nQuestion: What was the Result in 2013?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"awards\" WHERE \"year\"=2013;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: Who was the rider riding the Kawasaki ZX-6r, that rode less than 22 laps, and the grid was greater than 19, and retirement was the time?" }, { "role": "assistant", "content": "SELECT \"rider\" FROM \"supersport_race_classification\" WHERE \"laps\"<22 AND \"grid\">19 AND \"time\"='retirement' AND \"bike\"='kawasaki zx-6r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the maximum grid when the laps were greater than 22?" }, { "role": "assistant", "content": "SELECT MAX(\"grid\") FROM \"supersport_race_classification\" WHERE \"laps\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: What is the minimum grid when there was more than 22 laps?" }, { "role": "assistant", "content": "SELECT MIN(\"grid\") FROM \"supersport_race_classification\" WHERE \"laps\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supersport_race_classification\" (\n \"rider\" text,\n \"bike\" text,\n \"laps\" real,\n \"time\" text,\n \"grid\" real\n);\n\nQuestion: How many total laps were ridden when the grid was 7 and the rider rode the Honda CBR600RR?" }, { "role": "assistant", "content": "SELECT SUM(\"laps\") FROM \"supersport_race_classification\" WHERE \"bike\"='honda cbr600rr' AND \"grid\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_the_most_commonly_used_of_the_t\" (\n \"sign\" text,\n \"domicile\" text,\n \"detriment\" text,\n \"exaltation\" text,\n \"fall\" text\n);\n\nQuestion: Which sign has a fall of Venus?" }, { "role": "assistant", "content": "SELECT \"sign\" FROM \"table_of_the_most_commonly_used_of_the_t\" WHERE \"fall\"='venus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_the_most_commonly_used_of_the_t\" (\n \"sign\" text,\n \"domicile\" text,\n \"detriment\" text,\n \"exaltation\" text,\n \"fall\" text\n);\n\nQuestion: Which exaltation has a fall of moon?" }, { "role": "assistant", "content": "SELECT \"exaltation\" FROM \"table_of_the_most_commonly_used_of_the_t\" WHERE \"fall\"='moon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_the_most_commonly_used_of_the_t\" (\n \"sign\" text,\n \"domicile\" text,\n \"detriment\" text,\n \"exaltation\" text,\n \"fall\" text\n);\n\nQuestion: Which exaltation has a domicile of Saturn and a fall of Jupiter?" }, { "role": "assistant", "content": "SELECT \"exaltation\" FROM \"table_of_the_most_commonly_used_of_the_t\" WHERE \"domicile\"='saturn' AND \"fall\"='jupiter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_the_most_commonly_used_of_the_t\" (\n \"sign\" text,\n \"domicile\" text,\n \"detriment\" text,\n \"exaltation\" text,\n \"fall\" text\n);\n\nQuestion: Which exaltation has a domicile of Saturn and Capricorn as a sign?" }, { "role": "assistant", "content": "SELECT \"exaltation\" FROM \"table_of_the_most_commonly_used_of_the_t\" WHERE \"domicile\"='saturn' AND \"sign\"='capricorn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_the_most_commonly_used_of_the_t\" (\n \"sign\" text,\n \"domicile\" text,\n \"detriment\" text,\n \"exaltation\" text,\n \"fall\" text\n);\n\nQuestion: Which detriment has a domicile of mercury and Virgo as a sign?" }, { "role": "assistant", "content": "SELECT \"detriment\" FROM \"table_of_the_most_commonly_used_of_the_t\" WHERE \"domicile\"='mercury' AND \"sign\"='virgo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"table_of_the_most_commonly_used_of_the_t\" (\n \"sign\" text,\n \"domicile\" text,\n \"detriment\" text,\n \"exaltation\" text,\n \"fall\" text\n);\n\nQuestion: Which exaltation has a detriment of Saturn and Cancer as a sign?" }, { "role": "assistant", "content": "SELECT \"exaltation\" FROM \"table_of_the_most_commonly_used_of_the_t\" WHERE \"detriment\"='saturn' AND \"sign\"='cancer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What was the draw when the points against was 234?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"league_table\" WHERE \"points_against\"='234';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What was the try bonus when the points for was 608?" }, { "role": "assistant", "content": "SELECT \"try_bonus\" FROM \"league_table\" WHERE \"points_for\"='608';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"player\" text,\n \"pos\" text,\n \"nationality\" text,\n \"team\" text,\n \"previous_team\" text,\n \"years_of_nba_experience_a\" real,\n \"career_with_the_franchise_b\" text\n);\n\nQuestion: Which Team has a Previous team of san diego rockets, and a Position of f?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"selections\" WHERE \"previous_team\"='san diego rockets' AND \"pos\"='f';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"selections\" (\n \"player\" text,\n \"pos\" text,\n \"nationality\" text,\n \"team\" text,\n \"previous_team\" text,\n \"years_of_nba_experience_a\" real,\n \"career_with_the_franchise_b\" text\n);\n\nQuestion: Which Nationality has a Previous team of new york knicks, and more than 3 Years of NBA experience?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"selections\" WHERE \"previous_team\"='new york knicks' AND \"years_of_nba_experience_a\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is team 1 when team 2 is Manchester United?" }, { "role": "assistant", "content": "SELECT \"team_1\" FROM \"round_of_16\" WHERE \"team_2\"='manchester united';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_of_16\" (\n \"team_1\" text,\n \"agg\" text,\n \"team_2\" text,\n \"1st_leg\" text,\n \"2nd_leg\" text\n);\n\nQuestion: What is the agg when team 1 is Milan?" }, { "role": "assistant", "content": "SELECT \"agg\" FROM \"round_of_16\" WHERE \"team_1\"='milan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"general_standings\" (\n \"rank\" real,\n \"cyclist\" text,\n \"team\" text,\n \"time\" text,\n \"uci_pro_tour_points\" real\n);\n\nQuestion: Which team is ranked #10?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"general_standings\" WHERE \"rank\"=10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"general_standings\" (\n \"rank\" real,\n \"cyclist\" text,\n \"team\" text,\n \"time\" text,\n \"uci_pro_tour_points\" real\n);\n\nQuestion: Which cyclist has UCI ProTour points of 40?" }, { "role": "assistant", "content": "SELECT \"cyclist\" FROM \"general_standings\" WHERE \"uci_pro_tour_points\"=40;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"province_community\" text,\n \"contestant\" text,\n \"height\" text,\n \"hometown\" text,\n \"geographical_regions\" text\n);\n\nQuestion: What is the province with a contestant of tatiana vargas rosales?" }, { "role": "assistant", "content": "SELECT \"province_community\" FROM \"delegates\" WHERE \"contestant\"='tatiana vargas rosales';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"delegates\" (\n \"province_community\" text,\n \"contestant\" text,\n \"height\" text,\n \"hometown\" text,\n \"geographical_regions\" text\n);\n\nQuestion: Which province has the contestant elixandra tobias carasco?" }, { "role": "assistant", "content": "SELECT \"province_community\" FROM \"delegates\" WHERE \"contestant\"='elixandra tobias carasco';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"2010\" text,\n \"2009\" real,\n \"2008\" real,\n \"2007\" text,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" text\n);\n\nQuestion: What is the 2005 sum with a 2009 less than 1,850,654?" }, { "role": "assistant", "content": "SELECT SUM(\"2005\") FROM \"statistics\" WHERE \"2009\"<'1,850,654';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"2010\" text,\n \"2009\" real,\n \"2008\" real,\n \"2007\" text,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" text\n);\n\nQuestion: What is the average 2003 with 2,154,170 in 2010 and a 2008 less than 2,266,716?" }, { "role": "assistant", "content": "SELECT AVG(\"2003\") FROM \"statistics\" WHERE \"2010\"='2,154,170' AND \"2008\"<'2,266,716';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"2010\" text,\n \"2009\" real,\n \"2008\" real,\n \"2007\" text,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" text\n);\n\nQuestion: What is the average 2009 with a 2003 greater than 3,791, 107,982 in 2007, and a 2006 less than 98,264?" }, { "role": "assistant", "content": "SELECT AVG(\"2009\") FROM \"statistics\" WHERE \"2003\">'3,791' AND \"2007\"='107,982' AND \"2006\"<'98,264';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"statistics\" (\n \"2010\" text,\n \"2009\" real,\n \"2008\" real,\n \"2007\" text,\n \"2006\" real,\n \"2005\" real,\n \"2004\" real,\n \"2003\" real,\n \"2002\" text\n);\n\nQuestion: What is the sum of the 2008 with a 2007 of 4,244,115 and less than 3,296,267 in 2003?" }, { "role": "assistant", "content": "SELECT SUM(\"2008\") FROM \"statistics\" WHERE \"2007\"='4,244,115' AND \"2003\"<'3,296,267';" } ]
[ { "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 \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is 2011, when 2009 is \"A\"?" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"doubles\" WHERE \"2009\"='a';" } ]
[ { "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 \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is 2009, when Tournament is \"Year-End Ranking\"?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"doubles\" WHERE \"tournament\"='year-end ranking';" } ]
[ { "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 \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is 2011, when 2012 is \"1R\"?" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"doubles\" WHERE \"2012\"='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 \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is 2012, when 2009 is \"A\"?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"doubles\" WHERE \"2009\"='a';" } ]
[ { "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 \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is 2011, when 2012 is \"A\", and when Tournament is \"French Open\"?" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"doubles\" WHERE \"2012\"='a' AND \"tournament\"='french open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the largest Against with an Opposing Teams of wales?" }, { "role": "assistant", "content": "SELECT MAX(\"against\") FROM \"1989\" WHERE \"opposing_teams\"='wales';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What Status has a Date of 18/03/1989?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"1989\" WHERE \"date\"='18/03/1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What Venue has a Status of five nations, and Against of 0?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"1989\" WHERE \"status\"='five nations' AND \"against\"=0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1989\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: What is the smallest Against with a Date of 18/02/1989?" }, { "role": "assistant", "content": "SELECT MIN(\"against\") FROM \"1989\" WHERE \"date\"='18/02/1989';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic_violence\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"additional_notes\" text\n);\n\nQuestion: What are the additional notes for Cotabato?" }, { "role": "assistant", "content": "SELECT \"additional_notes\" FROM \"domestic_violence\" WHERE \"location\"='cotabato';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic_violence\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"additional_notes\" text\n);\n\nQuestion: What country in Kunlong in?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"domestic_violence\" WHERE \"location\"='kunlong';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic_violence\" (\n \"perpetrator\" text,\n \"date\" text,\n \"year\" real,\n \"location\" text,\n \"country\" text,\n \"killed\" real,\n \"additional_notes\" text\n);\n\nQuestion: Who went on a rampage in Baghdad?" }, { "role": "assistant", "content": "SELECT \"perpetrator\" FROM \"domestic_violence\" WHERE \"location\"='baghdad';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the rank that has a total of less than 1?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"performances_by_nation\" WHERE \"total\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the bronze medal count when the silver is less than 3 and the gold is 1?" }, { "role": "assistant", "content": "SELECT SUM(\"bronze\") FROM \"performances_by_nation\" WHERE \"gold\"=1 AND \"silver\"<3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the gold medal count ranked 2 with a total of more than 21?" }, { "role": "assistant", "content": "SELECT COUNT(\"gold\") FROM \"performances_by_nation\" WHERE \"rank\"=2 AND \"total\">21;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performances_by_nation\" (\n \"rank\" real,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What's the smallest total with a bronze count of 5 and a gold count less than 8?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"performances_by_nation\" WHERE \"bronze\"=5 AND \"gold\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"oklahoma\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: What is the party for the representative who was first elected before 2002 and the results were re-elected?" }, { "role": "assistant", "content": "SELECT \"party\" FROM \"oklahoma\" WHERE \"results\"='re-elected' AND \"first_elected\"<2002;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"oklahoma\" (\n \"district\" text,\n \"incumbent\" text,\n \"party\" text,\n \"first_elected\" real,\n \"results\" text\n);\n\nQuestion: Incumbent John Sullivan has what as biggest first elected?" }, { "role": "assistant", "content": "SELECT MAX(\"first_elected\") FROM \"oklahoma\" WHERE \"incumbent\"='john sullivan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"years_member\" text\n);\n\nQuestion: What Location has Years Member of 1963\u20131968?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"former_members\" WHERE \"years_member\"='1963\u20131968';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"years_member\" text\n);\n\nQuestion: What School has Colors of navy blue orange?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"former_members\" WHERE \"colors\"='navy blue orange';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"years_member\" text\n);\n\nQuestion: What Years Member has a School of cairo high school?" }, { "role": "assistant", "content": "SELECT \"years_member\" FROM \"former_members\" WHERE \"school\"='cairo high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"years_member\" text\n);\n\nQuestion: What Colors has a School of sesser high school?" }, { "role": "assistant", "content": "SELECT \"colors\" FROM \"former_members\" WHERE \"school\"='sesser high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"years_member\" text\n);\n\nQuestion: What Colors has a School of zeigler high school?" }, { "role": "assistant", "content": "SELECT \"colors\" FROM \"former_members\" WHERE \"school\"='zeigler high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"school\" text,\n \"location\" text,\n \"nickname_s\" text,\n \"colors\" text,\n \"years_member\" text\n);\n\nQuestion: What Nickname(s) has a Location of elkville, illinois?" }, { "role": "assistant", "content": "SELECT \"nickname_s\" FROM \"former_members\" WHERE \"location\"='elkville, illinois';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english_version\" (\n \"seat\" real,\n \"season_1\" text,\n \"season_2\" text,\n \"season_3\" text,\n \"season_6\" text,\n \"season_7\" text\n);\n\nQuestion: Which Season 1 has a Season 7 of david chilton?" }, { "role": "assistant", "content": "SELECT \"season_1\" FROM \"english_version\" WHERE \"season_7\"='david chilton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english_version\" (\n \"seat\" real,\n \"season_1\" text,\n \"season_2\" text,\n \"season_3\" text,\n \"season_6\" text,\n \"season_7\" text\n);\n\nQuestion: Which Seat has a Season 6 of kevin o'leary?" }, { "role": "assistant", "content": "SELECT MAX(\"seat\") FROM \"english_version\" WHERE \"season_6\"='kevin o''leary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english_version\" (\n \"seat\" real,\n \"season_1\" text,\n \"season_2\" text,\n \"season_3\" text,\n \"season_6\" text,\n \"season_7\" text\n);\n\nQuestion: Which Season 7 has a Season 6 of jim treliving?" }, { "role": "assistant", "content": "SELECT \"season_7\" FROM \"english_version\" WHERE \"season_6\"='jim treliving';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english_version\" (\n \"seat\" real,\n \"season_1\" text,\n \"season_2\" text,\n \"season_3\" text,\n \"season_6\" text,\n \"season_7\" text\n);\n\nQuestion: Which Season 7 has a Seat larger than 1, and a Season 3 of w. brett wilson?" }, { "role": "assistant", "content": "SELECT \"season_7\" FROM \"english_version\" WHERE \"seat\">1 AND \"season_3\"='w. brett wilson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"english_version\" (\n \"seat\" real,\n \"season_1\" text,\n \"season_2\" text,\n \"season_3\" text,\n \"season_6\" text,\n \"season_7\" text\n);\n\nQuestion: Which Season 3 has a Season 7 of jim treliving?" }, { "role": "assistant", "content": "SELECT \"season_3\" FROM \"english_version\" WHERE \"season_7\"='jim treliving';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings_and_results\" (\n \"air_date\" text,\n \"rating\" text,\n \"18_49\" text,\n \"viewers\" text,\n \"weekly_winner\" text\n);\n\nQuestion: What is Weekly Winner, when Air Date is \"July 4, 2008\"?" }, { "role": "assistant", "content": "SELECT \"weekly_winner\" FROM \"ratings_and_results\" WHERE \"air_date\"='july 4, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings_and_results\" (\n \"air_date\" text,\n \"rating\" text,\n \"18_49\" text,\n \"viewers\" text,\n \"weekly_winner\" text\n);\n\nQuestion: What is Rating, when Air Date is \"July 24, 2008*\", and when Weekly Winner is \"Sales Rep. Oscar Ledezma\"?" }, { "role": "assistant", "content": "SELECT \"rating\" FROM \"ratings_and_results\" WHERE \"air_date\"='july 24, 2008*' AND \"weekly_winner\"='sales rep. oscar ledezma';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings_and_results\" (\n \"air_date\" text,\n \"rating\" text,\n \"18_49\" text,\n \"viewers\" text,\n \"weekly_winner\" text\n);\n\nQuestion: What is Viewers, when 18-49 is \"N/A\", and when Weekly Winner is \"Wedding DJ Chris Dixon\"?" }, { "role": "assistant", "content": "SELECT \"viewers\" FROM \"ratings_and_results\" WHERE \"18_49\"='n/a' AND \"weekly_winner\"='wedding dj chris dixon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings_and_results\" (\n \"air_date\" text,\n \"rating\" text,\n \"18_49\" text,\n \"viewers\" text,\n \"weekly_winner\" text\n);\n\nQuestion: What is 18-49, when Weekly Winner is \"Youth Counselor Justin Meece\"?" }, { "role": "assistant", "content": "SELECT \"18_49\" FROM \"ratings_and_results\" WHERE \"weekly_winner\"='youth counselor justin meece';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings_and_results\" (\n \"air_date\" text,\n \"rating\" text,\n \"18_49\" text,\n \"viewers\" text,\n \"weekly_winner\" text\n);\n\nQuestion: What is Viewers, when Air Date is \"July 4, 2008\"?" }, { "role": "assistant", "content": "SELECT \"viewers\" FROM \"ratings_and_results\" WHERE \"air_date\"='july 4, 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ratings_and_results\" (\n \"air_date\" text,\n \"rating\" text,\n \"18_49\" text,\n \"viewers\" text,\n \"weekly_winner\" text\n);\n\nQuestion: What is Air Date, when Rating is \"N/A\", and when Weekly Winner is \"Wedding DJ Chris Dixon\"?" }, { "role": "assistant", "content": "SELECT \"air_date\" FROM \"ratings_and_results\" WHERE \"rating\"='n/a' AND \"weekly_winner\"='wedding dj chris dixon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the record for Dec 16?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"date\"='dec 16';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2010 with a qf in 2011?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"doubles_performance_timeline\" WHERE \"2011\"='qf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2013 of the grand slam tournaments?" }, { "role": "assistant", "content": "SELECT \"2013\" FROM \"doubles_performance_timeline\" WHERE \"tournament\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2013 with a 2r in 2010 and a qf in 2011?" }, { "role": "assistant", "content": "SELECT \"2013\" FROM \"doubles_performance_timeline\" WHERE \"2010\"='2r' AND \"2011\"='qf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2011 with 1r in 2010?" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"doubles_performance_timeline\" WHERE \"2010\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2012 with A in 2009 and 2r in 2010?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"doubles_performance_timeline\" WHERE \"2009\"='a' AND \"2010\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"five_poisons\" (\n \"poison_klesha\" text,\n \"sanskrit\" text,\n \"pali\" text,\n \"tibetan\" text,\n \"alternate_translations\" text\n);\n\nQuestion: What is the poison/klesha word for moha avijja in pali?" }, { "role": "assistant", "content": "SELECT \"poison_klesha\" FROM \"five_poisons\" WHERE \"pali\"='moha avijja';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"five_poisons\" (\n \"poison_klesha\" text,\n \"sanskrit\" text,\n \"pali\" text,\n \"tibetan\" text,\n \"alternate_translations\" text\n);\n\nQuestion: What is the poision/klesha word for the tibetan word gti mug ma rig pa?" }, { "role": "assistant", "content": "SELECT \"poison_klesha\" FROM \"five_poisons\" WHERE \"tibetan\"='gti mug ma rig pa';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"five_poisons\" (\n \"poison_klesha\" text,\n \"sanskrit\" text,\n \"pali\" text,\n \"tibetan\" text,\n \"alternate_translations\" text\n);\n\nQuestion: What is the pali word for pride in poison/klesha?" }, { "role": "assistant", "content": "SELECT \"pali\" FROM \"five_poisons\" WHERE \"poison_klesha\"='pride';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"five_poisons\" (\n \"poison_klesha\" text,\n \"sanskrit\" text,\n \"pali\" text,\n \"tibetan\" text,\n \"alternate_translations\" text\n);\n\nQuestion: What is the pali word for phrag dog in tibetan?" }, { "role": "assistant", "content": "SELECT \"pali\" FROM \"five_poisons\" WHERE \"tibetan\"='phrag dog';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"five_poisons\" (\n \"poison_klesha\" text,\n \"sanskrit\" text,\n \"pali\" text,\n \"tibetan\" text,\n \"alternate_translations\" text\n);\n\nQuestion: What is the pali word for r\u0101ga in sanskrit?" }, { "role": "assistant", "content": "SELECT \"pali\" FROM \"five_poisons\" WHERE \"sanskrit\"='r\u0101ga';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What is the attendance total when Southend Manor is the away team and there are less than 93 ties?" }, { "role": "assistant", "content": "SELECT COUNT(\"attendance\") FROM \"ties\" WHERE \"away_team\"='southend manor' AND \"tie_no\"<93;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"ties\" (\n \"tie_no\" real,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real\n);\n\nQuestion: What is the score when the attendance is less than 83 and Raunds Town is the away team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"ties\" WHERE \"attendance\"<83 AND \"away_team\"='raunds town';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_seven\" (\n \"pick_num\" real,\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"team_from\" text,\n \"league_from\" text\n);\n\nQuestion: Who was the player that was picked at a number less than 205 from the Michigan State Spartans?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_seven\" WHERE \"pick_num\"<205 AND \"team_from\"='michigan state spartans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list\" (\n \"abbr\" text,\n \"canton\" text,\n \"capital\" text,\n \"density_per_km\" real,\n \"no_munic\" real,\n \"s_official_language\" text\n);\n\nQuestion: What is the average Density of 53 No. munic.?" }, { "role": "assistant", "content": "SELECT AVG(\"density_per_km\") FROM \"list\" WHERE \"no_munic\"=53;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1963\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Name the Status of Venue of sydney sports ground , sydney?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"1963\" WHERE \"venue\"='sydney sports ground , sydney';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1963\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Status has a Opposing Teams of wales?" }, { "role": "assistant", "content": "SELECT \"status\" FROM \"1963\" WHERE \"opposing_teams\"='wales';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1963\" (\n \"opposing_teams\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: WHICH Date has a Venue of lancaster park , christchurch?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1963\" WHERE \"venue\"='lancaster park , christchurch';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: WHAT IS THE TEAM WITH DAVE COGGIN?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"first_round_selections\" WHERE \"player\"='dave coggin';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: WHAT IS THE TEAM WITH AN OF POSITION AND PICK OF 24?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"first_round_selections\" WHERE \"position\"='of' AND \"pick\"=24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: WHAT IS THE POSITION WITH BOSTON RED SOX FOR COREY JENKINS?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"first_round_selections\" WHERE \"team\"='boston red sox' AND \"player\"='corey jenkins';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: WHAT PLAYER HAS UPLAND HIGH SCHOOL?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"first_round_selections\" WHERE \"hometown_school\"='upland high school';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: WHAT PLAYER HAS THE OAKLAND ATHLETICS?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"first_round_selections\" WHERE \"team\"='oakland athletics';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"hometown_school\" text\n);\n\nQuestion: WHAT TEAM HAS A PICK LARGER THAN 29?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"first_round_selections\" WHERE \"pick\">29;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vehicular_manslaughter\" (\n \"name\" text,\n \"date\" text,\n \"year\" real,\n \"country\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: Which rampage killed 8 in Israel?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"vehicular_manslaughter\" WHERE \"killed\"='8' AND \"country\"='israel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"vehicular_manslaughter\" (\n \"name\" text,\n \"date\" text,\n \"year\" real,\n \"country\" text,\n \"killed\" text,\n \"injured\" text\n);\n\nQuestion: What coutry had a rampaged killing 14 in 1965?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"vehicular_manslaughter\" WHERE \"killed\"='14' AND \"year\"=1965;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Club, when Drawn is \"0\", and when Try Bonus is \"5\"?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"league_table\" WHERE \"drawn\"='0' AND \"try_bonus\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Club, when Points is \"82\"?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"league_table\" WHERE \"points\"='82';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Played, when Points Against is \"374\"?" }, { "role": "assistant", "content": "SELECT \"played\" FROM \"league_table\" WHERE \"points_against\"='374';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Points Against, when Try Bonus is \"Try bonus\"?" }, { "role": "assistant", "content": "SELECT \"points_against\" FROM \"league_table\" WHERE \"try_bonus\"='try bonus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Try Bonus, when Losing Bonus is \"1\", and when Points For is \"179\"?" }, { "role": "assistant", "content": "SELECT \"try_bonus\" FROM \"league_table\" WHERE \"losing_bonus\"='1' AND \"points_for\"='179';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"points_for\" text,\n \"points_against\" text,\n \"tries_for\" text,\n \"tries_against\" text,\n \"try_bonus\" text,\n \"losing_bonus\" text,\n \"points\" text\n);\n\nQuestion: What is Points For, when Club is \"Tycroes RFC\"?" }, { "role": "assistant", "content": "SELECT \"points_for\" FROM \"league_table\" WHERE \"club\"='tycroes rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mining_disasters_in_the_rhondda_valley_1\" (\n \"colliery\" text,\n \"location\" text,\n \"date\" text,\n \"year\" real,\n \"death_toll\" real,\n \"cause\" text\n);\n\nQuestion: When has a cause of gas explosion, a Death toll smaller than 63, and a Location of penygraig?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"mining_disasters_in_the_rhondda_valley_1\" WHERE \"cause\"='gas explosion' AND \"death_toll\"<63 AND \"location\"='penygraig';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mining_disasters_in_the_rhondda_valley_1\" (\n \"colliery\" text,\n \"location\" text,\n \"date\" text,\n \"year\" real,\n \"death_toll\" real,\n \"cause\" text\n);\n\nQuestion: Where has a cause of gas explosion, a Death toll larger than 38 on 10 june?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"mining_disasters_in_the_rhondda_valley_1\" WHERE \"cause\"='gas explosion' AND \"death_toll\">38 AND \"date\"='10 june';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mining_disasters_in_the_rhondda_valley_1\" (\n \"colliery\" text,\n \"location\" text,\n \"date\" text,\n \"year\" real,\n \"death_toll\" real,\n \"cause\" text\n);\n\nQuestion: Which Year has a Location of dinas on 13 january?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"mining_disasters_in_the_rhondda_valley_1\" WHERE \"location\"='dinas' AND \"date\"='13 january';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mining_disasters_in_the_rhondda_valley_1\" (\n \"colliery\" text,\n \"location\" text,\n \"date\" text,\n \"year\" real,\n \"death_toll\" real,\n \"cause\" text\n);\n\nQuestion: Which Year has a cause of firedamp and a Death toll larger than 11?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"mining_disasters_in_the_rhondda_valley_1\" WHERE \"cause\"='firedamp' AND \"death_toll\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mining_disasters_in_the_rhondda_valley_1\" (\n \"colliery\" text,\n \"location\" text,\n \"date\" text,\n \"year\" real,\n \"death_toll\" real,\n \"cause\" text\n);\n\nQuestion: Count the lowest Year which has gas explosion, Colliery of tylorstown colliery, and a Death toll larger than 57?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"mining_disasters_in_the_rhondda_valley_1\" WHERE \"cause\"='gas explosion' AND \"colliery\"='tylorstown colliery' AND \"death_toll\">57;" } ]