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 \"governors_of_missouri\" (\n \"governor\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"lieutenant_governor\" text,\n \"terms\" text\n);\n\nQuestion: How many terms did the governor that left office on August 4, 1825 serve?" }, { "role": "assistant", "content": "SELECT \"terms\" FROM \"governors_of_missouri\" WHERE \"left_office\"='august 4, 1825';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"governors_of_missouri\" (\n \"governor\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"lieutenant_governor\" text,\n \"terms\" text\n);\n\nQuestion: On what date did the Democratic governor that had Wallace Crossley as lieutenant governor take office?" }, { "role": "assistant", "content": "SELECT \"took_office\" FROM \"governors_of_missouri\" WHERE \"party\"='democratic' AND \"lieutenant_governor\"='wallace crossley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"governors_of_missouri\" (\n \"governor\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"party\" text,\n \"lieutenant_governor\" text,\n \"terms\" text\n);\n\nQuestion: Which governor had William Henry Ashley as lieutenant governor?" }, { "role": "assistant", "content": "SELECT \"governor\" FROM \"governors_of_missouri\" WHERE \"lieutenant_governor\"='william henry ashley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which IHSAA Class has a School of shakamak?" }, { "role": "assistant", "content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='shakamak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which County has a School of bloomfield?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='bloomfield';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: How much Enrollment has a School of shakamak?" }, { "role": "assistant", "content": "SELECT COUNT(\"enrollment\") FROM \"indiana_high_school_athletics_conference\" WHERE \"school\"='shakamak';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"indiana_high_school_athletics_conference\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment\" real,\n \"ihsaa_class\" text,\n \"county\" text\n);\n\nQuestion: Which IHSAA Class has a Mascot of bulldogs?" }, { "role": "assistant", "content": "SELECT \"ihsaa_class\" FROM \"indiana_high_school_athletics_conference\" WHERE \"mascot\"='bulldogs';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"1986\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text\n);\n\nQuestion: What's the 1996 if 1986 has a 1R?" }, { "role": "assistant", "content": "SELECT \"1996\" FROM \"women_s_doubles_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 \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"1986\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text\n);\n\nQuestion: What's the 1986 if 1991 has a QF and 1998 has a 3R?" }, { "role": "assistant", "content": "SELECT \"1986\" FROM \"women_s_doubles_performance_timeline\" WHERE \"1991\"='qf' AND \"1998\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"1986\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text\n);\n\nQuestion: What's the 1997 if 1993 has a 1R, 1995 has a 3R, and 1999 has a 1R?" }, { "role": "assistant", "content": "SELECT \"1997\" FROM \"women_s_doubles_performance_timeline\" WHERE \"1999\"='1r' AND \"1995\"='3r' AND \"1993\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"1986\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text\n);\n\nQuestion: What's the 1994 if 1995 has a 1R?" }, { "role": "assistant", "content": "SELECT \"1994\" FROM \"women_s_doubles_performance_timeline\" WHERE \"1995\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"1986\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text\n);\n\nQuestion: What's the tournament when 1992 is A?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"women_s_doubles_performance_timeline\" WHERE \"1992\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"1986\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text\n);\n\nQuestion: What's the 1997 when 1992 is QF, 1995 is 1R, and 1999 is 1R?" }, { "role": "assistant", "content": "SELECT \"1997\" FROM \"women_s_doubles_performance_timeline\" WHERE \"1999\"='1r' AND \"1992\"='qf' AND \"1995\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What's the most league cup apps for Jimmy Lawson having 0 league cup goals?" }, { "role": "assistant", "content": "SELECT MAX(\"league_cup_apps\") FROM \"appearances_and_goals\" WHERE \"league_cup_goals\"=0 AND \"name\"='jimmy lawson';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What's the total goals for Alan Sweeney having 0 FA Cup goals and fewer than 0 League Cup apps?" }, { "role": "assistant", "content": "SELECT AVG(\"total_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_goals\"=0 AND \"name\"='alan sweeney' AND \"league_cup_apps\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"appearances_and_goals\" (\n \"name\" text,\n \"position\" text,\n \"league_apps\" text,\n \"league_goals\" real,\n \"fa_cup_apps\" real,\n \"fa_cup_goals\" real,\n \"league_cup_apps\" real,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: What's the total number of league cup apps when the league goals were less than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"league_cup_apps\") FROM \"appearances_and_goals\" WHERE \"league_goals\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Where was the September 3 game?" }, { "role": "assistant", "content": "SELECT \"location\" FROM \"regular_season\" WHERE \"date\"='september 3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location\" text,\n \"record\" text\n);\n\nQuestion: Which game was on September 12?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"regular_season\" WHERE \"date\"='september 12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: What is cork's rank?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"season\" WHERE \"county\"='cork';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: How many totals does cork have whose rank is larger than 2?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"season\" WHERE \"county\"='cork' AND \"rank\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season\" (\n \"rank\" real,\n \"player\" text,\n \"county\" text,\n \"tally\" text,\n \"total\" real,\n \"matches\" real,\n \"average\" real\n);\n\nQuestion: Which Matches have a Tally of 1-38?" }, { "role": "assistant", "content": "SELECT \"matches\" FROM \"season\" WHERE \"tally\"='1-38';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many silver medals did spain have when they had more than 0 bronze medals and less than 54 total medals?" }, { "role": "assistant", "content": "SELECT \"silver\" FROM \"medals_table\" WHERE \"bronze\">0 AND \"total\"<54 AND \"nation\"='spain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What was the highest number of gold medals when there were 0 silver medals?" }, { "role": "assistant", "content": "SELECT MAX(\"gold\") FROM \"medals_table\" WHERE \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_1\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What's Brazil's rank when it has notes of R?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"heat_1\" WHERE \"notes\"='r' AND \"country\"='brazil';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rank_by_time_in_office\" (\n \"rank\" real,\n \"premier\" text,\n \"party\" text,\n \"assumed_office\" text,\n \"left_office\" text,\n \"total_time_in_office\" text\n);\n\nQuestion: What rank was the premier Sir John See?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"rank_by_time_in_office\" WHERE \"premier\"='sir john see';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"date\" text,\n \"title\" text,\n \"peak_position\" real,\n \"weeks\" text,\n \"sales\" real\n);\n\nQuestion: Which Peak Position has a Date of 10 june 1998?" }, { "role": "assistant", "content": "SELECT \"peak_position\" FROM \"singles\" WHERE \"date\"='10 june 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_in_paraguayan_football\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"comp\" text,\n \"report\" text\n);\n\nQuestion: What Report is on June 3, 2000?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"2000_in_paraguayan_football\" WHERE \"date\"='june 3, 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_in_paraguayan_football\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"comp\" text,\n \"report\" text\n);\n\nQuestion: What is the Report on November 15, 2000?" }, { "role": "assistant", "content": "SELECT \"report\" FROM \"2000_in_paraguayan_football\" WHERE \"date\"='november 15, 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2000_in_paraguayan_football\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"comp\" text,\n \"report\" text\n);\n\nQuestion: What is the Score on October 7, 2000?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"2000_in_paraguayan_football\" WHERE \"date\"='october 7, 2000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"yang_lian_chn\" text,\n \"98kg\" text,\n \"santo_domingo_dominican\" text\n);\n\nQuestion: What is the figure for Santo Domingo, Dominican for the world record in the clean & jerk?" }, { "role": "assistant", "content": "SELECT \"santo_domingo_dominican\" FROM \"records\" WHERE \"world_record\"='clean & jerk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"records\" (\n \"world_record\" text,\n \"snatch\" text,\n \"yang_lian_chn\" text,\n \"98kg\" text,\n \"santo_domingo_dominican\" text\n);\n\nQuestion: What is the 98kg for Santo Domingo, Domincan on 1 October 2006?" }, { "role": "assistant", "content": "SELECT \"98kg\" FROM \"records\" WHERE \"santo_domingo_dominican\"='1 october 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demographics\" (\n \"municipality\" text,\n \"fips_code\" real,\n \"founded\" real,\n \"population_2010\" real,\n \"area\" text\n);\n\nQuestion: What is the FIPS code for the municipality that has an area of 114.76 sq mi (297.23 sq km) and had a 2010 population of less than 166,327?" }, { "role": "assistant", "content": "SELECT AVG(\"fips_code\") FROM \"demographics\" WHERE \"area\"='114.76 sq mi (297.23 sq km)' AND \"population_2010\"<'166,327';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demographics\" (\n \"municipality\" text,\n \"fips_code\" real,\n \"founded\" real,\n \"population_2010\" real,\n \"area\" text\n);\n\nQuestion: What is the FIPS code for the municipality that has an area of 58.60 sq mi (151.77 sq km) and had a 2010 population smaller than 166,327?" }, { "role": "assistant", "content": "SELECT COUNT(\"fips_code\") FROM \"demographics\" WHERE \"population_2010\"<'166,327' AND \"area\"='58.60 sq mi (151.77 sq km)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"demographics\" (\n \"municipality\" text,\n \"fips_code\" real,\n \"founded\" real,\n \"population_2010\" real,\n \"area\" text\n);\n\nQuestion: In what year was Yauco, which had over 42,043 people in 2010, founded?" }, { "role": "assistant", "content": "SELECT AVG(\"founded\") FROM \"demographics\" WHERE \"municipality\"='yauco' AND \"population_2010\">'42,043';" } ]
[ { "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: Which Result has an Attendance larger than 38,354, and a Date of october 23, 1988?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\">'38,354' AND \"date\"='october 23, 1988';" } ]
[ { "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 is the attendance for a week smaller than 9 with a result of L 38-20?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"result\"='l 38-20' AND \"week\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Can you tell me the School that has the IHSAA Class of a, and the Enrollment 08-09 off 244?" }, { "role": "assistant", "content": "SELECT \"school\" FROM \"membership\" WHERE \"ihsaa_class\"='a' AND \"enrollment_08_09\"=244;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"membership\" (\n \"school\" text,\n \"location\" text,\n \"mascot\" text,\n \"enrollment_08_09\" real,\n \"ihsaa_class\" text,\n \"county\" text,\n \"year_joined\" real,\n \"previous_conference\" text\n);\n\nQuestion: Can you tell me the County that has the Location of shelbyville?" }, { "role": "assistant", "content": "SELECT \"county\" FROM \"membership\" WHERE \"location\"='shelbyville';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_raiding_history\" (\n \"date\" text,\n \"ship_name\" text,\n \"flag\" text,\n \"tonnage_grt\" real,\n \"fate\" text,\n \"deaths\" real\n);\n\nQuestion: How many Deaths have a Fate of damaged, and a Tonnage (GRT) smaller than 4,917?" }, { "role": "assistant", "content": "SELECT COUNT(\"deaths\") FROM \"summary_of_raiding_history\" WHERE \"fate\"='damaged' AND \"tonnage_grt\"<'4,917';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_raiding_history\" (\n \"date\" text,\n \"ship_name\" text,\n \"flag\" text,\n \"tonnage_grt\" real,\n \"fate\" text,\n \"deaths\" real\n);\n\nQuestion: Which Tonnage has a Fate of sunk, and Deaths smaller than 17, and a Date of 16 november 1940?" }, { "role": "assistant", "content": "SELECT \"tonnage_grt\" FROM \"summary_of_raiding_history\" WHERE \"fate\"='sunk' AND \"deaths\"<17 AND \"date\"='16 november 1940';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_raiding_history\" (\n \"date\" text,\n \"ship_name\" text,\n \"flag\" text,\n \"tonnage_grt\" real,\n \"fate\" text,\n \"deaths\" real\n);\n\nQuestion: How much tonnage has a Fate of sunk, and a Flag of great britain, and a Date of 26 september 1940, and Deaths of 2?" }, { "role": "assistant", "content": "SELECT SUM(\"tonnage_grt\") FROM \"summary_of_raiding_history\" WHERE \"fate\"='sunk' AND \"flag\"='great britain' AND \"date\"='26 september 1940' AND \"deaths\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_raiding_history\" (\n \"date\" text,\n \"ship_name\" text,\n \"flag\" text,\n \"tonnage_grt\" real,\n \"fate\" text,\n \"deaths\" real\n);\n\nQuestion: Which tonnage has a Date of 26 september 1940, and a Ship Name of ashantian?" }, { "role": "assistant", "content": "SELECT MIN(\"tonnage_grt\") FROM \"summary_of_raiding_history\" WHERE \"date\"='26 september 1940' AND \"ship_name\"='ashantian';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"athlete\" text,\n \"country\" text,\n \"time\" text\n);\n\nQuestion: What is the highest lane for Brazil, ranked less than 8?" }, { "role": "assistant", "content": "SELECT MAX(\"lane\") FROM \"semifinal_2\" WHERE \"country\"='brazil' AND \"rank\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_of_hiroo_district_july_2008\" (\n \"district\" text,\n \"number_of_households\" real,\n \"total_population\" real,\n \"male\" real,\n \"female\" real\n);\n\nQuestion: What is the total population with less than 789 males?" }, { "role": "assistant", "content": "SELECT COUNT(\"total_population\") FROM \"population_of_hiroo_district_july_2008\" WHERE \"male\"<789;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_of_hiroo_district_july_2008\" (\n \"district\" text,\n \"number_of_households\" real,\n \"total_population\" real,\n \"male\" real,\n \"female\" real\n);\n\nQuestion: What is the lowest female number of the hiroo 1-ch\u014dme district, which has more than 1,666 households?" }, { "role": "assistant", "content": "SELECT MIN(\"female\") FROM \"population_of_hiroo_district_july_2008\" WHERE \"district\"='hiroo 1-ch\u014dme' AND \"number_of_households\">'1,666';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_of_hiroo_district_july_2008\" (\n \"district\" text,\n \"number_of_households\" real,\n \"total_population\" real,\n \"male\" real,\n \"female\" real\n);\n\nQuestion: What is the highest number of males where there are 1,202 females and more than 1,127 households?" }, { "role": "assistant", "content": "SELECT MAX(\"male\") FROM \"population_of_hiroo_district_july_2008\" WHERE \"female\"='1,202' AND \"number_of_households\">'1,127';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population_of_hiroo_district_july_2008\" (\n \"district\" text,\n \"number_of_households\" real,\n \"total_population\" real,\n \"male\" real,\n \"female\" real\n);\n\nQuestion: What is the total number of females where the total population is less than 2,195?" }, { "role": "assistant", "content": "SELECT COUNT(\"female\") FROM \"population_of_hiroo_district_july_2008\" WHERE \"total_population\"<'2,195';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_6_3_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What was the outcome when the partner was Iryna Bremond?" }, { "role": "assistant", "content": "SELECT \"outcome\" FROM \"doubles_6_3_3\" WHERE \"partner\"='iryna bremond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_6_3_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What tournament had a Score of 6\u20133, 2\u20136, [10\u20138]?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_6_3_3\" WHERE \"score\"='6\u20133, 2\u20136, [10\u20138]';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_6_3_3\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who was the partner when the surface was clay, and outcome was runner-up, with a score of 4\u20136, 1\u20136?" }, { "role": "assistant", "content": "SELECT \"partner\" FROM \"doubles_6_3_3\" WHERE \"surface\"='clay' AND \"outcome\"='runner-up' AND \"score\"='4\u20136, 1\u20136';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank of Manuel Cortina Mart\u00ednez?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"heat_4\" WHERE \"athletes\"='manuel cortina mart\u00ednez';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank if the person with a time of 1:40.626?" }, { "role": "assistant", "content": "SELECT SUM(\"rank\") FROM \"heat_4\" WHERE \"time\"='1:40.626';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank of the person with a time of 1:44.757?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"heat_4\" WHERE \"time\"='1:44.757';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank of Israel?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"heat_4\" WHERE \"country\"='israel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the name of the athlete from Myanmar?" }, { "role": "assistant", "content": "SELECT \"athletes\" FROM \"heat_4\" WHERE \"country\"='myanmar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_4\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes for the person ranked larger than 2, and a time of 1:48.179?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"heat_4\" WHERE \"rank\">2 AND \"time\"='1:48.179';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_results_2005\" (\n \"party\" text,\n \"burnley\" real,\n \"chorley\" real,\n \"fylde\" real,\n \"hyndburn\" real,\n \"lancaster\" real,\n \"pendle\" real,\n \"preston\" real,\n \"ribble_valley\" real,\n \"rossendale\" real,\n \"south_ribble\" real,\n \"west_lancashire\" real,\n \"wyre\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest Chorley with a 6 Preston and a 4 for West Lancashire?" }, { "role": "assistant", "content": "SELECT MIN(\"chorley\") FROM \"summary_of_results_2005\" WHERE \"preston\"=6 AND \"west_lancashire\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_results_2005\" (\n \"party\" text,\n \"burnley\" real,\n \"chorley\" real,\n \"fylde\" real,\n \"hyndburn\" real,\n \"lancaster\" real,\n \"pendle\" real,\n \"preston\" real,\n \"ribble_valley\" real,\n \"rossendale\" real,\n \"south_ribble\" real,\n \"west_lancashire\" real,\n \"wyre\" real,\n \"total\" real\n);\n\nQuestion: What is the average rating for a Flyde that has a Burnley less than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"fylde\") FROM \"summary_of_results_2005\" WHERE \"burnley\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_results_2005\" (\n \"party\" text,\n \"burnley\" real,\n \"chorley\" real,\n \"fylde\" real,\n \"hyndburn\" real,\n \"lancaster\" real,\n \"pendle\" real,\n \"preston\" real,\n \"ribble_valley\" real,\n \"rossendale\" real,\n \"south_ribble\" real,\n \"west_lancashire\" real,\n \"wyre\" real,\n \"total\" real\n);\n\nQuestion: What is the highest rated West Lancashire with a Pendle greater than 1 and a Rossendale more than 2?" }, { "role": "assistant", "content": "SELECT MAX(\"west_lancashire\") FROM \"summary_of_results_2005\" WHERE \"pendle\">1 AND \"rossendale\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary_of_results_2005\" (\n \"party\" text,\n \"burnley\" real,\n \"chorley\" real,\n \"fylde\" real,\n \"hyndburn\" real,\n \"lancaster\" real,\n \"pendle\" real,\n \"preston\" real,\n \"ribble_valley\" real,\n \"rossendale\" real,\n \"south_ribble\" real,\n \"west_lancashire\" real,\n \"wyre\" real,\n \"total\" real\n);\n\nQuestion: What was the average Chorley for the Labour party that had a Rossendale greater than 0 and a Pendle less than 1?" }, { "role": "assistant", "content": "SELECT AVG(\"chorley\") FROM \"summary_of_results_2005\" WHERE \"rossendale\">0 AND \"party\"='labour' AND \"pendle\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1945_63\" (\n \"season\" text,\n \"division\" text,\n \"rank\" text,\n \"avg_att\" text,\n \"top_goalscorer\" text,\n \"goals\" real\n);\n\nQuestion: In what season was Sch\u00e4dlich the top goalscorer?" }, { "role": "assistant", "content": "SELECT \"season\" FROM \"1945_63\" WHERE \"top_goalscorer\"='sch\u00e4dlich';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1945_63\" (\n \"season\" text,\n \"division\" text,\n \"rank\" text,\n \"avg_att\" text,\n \"top_goalscorer\" text,\n \"goals\" real\n);\n\nQuestion: What is the average attendance when the rank is 5?" }, { "role": "assistant", "content": "SELECT \"avg_att\" FROM \"1945_63\" WHERE \"rank\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_2_senior_classic_race\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the Speed for Chris Swallow?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"race_2_senior_classic_race\" WHERE \"rider\"='chris swallow';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_2_senior_classic_race\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the speed when the rank is larger than 2, and team is 500cc norton manx?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"race_2_senior_classic_race\" WHERE \"rank\">2 AND \"team\"='500cc norton manx';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_2_senior_classic_race\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the time for Alan Oversby?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"race_2_senior_classic_race\" WHERE \"rider\"='alan oversby';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_2_senior_classic_race\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the Speed when the rank is smaller than 3, and time is 1:06.19.90?" }, { "role": "assistant", "content": "SELECT \"speed\" FROM \"race_2_senior_classic_race\" WHERE \"rank\"<3 AND \"time\"='1:06.19.90';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race_2_senior_classic_race\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: What is the team when the time is 1:11.19.89?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"race_2_senior_classic_race\" WHERE \"time\"='1:11.19.89';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: Which actor plays the character Helga Beimer?" }, { "role": "assistant", "content": "SELECT \"actor\" FROM \"germany\" WHERE \"character\"='helga beimer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: How long did the soap opera run in which Nadine Spru\u00df acted in?" }, { "role": "assistant", "content": "SELECT \"character\" FROM \"germany\" WHERE \"actor\"='nadine spru\u00df';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: How many years did the soap opera run in which the character Clemens Richter was included?" }, { "role": "assistant", "content": "SELECT \"duration\" FROM \"germany\" WHERE \"character\"='clemens richter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"germany\" (\n \"actor\" text,\n \"character\" text,\n \"soap_opera\" text,\n \"years\" text,\n \"duration\" text\n);\n\nQuestion: What years did Marienhof run, which featured Leonore Capell and lasted 10 years?" }, { "role": "assistant", "content": "SELECT \"years\" FROM \"germany\" WHERE \"soap_opera\"='marienhof' AND \"duration\"='10 years' AND \"actor\"='leonore capell';" } ]
[ { "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: Who was the opponent in week 6?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"=6;" } ]
[ { "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's the result when the Carolina Panthers were the opponent?" }, { "role": "assistant", "content": "SELECT \"result\" 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: What date had a result of W 41-0?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"result\"='w 41-0';" } ]
[ { "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's the attendance when the week was more than 16?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"week\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: What was the year of the World Half Marathon Championships with a result of 3rd?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"achievements\" WHERE \"tournament\"='world half marathon championships' AND \"result\"='3rd';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"tournament\" text,\n \"venue\" text,\n \"result\" text,\n \"event\" text\n);\n\nQuestion: What was the result of the tournament in 2001?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"achievements\" WHERE \"year\"=2001;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"modern_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: What is the average capacity for the vehicle having a navigator of Macneall?" }, { "role": "assistant", "content": "SELECT AVG(\"capacity\") FROM \"modern_competition\" WHERE \"navigator\"='macneall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"modern_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: Which vehicle had a class of CM14?" }, { "role": "assistant", "content": "SELECT \"vehicle\" FROM \"modern_competition\" WHERE \"class\"='cm14';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"modern_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: Who was the driver of the vehicle having class of CM22 and navigator of Macneall?" }, { "role": "assistant", "content": "SELECT \"driver\" FROM \"modern_competition\" WHERE \"class\"='cm22' AND \"navigator\"='macneall';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"modern_competition\" (\n \"driver\" text,\n \"navigator\" text,\n \"vehicle\" text,\n \"class\" text,\n \"capacity\" real,\n \"total_time\" text,\n \"margin\" text\n);\n\nQuestion: What is the total time of the vehicle having a navigator of Vandenberg?" }, { "role": "assistant", "content": "SELECT \"total_time\" FROM \"modern_competition\" WHERE \"navigator\"='vandenberg';" } ]
[ { "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: What is the bronze with more than 2 gold and less than 14 total and 4 silver?" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"medal_table\" WHERE \"gold\">2 AND \"total\"<14 AND \"silver\"=4;" } ]
[ { "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: How many silvers are there with a total of 11?" }, { "role": "assistant", "content": "SELECT SUM(\"silver\") FROM \"medal_table\" WHERE \"total\"=11;" } ]
[ { "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: How many silvers are there with more than 2 golds in Germany?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_table\" WHERE \"gold\">2 AND \"nation\"='germany';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinals\" (\n \"heat\" real,\n \"name\" text,\n \"nationality\" text,\n \"reaction\" real,\n \"result\" text\n);\n\nQuestion: What is the average reaction for brigitte foster-hylton after heat 1?" }, { "role": "assistant", "content": "SELECT AVG(\"reaction\") FROM \"semifinals\" WHERE \"heat\">1 AND \"name\"='brigitte foster-hylton';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"round\" real,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"stadium\" text\n);\n\nQuestion: What round did the home team Pohang Steelers play?" }, { "role": "assistant", "content": "SELECT \"round\" FROM \"fixtures\" WHERE \"home_team\"='pohang steelers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fixtures\" (\n \"round\" real,\n \"date\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"attendance\" real,\n \"stadium\" text\n);\n\nQuestion: What is the latest round for Pohang Steelers as the away team?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"fixtures\" WHERE \"away_team\"='pohang steelers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"remixes\" (\n \"year\" real,\n \"artist\" text,\n \"song\" text,\n \"album\" text,\n \"remix\" text\n);\n\nQuestion: what is the album when the remix is dead guys remix and the year is after 2003?" }, { "role": "assistant", "content": "SELECT \"album\" FROM \"remixes\" WHERE \"remix\"='dead guys remix' AND \"year\">2003;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"remixes\" (\n \"year\" real,\n \"artist\" text,\n \"song\" text,\n \"album\" text,\n \"remix\" text\n);\n\nQuestion: what is the album with the song \"party like ur 18\" feat. sway?" }, { "role": "assistant", "content": "SELECT \"album\" FROM \"remixes\" WHERE \"song\"='\\\"party like ur 18\\\" feat. sway';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is Joselito Escobar's Pick number?" }, { "role": "assistant", "content": "SELECT SUM(\"pick\") FROM \"round_1\" WHERE \"player\"='joselito escobar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the Pick 3 Player from East College?" }, { "role": "assistant", "content": "SELECT \"player\" FROM \"round_1\" WHERE \"college\"='east' AND \"pick\"=3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is Ateneo de Manila's PBA Team?" }, { "role": "assistant", "content": "SELECT \"pba_team\" FROM \"round_1\" WHERE \"college\"='ateneo de manila';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the College of the Player from PBA Team Alaska Milkmen with a Pick number of 3 or less?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"round_1\" WHERE \"pick\"<3 AND \"pba_team\"='alaska milkmen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is the College of the Player from San Miguel Beermen PBA Team?" }, { "role": "assistant", "content": "SELECT \"college\" FROM \"round_1\" WHERE \"pba_team\"='san miguel beermen';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_chart\" (\n \"project\" text,\n \"license\" text,\n \"date\" text,\n \"protocol\" text,\n \"technology\" text,\n \"server\" text,\n \"client\" text,\n \"web_client\" text,\n \"multiple_sessions\" text,\n \"encryption\" text,\n \"authentication\" text,\n \"data_compression\" text,\n \"image_quality\" text,\n \"color_quality\" text,\n \"file_transfer\" text,\n \"clipboard_transfer\" text,\n \"chat\" text,\n \"relay\" text,\n \"http_tunnel\" text,\n \"proxy\" text\n);\n\nQuestion: who is the web client when the client is x and the project is goto servers vnc java server (gsvncj)?" }, { "role": "assistant", "content": "SELECT \"web_client\" FROM \"comparison_chart\" WHERE \"client\"='x' AND \"project\"='goto servers vnc java server (gsvncj)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_chart\" (\n \"project\" text,\n \"license\" text,\n \"date\" text,\n \"protocol\" text,\n \"technology\" text,\n \"server\" text,\n \"client\" text,\n \"web_client\" text,\n \"multiple_sessions\" text,\n \"encryption\" text,\n \"authentication\" text,\n \"data_compression\" text,\n \"image_quality\" text,\n \"color_quality\" text,\n \"file_transfer\" text,\n \"clipboard_transfer\" text,\n \"chat\" text,\n \"relay\" text,\n \"http_tunnel\" text,\n \"proxy\" text\n);\n\nQuestion: what is the color quality when the proxy is x, the encryption is x, the webclient is x and authentication is \u2713?" }, { "role": "assistant", "content": "SELECT \"color_quality\" FROM \"comparison_chart\" WHERE \"proxy\"='x' AND \"encryption\"='x' AND \"web_client\"='x' AND \"authentication\"='\u2713';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_chart\" (\n \"project\" text,\n \"license\" text,\n \"date\" text,\n \"protocol\" text,\n \"technology\" text,\n \"server\" text,\n \"client\" text,\n \"web_client\" text,\n \"multiple_sessions\" text,\n \"encryption\" text,\n \"authentication\" text,\n \"data_compression\" text,\n \"image_quality\" text,\n \"color_quality\" text,\n \"file_transfer\" text,\n \"clipboard_transfer\" text,\n \"chat\" text,\n \"relay\" text,\n \"http_tunnel\" text,\n \"proxy\" text\n);\n\nQuestion: what is the color quality when the relay is \u2713?" }, { "role": "assistant", "content": "SELECT \"color_quality\" FROM \"comparison_chart\" WHERE \"relay\"='\u2713';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_chart\" (\n \"project\" text,\n \"license\" text,\n \"date\" text,\n \"protocol\" text,\n \"technology\" text,\n \"server\" text,\n \"client\" text,\n \"web_client\" text,\n \"multiple_sessions\" text,\n \"encryption\" text,\n \"authentication\" text,\n \"data_compression\" text,\n \"image_quality\" text,\n \"color_quality\" text,\n \"file_transfer\" text,\n \"clipboard_transfer\" text,\n \"chat\" text,\n \"relay\" text,\n \"http_tunnel\" text,\n \"proxy\" text\n);\n\nQuestion: what is the proxy when the image quality is \u2713, the encryption is ssl and the license is proprietary?" }, { "role": "assistant", "content": "SELECT \"proxy\" FROM \"comparison_chart\" WHERE \"image_quality\"='\u2713' AND \"encryption\"='ssl' AND \"license\"='proprietary';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"comparison_chart\" (\n \"project\" text,\n \"license\" text,\n \"date\" text,\n \"protocol\" text,\n \"technology\" text,\n \"server\" text,\n \"client\" text,\n \"web_client\" text,\n \"multiple_sessions\" text,\n \"encryption\" text,\n \"authentication\" text,\n \"data_compression\" text,\n \"image_quality\" text,\n \"color_quality\" text,\n \"file_transfer\" text,\n \"clipboard_transfer\" text,\n \"chat\" text,\n \"relay\" text,\n \"http_tunnel\" text,\n \"proxy\" text\n);\n\nQuestion: what is the image quality when the multiple sessions is x, the authentication is \u2713 and the date is may 15, 2007?" }, { "role": "assistant", "content": "SELECT \"image_quality\" FROM \"comparison_chart\" WHERE \"multiple_sessions\"='x' AND \"authentication\"='\u2713' AND \"date\"='may 15, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"45_nm\" (\n \"model_number\" text,\n \"s_spec_number\" text,\n \"frequency\" text,\n \"turbo\" text,\n \"cores\" text,\n \"l2_cache\" text,\n \"l3_cache\" text,\n \"i_o_bus\" text,\n \"mult\" text,\n \"memory\" text,\n \"voltage\" text,\n \"socket\" text,\n \"release_date\" text,\n \"part_number_s\" text,\n \"release_price_usd\" text\n);\n\nQuestion: What is listed for the Cores that has the L3 cache of 8 MB and Model number of Core i7-860?" }, { "role": "assistant", "content": "SELECT \"cores\" FROM \"45_nm\" WHERE \"l3_cache\"='8 mb' AND \"model_number\"='core i7-860';" } ]