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 \"maiden_overs\" (\n \"bowler\" text,\n \"over_no\" real,\n \"venue\" text,\n \"date\" text,\n \"wickets\" text\n);\n\nQuestion: Bowler of shane bond has what lowest overall number?" }, { "role": "assistant", "content": "SELECT MIN(\"over_no\") FROM \"maiden_overs\" WHERE \"bowler\"='shane bond';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"maiden_overs\" (\n \"bowler\" text,\n \"over_no\" real,\n \"venue\" text,\n \"date\" text,\n \"wickets\" text\n);\n\nQuestion: Wickets of chris gayle caught kapali happened on what date?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"maiden_overs\" WHERE \"wickets\"='chris gayle caught kapali';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foundation\" (\n \"member_countries\" text,\n \"population\" real,\n \"area_km\" real,\n \"gdp_billion_us\" real,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the area of a nation has a population under 44,788,852, and a GDP greater than $83.351 billion?" }, { "role": "assistant", "content": "SELECT COUNT(\"area_km\") FROM \"foundation\" WHERE \"gdp_billion_us\">83.351 AND \"population\"<'44,788,852';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foundation\" (\n \"member_countries\" text,\n \"population\" real,\n \"area_km\" real,\n \"gdp_billion_us\" real,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the population of the place that has an area (km\u00b2) of 30,528, and a GDP (billion US$) larger than 58.316?" }, { "role": "assistant", "content": "SELECT SUM(\"population\") FROM \"foundation\" WHERE \"area_km\"='30,528' AND \"gdp_billion_us\">58.316;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foundation\" (\n \"member_countries\" text,\n \"population\" real,\n \"area_km\" real,\n \"gdp_billion_us\" real,\n \"gdp_per_capita_us\" text\n);\n\nQuestion: What is the GDP of the place with over 54,292,038 people and an Area (km\u00b2) greater than 30,528?" }, { "role": "assistant", "content": "SELECT MIN(\"gdp_billion_us\") FROM \"foundation\" WHERE \"population\">'54,292,038' AND \"area_km\">'30,528';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"british_under_18_champions\" (\n \"year\" real,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third\" text\n);\n\nQuestion: What year did Kyle Newman place third?" }, { "role": "assistant", "content": "SELECT \"year\" FROM \"british_under_18_champions\" WHERE \"third\"='kyle newman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"british_under_18_champions\" (\n \"year\" real,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third\" text\n);\n\nQuestion: What was the venue when Jerran Hart won?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"british_under_18_champions\" WHERE \"winner\"='jerran hart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"british_under_18_champions\" (\n \"year\" real,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third\" text\n);\n\nQuestion: Who was the runner-up in 2004?" }, { "role": "assistant", "content": "SELECT \"runner_up\" FROM \"british_under_18_champions\" WHERE \"year\"=2004;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"british_under_18_champions\" (\n \"year\" real,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third\" text\n);\n\nQuestion: What was the venue when Jack Hargreaves finished third?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"british_under_18_champions\" WHERE \"third\"='jack hargreaves';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"british_under_18_champions\" (\n \"year\" real,\n \"venue\" text,\n \"winner\" text,\n \"runner_up\" text,\n \"third\" text\n);\n\nQuestion: What was the venue when Ben Barker finished third?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"british_under_18_champions\" WHERE \"third\"='ben barker';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on tv at 10:00 on the same channel that had Infoman on at 7:30?" }, { "role": "assistant", "content": "SELECT \"10_00\" FROM \"thursday\" WHERE \"7_30\"='infoman';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on tv at 10:00 on the same channel that had movies on at 8:00?" }, { "role": "assistant", "content": "SELECT \"10_00\" FROM \"thursday\" WHERE \"8_00\"='movies';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on tv at 7:00 on the same channel that has Survivor: China on at 8:00?" }, { "role": "assistant", "content": "SELECT \"7_00\" FROM \"thursday\" WHERE \"8_00\"='survivor: china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on tv at 8:00 on the same channel that had Loft Story on at 7:00?" }, { "role": "assistant", "content": "SELECT \"8_00\" FROM \"thursday\" WHERE \"7_00\"='loft story';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"thursday\" (\n \"7_00\" text,\n \"7_30\" text,\n \"8_00\" text,\n \"8_30\" text,\n \"9_00\" text,\n \"9_30\" text,\n \"10_00\" text\n);\n\nQuestion: What is on tv at 9:30 on the same channel that had e2 on at 7:30?" }, { "role": "assistant", "content": "SELECT \"9_30\" FROM \"thursday\" WHERE \"7_30\"='e2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic\" (\n \"city\" text,\n \"province_region\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What province/region is RJTQ located?" }, { "role": "assistant", "content": "SELECT \"province_region\" FROM \"domestic\" WHERE \"icao\"='rjtq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic\" (\n \"city\" text,\n \"province_region\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: In what city is RJSN located?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"domestic\" WHERE \"icao\"='rjsn';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic\" (\n \"city\" text,\n \"province_region\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is RJCM's IATA?" }, { "role": "assistant", "content": "SELECT \"iata\" FROM \"domestic\" WHERE \"icao\"='rjcm';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic\" (\n \"city\" text,\n \"province_region\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: In what country is Hokkaid\u014d and New Chitose airport located?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"domestic\" WHERE \"province_region\"='hokkaid\u014d' AND \"airport\"='new chitose airport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic\" (\n \"city\" text,\n \"province_region\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: In what country is Hiroshima Airport located?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"domestic\" WHERE \"airport\"='hiroshima airport';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"domestic\" (\n \"city\" text,\n \"province_region\" text,\n \"country\" text,\n \"iata\" text,\n \"icao\" text,\n \"airport\" text\n);\n\nQuestion: What is the ICAO of Nakashibetsu?" }, { "role": "assistant", "content": "SELECT \"icao\" FROM \"domestic\" WHERE \"city\"='nakashibetsu';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: What is the total number of games lost when 22 have been played, the losing BP number is 2, and the club is Merthyr RFC?" }, { "role": "assistant", "content": "SELECT \"lost\" FROM \"2011_2012_table\" WHERE \"played\"='22' AND \"losing_bp\"='2' AND \"club\"='merthyr rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: What is the number drawn when 3 have been lost?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"2011_2012_table\" WHERE \"lost\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: What is the number drawn when the try BP is 1?" }, { "role": "assistant", "content": "SELECT \"drawn\" FROM \"2011_2012_table\" WHERE \"try_bp\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: What is the try BP when the losing BP is 4 and the club is Bargoed RFC?" }, { "role": "assistant", "content": "SELECT \"try_bp\" FROM \"2011_2012_table\" WHERE \"losing_bp\"='4' AND \"club\"='bargoed rfc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2011_2012_table\" (\n \"club\" text,\n \"played\" text,\n \"drawn\" text,\n \"lost\" text,\n \"try_bp\" text,\n \"losing_bp\" text\n);\n\nQuestion: What is the club that has played 22 rounds, has a drawn score of 0, has lost 14, and whose losing BP is 5?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"2011_2012_table\" WHERE \"played\"='22' AND \"drawn\"='0' AND \"lost\"='14' AND \"losing_bp\"='5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"total\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What average Total has a Rank of 3 and a Bronze award larger than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"total\" WHERE \"rank\"='3' AND \"bronze\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"total\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What average Total has a Gold award of 13 and a Bronze award less than 13?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"total\" WHERE \"gold\"=13 AND \"bronze\"<13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"total\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average Gold award that has a Silver award greater than 2, and a Bronze award less than 13, and a Total greater than 24?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"total\" WHERE \"silver\">2 AND \"bronze\"<13 AND \"total\">24;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What is the record number of the game where Guardado lost?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='guardado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the lowest attendance recorded at a game on September 28?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"game_log\" WHERE \"date\"='september 28';" } ]
[ { "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\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the average gold that has a total of 2 and more than 1 bronze." }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"total\"=2 AND \"bronze\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2006 result of the Canada Masters tournament that is A in 2009 and A in 2010?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"singles_performance_timeline\" WHERE \"2010\"='a' AND \"2009\"='a' AND \"tournament\"='canada masters';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the result for 2006 of a tournament that is 107 in 2010?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"singles_performance_timeline\" WHERE \"2010\"='107';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2010 result of a tournament that is A in 2006 and A in 2011?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2011\"='a' AND \"2006\"='a';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2012 result of a tournament that is 2R in 2007, 1R in 2008 and 1R in 2009?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"singles_performance_timeline\" WHERE \"2009\"='1r' AND \"2008\"='1r' AND \"2007\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is the 2010 result of a tournament that is 1R in 2009, Q2 in 2011 and 1R in 2012?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"singles_performance_timeline\" WHERE \"2011\"='q2' AND \"2012\"='1r' AND \"2009\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"pre_season_tournaments_and_friendlies\" (\n \"match\" real,\n \"date\" text,\n \"tournament\" text,\n \"location\" text,\n \"opponent_team\" text,\n \"score\" text\n);\n\nQuestion: What match number took place on August 3, 2007?" }, { "role": "assistant", "content": "SELECT MAX(\"match\") FROM \"pre_season_tournaments_and_friendlies\" WHERE \"date\"='august 3, 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2010 value of the 2013 Grand Slam Tournaments?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"mixed_doubles_performance_timeline\" WHERE \"2013\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2012 value with A in 2007 and qf in 2011?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"mixed_doubles_performance_timeline\" WHERE \"2007\"='a' AND \"2011\"='qf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2012 value with a 1r in 2011 in the Australian Open?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"mixed_doubles_performance_timeline\" WHERE \"2011\"='1r' AND \"tournament\"='australian open';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2013 value with a qf in 2011?" }, { "role": "assistant", "content": "SELECT \"2013\" FROM \"mixed_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 \"mixed_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: What is the 2007 value at the 2012 Grand Slam Tournaments?" }, { "role": "assistant", "content": "SELECT \"2007\" FROM \"mixed_doubles_performance_timeline\" WHERE \"2012\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"mixed_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Which tournament had a qf in 2011?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"mixed_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 \"passing_rates\" (\n \"exam\" text,\n \"2006_first_time\" text,\n \"2006_all\" text,\n \"2007_first_time\" text,\n \"2007_all\" text,\n \"2008_first_time\" text,\n \"2008_all\" text,\n \"2009_first_time\" text,\n \"2009_all\" text,\n \"2010_first_time\" text,\n \"2011_first_time\" text,\n \"2012_first_time\" text\n);\n\nQuestion: What is the 2009 first time percentage of the mg general science 5-9 exam with a 2008 first time percentage of 54%?" }, { "role": "assistant", "content": "SELECT \"2009_first_time\" FROM \"passing_rates\" WHERE \"2008_first_time\"='54%' AND \"exam\"='mg general science 5-9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing_rates\" (\n \"exam\" text,\n \"2006_first_time\" text,\n \"2006_all\" text,\n \"2007_first_time\" text,\n \"2007_all\" text,\n \"2008_first_time\" text,\n \"2008_all\" text,\n \"2009_first_time\" text,\n \"2009_all\" text,\n \"2010_first_time\" text,\n \"2011_first_time\" text,\n \"2012_first_time\" text\n);\n\nQuestion: What is the 2008 all percentage of the exam with a 2007 first time percentage of 74%?" }, { "role": "assistant", "content": "SELECT \"2008_all\" FROM \"passing_rates\" WHERE \"2007_first_time\"='74%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing_rates\" (\n \"exam\" text,\n \"2006_first_time\" text,\n \"2006_all\" text,\n \"2007_first_time\" text,\n \"2007_all\" text,\n \"2008_first_time\" text,\n \"2008_all\" text,\n \"2009_first_time\" text,\n \"2009_all\" text,\n \"2010_first_time\" text,\n \"2011_first_time\" text,\n \"2012_first_time\" text\n);\n\nQuestion: What is the 2009 first time percentage of the exam with a 2010 first time percentage of 88%?" }, { "role": "assistant", "content": "SELECT \"2009_first_time\" FROM \"passing_rates\" WHERE \"2010_first_time\"='88%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing_rates\" (\n \"exam\" text,\n \"2006_first_time\" text,\n \"2006_all\" text,\n \"2007_first_time\" text,\n \"2007_all\" text,\n \"2008_first_time\" text,\n \"2008_all\" text,\n \"2009_first_time\" text,\n \"2009_all\" text,\n \"2010_first_time\" text,\n \"2011_first_time\" text,\n \"2012_first_time\" text\n);\n\nQuestion: What is the 2009 all percentage of the exam with a 2007 first time percentage of 49%?" }, { "role": "assistant", "content": "SELECT \"2009_all\" FROM \"passing_rates\" WHERE \"2007_first_time\"='49%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing_rates\" (\n \"exam\" text,\n \"2006_first_time\" text,\n \"2006_all\" text,\n \"2007_first_time\" text,\n \"2007_all\" text,\n \"2008_first_time\" text,\n \"2008_all\" text,\n \"2009_first_time\" text,\n \"2009_all\" text,\n \"2010_first_time\" text,\n \"2011_first_time\" text,\n \"2012_first_time\" text\n);\n\nQuestion: What is the 2006 first time percentage of the exam witha 2009 all percentage of 62%?" }, { "role": "assistant", "content": "SELECT \"2006_first_time\" FROM \"passing_rates\" WHERE \"2009_all\"='62%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"passing_rates\" (\n \"exam\" text,\n \"2006_first_time\" text,\n \"2006_all\" text,\n \"2007_first_time\" text,\n \"2007_all\" text,\n \"2008_first_time\" text,\n \"2008_all\" text,\n \"2009_first_time\" text,\n \"2009_all\" text,\n \"2010_first_time\" text,\n \"2011_first_time\" text,\n \"2012_first_time\" text\n);\n\nQuestion: What is the 2006 first time percentage of the exam with a 2009 all percentage of 72% and a 2007 first time percentage of 85%?" }, { "role": "assistant", "content": "SELECT \"2006_first_time\" FROM \"passing_rates\" WHERE \"2009_all\"='72%' AND \"2007_first_time\"='85%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What was the score for the 2014 FIFA World Cup Qual. competition?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"international_goals\" WHERE \"competition\"='2014 fifa world cup qual.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaches\" (\n \"name\" text,\n \"period\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"efficiency_pct\" text\n);\n\nQuestion: What is the highest number of matches with less than 2 draws that had an efficiency percent of 25%?" }, { "role": "assistant", "content": "SELECT MAX(\"matches\") FROM \"coaches\" WHERE \"draws\"<2 AND \"efficiency_pct\"='25%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"coaches\" (\n \"name\" text,\n \"period\" text,\n \"matches\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"efficiency_pct\" text\n);\n\nQuestion: What is the total number of Draws with less than 4 matches?" }, { "role": "assistant", "content": "SELECT COUNT(\"draws\") FROM \"coaches\" WHERE \"matches\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"analogue_radio_programmes\" (\n \"program\" text,\n \"frequency_m_hz\" real,\n \"erp_k_w\" real,\n \"polarisation\" text,\n \"antenna_diagram_around_nd_directional_d\" text\n);\n\nQuestion: What is the average MHz Frequency of radio rezonans?" }, { "role": "assistant", "content": "SELECT AVG(\"frequency_m_hz\") FROM \"analogue_radio_programmes\" WHERE \"program\"='radio rezonans';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What date shows a Loss of lilly (2\u20132)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='lilly (2\u20132)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What is the loss when the time was 3:16, and a Record of 15\u201315?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"time\"='3:16' AND \"record\"='15\u201315';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What team was the opponent when the time was 2:57, and a Score of 7\u20135?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"time\"='2:57' AND \"score\"='7\u20135';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What date was the loss of ponson (4\u20133)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='ponson (4\u20133)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"time\" text,\n \"att\" text,\n \"record\" text\n);\n\nQuestion: What date was the loss of sparks (0\u20131)?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='sparks (0\u20131)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text\n);\n\nQuestion: What is the position of the competition in Tampere, Finland?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"achievements\" WHERE \"venue\"='tampere, finland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montenegro_versus_other_countries\" (\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goal_difference\" text,\n \"total\" real\n);\n\nQuestion: What is the lowest total that has draws less than 2 and wins less than 1, losses bigger than 1 with a goal difference of 1:2" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"montenegro_versus_other_countries\" WHERE \"draws\"<2 AND \"wins\"<1 AND \"goal_difference\"='1:2' AND \"losses\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montenegro_versus_other_countries\" (\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goal_difference\" text,\n \"total\" real\n);\n\nQuestion: What is the average number of draws that have a total of 1 and a goal difference of 2:0?" }, { "role": "assistant", "content": "SELECT AVG(\"draws\") FROM \"montenegro_versus_other_countries\" WHERE \"total\"=1 AND \"goal_difference\"='2:0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"montenegro_versus_other_countries\" (\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goal_difference\" text,\n \"total\" real\n);\n\nQuestion: What is the lowest number of draws that have a goal difference of 0:2 and wins greater than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"draws\") FROM \"montenegro_versus_other_countries\" WHERE \"goal_difference\"='0:2' AND \"wins\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"avg_attendance\" text\n);\n\nQuestion: What regular season had an average attendance of 1,242?" }, { "role": "assistant", "content": "SELECT \"reg_season\" FROM \"year_by_year\" WHERE \"avg_attendance\"='1,242';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"avg_attendance\" text\n);\n\nQuestion: What league has an average attendance of 244?" }, { "role": "assistant", "content": "SELECT \"league\" FROM \"year_by_year\" WHERE \"avg_attendance\"='244';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: On what date was the opponent the White Sox and the record 18-13?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"game_log\" WHERE \"opponent\"='white sox' AND \"record\"='18-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the average attendance when the record was 19-13?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"game_log\" WHERE \"record\"='19-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the Loss when the opponent was the Rangers and the attendance was greater than 43,211?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"opponent\"='rangers' AND \"attendance\">'43,211';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_performance_statistics\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was the 2012 result associated with a 2007 finish of 2R and a 2009 of 1R?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"single_performance_statistics\" WHERE \"2007\"='2r' AND \"2009\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_performance_statistics\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was the 2009 result associated with a 2012 of 1R and a 2007 of 2R?" }, { "role": "assistant", "content": "SELECT \"2009\" FROM \"single_performance_statistics\" WHERE \"2012\"='1r' AND \"2007\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_performance_statistics\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What was the 2008 result associated with a 2009 of A and a 2011 of 2R?" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"single_performance_statistics\" WHERE \"2009\"='a' AND \"2011\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"single_performance_statistics\" (\n \"tournament\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: In which tournament did Pauline Parmentier finish LQ in 2007?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"single_performance_statistics\" WHERE \"2007\"='lq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foreign_players\" (\n \"country\" text,\n \"player_name\" text,\n \"period\" text,\n \"position\" text,\n \"matches\" text,\n \"goals\" text\n);\n\nQuestion: Name the player name with matches of 51" }, { "role": "assistant", "content": "SELECT \"player_name\" FROM \"foreign_players\" WHERE \"matches\"='51';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foreign_players\" (\n \"country\" text,\n \"player_name\" text,\n \"period\" text,\n \"position\" text,\n \"matches\" text,\n \"goals\" text\n);\n\nQuestion: Name the position for brazil 2008 with goals of 0 1" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"foreign_players\" WHERE \"country\"='brazil' AND \"period\"='2008' AND \"goals\"='0 1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foreign_players\" (\n \"country\" text,\n \"player_name\" text,\n \"period\" text,\n \"position\" text,\n \"matches\" text,\n \"goals\" text\n);\n\nQuestion: Name the goals with matches of 21" }, { "role": "assistant", "content": "SELECT \"goals\" FROM \"foreign_players\" WHERE \"matches\"='21';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"foreign_players\" (\n \"country\" text,\n \"player_name\" text,\n \"period\" text,\n \"position\" text,\n \"matches\" text,\n \"goals\" text\n);\n\nQuestion: Name the period with matches of 0 0 of portugal" }, { "role": "assistant", "content": "SELECT \"period\" FROM \"foreign_players\" WHERE \"matches\"='0 0' AND \"country\"='portugal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: Name the opponents for round of round 5" }, { "role": "assistant", "content": "SELECT \"opponents\" FROM \"fa_cup\" WHERE \"round\"='round 5';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: Name the attendance for 4 january 2004" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"fa_cup\" WHERE \"date\"='4 january 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_cup\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: Name the most attendance for 25 january 2004" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"fa_cup\" WHERE \"date\"='25 january 2004';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"knockout_phase\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the average Attendance for the final round?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"knockout_phase\" WHERE \"round\"='final';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"knockout_phase\" (\n \"date\" text,\n \"round\" text,\n \"opponents\" text,\n \"h_a\" text,\n \"result_f_a\" text,\n \"attendance\" real\n);\n\nQuestion: What is the smallest number of people to attend a game with an H/A of h and the opponent was Roma?" }, { "role": "assistant", "content": "SELECT MIN(\"attendance\") FROM \"knockout_phase\" WHERE \"h_a\"='h' AND \"opponents\"='roma';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_chapters_per_point_of_view_cha\" (\n \"pov_character\" text,\n \"game\" text,\n \"clash\" text,\n \"storm\" text,\n \"feast\" text,\n \"dance\" text\n);\n\nQuestion: Which game does the quentyn martell have?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"number_of_chapters_per_point_of_view_cha\" WHERE \"pov_character\"='quentyn martell';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"number_of_chapters_per_point_of_view_cha\" (\n \"pov_character\" text,\n \"game\" text,\n \"clash\" text,\n \"storm\" text,\n \"feast\" text,\n \"dance\" text\n);\n\nQuestion: Which storm has a clash of 3 and a dance of 4?" }, { "role": "assistant", "content": "SELECT \"storm\" FROM \"number_of_chapters_per_point_of_view_cha\" WHERE \"dance\"='4' AND \"clash\"='3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Name the melbourne with perth, adelaide and auckland of no with sydney of yes" }, { "role": "assistant", "content": "SELECT \"melbourne\" FROM \"2007\" WHERE \"perth\"='no' AND \"adelaide\"='no' AND \"auckland\"='no' AND \"sydney\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Name the gold coast which has an auckland of no and melbourne of yes" }, { "role": "assistant", "content": "SELECT \"gold_coast\" FROM \"2007\" WHERE \"auckland\"='no' AND \"melbourne\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Name the sydney with perth of no, adelaide of no with melbourne of yes and gold coast of yes" }, { "role": "assistant", "content": "SELECT \"sydney\" FROM \"2007\" WHERE \"perth\"='no' AND \"adelaide\"='no' AND \"melbourne\"='yes' AND \"gold_coast\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Name the Adelaide for Sydney of yes and Perth of yes" }, { "role": "assistant", "content": "SELECT \"adelaide\" FROM \"2007\" WHERE \"sydney\"='yes' AND \"perth\"='yes';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007\" (\n \"sydney\" text,\n \"melbourne\" text,\n \"perth\" text,\n \"adelaide\" text,\n \"gold_coast\" text,\n \"auckland\" text\n);\n\nQuestion: Name the melbourne for adelaide of no with auckland of yes and gold coast of yes" }, { "role": "assistant", "content": "SELECT \"melbourne\" FROM \"2007\" WHERE \"adelaide\"='no' AND \"auckland\"='yes' AND \"gold_coast\"='no';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_stanthorpe\" real,\n \"population_warwick\" real,\n \"population_allora\" real,\n \"population_glengallan\" real,\n \"population_rosenthal\" real\n);\n\nQuestion: What is the total population of Rosenthal that's less than 24,300 for the population and has a population for Glengallan less than 3,410?" }, { "role": "assistant", "content": "SELECT SUM(\"population_rosenthal\") FROM \"population\" WHERE \"population_region_total\"<'24,300' AND \"population_glengallan\"<'3,410';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_stanthorpe\" real,\n \"population_warwick\" real,\n \"population_allora\" real,\n \"population_glengallan\" real,\n \"population_rosenthal\" real\n);\n\nQuestion: What is the greatest Rosenthal poulation for a region that has 30,554 people and a Glegallan population less than 4,088?" }, { "role": "assistant", "content": "SELECT MAX(\"population_rosenthal\") FROM \"population\" WHERE \"population_region_total\"='30,554' AND \"population_glengallan\"<'4,088';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_stanthorpe\" real,\n \"population_warwick\" real,\n \"population_allora\" real,\n \"population_glengallan\" real,\n \"population_rosenthal\" real\n);\n\nQuestion: How many people are there for Glengallan having a Rosenthal population less than 1,582 for years before 1976 with a total population of 25,917?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_glengallan\") FROM \"population\" WHERE \"population_rosenthal\"<'1,582' AND \"year\"<1976 AND \"population_region_total\"='25,917';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_stanthorpe\" real,\n \"population_warwick\" real,\n \"population_allora\" real,\n \"population_glengallan\" real,\n \"population_rosenthal\" real\n);\n\nQuestion: How many people live in an area that has a population in Rosenthal smaller than 2,460 while having a population of 4,639 for Glegallan as well as having an Allora population greater than 2,106?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_region_total\") FROM \"population\" WHERE \"population_rosenthal\"<'2,460' AND \"population_glengallan\"='4,639' AND \"population_allora\">'2,106';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_stanthorpe\" real,\n \"population_warwick\" real,\n \"population_allora\" real,\n \"population_glengallan\" real,\n \"population_rosenthal\" real\n);\n\nQuestion: When were the years on which warwick had a population greater than 10,956 and allora had a population bigger than 2,439?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"population\" WHERE \"population_warwick\"='10,956' AND \"population_allora\">'2,439';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"population\" (\n \"year\" real,\n \"population_region_total\" real,\n \"population_stanthorpe\" real,\n \"population_warwick\" real,\n \"population_allora\" real,\n \"population_glengallan\" real,\n \"population_rosenthal\" real\n);\n\nQuestion: How many people in Stanthorpe had a population matching Rosenthan of 1,553 and a population greater than 25,917?" }, { "role": "assistant", "content": "SELECT COUNT(\"population_stanthorpe\") FROM \"population\" WHERE \"population_rosenthal\"='1,553' AND \"population_region_total\">'25,917';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_ministers_for_energy\" (\n \"minister\" text,\n \"party\" text,\n \"start_date\" text,\n \"end_date\" text,\n \"prime_minister\" text\n);\n\nQuestion: Who is the Prime Minister of Antoine Wehenkel?" }, { "role": "assistant", "content": "SELECT \"prime_minister\" FROM \"list_of_ministers_for_energy\" WHERE \"minister\"='antoine wehenkel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the least amount of wins earlier than 1964 with more than 7 points?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"motorcycle_grand_prix_results\" WHERE \"year\"<1964 AND \"points\">7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the least points for class 125cc with 1 win earlier than 1961?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='125cc' AND \"wins\"=1 AND \"year\"<1961;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the number of wins when there are 7 points?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"motorcycle_grand_prix_results\" WHERE \"points\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What is the least amount of points when there is 1 win?" }, { "role": "assistant", "content": "SELECT MIN(\"points\") FROM \"motorcycle_grand_prix_results\" WHERE \"wins\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"final_table\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"points\" text,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real\n);\n\nQuestion: What club has more than 35 goals, more than 7 draws, and 20 losses?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"final_table\" WHERE \"goals_for\">35 AND \"draws\">7 AND \"losses\"=20;" } ]