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 \"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\" text,\n \"league_cup_goals\" real,\n \"total_apps\" text,\n \"total_goals\" real\n);\n\nQuestion: how many times is the fa cup apps more than 0, the position mf and the league goals 4?" }, { "role": "assistant", "content": "SELECT COUNT(\"total_goals\") FROM \"appearances_and_goals\" WHERE \"fa_cup_apps\">0 AND \"position\"='mf' AND \"league_goals\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the district with more than 1,246,756 electorates and a constituency number of 191?" }, { "role": "assistant", "content": "SELECT \"district\" FROM \"assembly_segments\" WHERE \"number_of_electorates_2009\">'1,246,756' AND \"constituency_number\"='191';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the total number of electorates in 2009 with a constituency of 193?" }, { "role": "assistant", "content": "SELECT COUNT(\"number_of_electorates_2009\") FROM \"assembly_segments\" WHERE \"constituency_number\"='193';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"assembly_segments\" (\n \"constituency_number\" text,\n \"name\" text,\n \"reserved_for_sc_st_none\" text,\n \"district\" text,\n \"number_of_electorates_2009\" real\n);\n\nQuestion: What is the reserved for the constituency of 192?" }, { "role": "assistant", "content": "SELECT \"reserved_for_sc_st_none\" FROM \"assembly_segments\" WHERE \"constituency_number\"='192';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results_of_heat_9\" (\n \"draw\" real,\n \"artist\" text,\n \"song\" text,\n \"percentage\" text,\n \"place\" real\n);\n\nQuestion: Which Artist has a Percentage of 11.32%?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"results_of_heat_9\" WHERE \"percentage\"='11.32%';" } ]
[ { "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 week for November 28, 1982?" }, { "role": "assistant", "content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"date\"='november 28, 1982';" } ]
[ { "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 number when the result is l 41-37?" }, { "role": "assistant", "content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"result\"='l 41-37';" } ]
[ { "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 in a week earlier than 4, and result is w 31-20?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"week\"<4 AND \"result\"='w 31-20';" } ]
[ { "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 opponent in a week larger than 1, with a result of l 21-20?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\">1 AND \"result\"='l 21-20';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sports\" (\n \"club\" text,\n \"sport\" text,\n \"founded\" real,\n \"league\" text,\n \"venue\" text\n);\n\nQuestion: What sport was played by the team founded in 2010?" }, { "role": "assistant", "content": "SELECT \"sport\" FROM \"sports\" WHERE \"founded\"=2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sports\" (\n \"club\" text,\n \"sport\" text,\n \"founded\" real,\n \"league\" text,\n \"venue\" text\n);\n\nQuestion: What club team was founded before 2011 and plays at the champion window field?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"sports\" WHERE \"founded\"<2011 AND \"venue\"='champion window field';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sports\" (\n \"club\" text,\n \"sport\" text,\n \"founded\" real,\n \"league\" text,\n \"venue\" text\n);\n\nQuestion: How many different dates are there for founded teams for the venue of champion window field?" }, { "role": "assistant", "content": "SELECT COUNT(\"founded\") FROM \"sports\" WHERE \"venue\"='champion window field';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"sports\" (\n \"club\" text,\n \"sport\" text,\n \"founded\" real,\n \"league\" text,\n \"venue\" text\n);\n\nQuestion: What club team plays at the champion window field?" }, { "role": "assistant", "content": "SELECT \"club\" FROM \"sports\" WHERE \"venue\"='champion window field';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_trend\" (\n \"year\" real,\n \"gross_domestic_product\" real,\n \"us_dollar_exchange\" text,\n \"inflation_index_2000_100\" real,\n \"per_capita_income_as_pct_of_usa\" real\n);\n\nQuestion: How much Gross Domestic Product has a US Dollar Exchange of 12.19 algerian dinars, and an Inflation Index (2000=100) larger than 22?" }, { "role": "assistant", "content": "SELECT SUM(\"gross_domestic_product\") FROM \"historical_trend\" WHERE \"us_dollar_exchange\"='12.19 algerian dinars' AND \"inflation_index_2000_100\">22;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_trend\" (\n \"year\" real,\n \"gross_domestic_product\" real,\n \"us_dollar_exchange\" text,\n \"inflation_index_2000_100\" real,\n \"per_capita_income_as_pct_of_usa\" real\n);\n\nQuestion: Which Gross Domestic Product has an Inflation Index (2000=100) smaller than 9.3?" }, { "role": "assistant", "content": "SELECT AVG(\"gross_domestic_product\") FROM \"historical_trend\" WHERE \"inflation_index_2000_100\"<9.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"historical_trend\" (\n \"year\" real,\n \"gross_domestic_product\" real,\n \"us_dollar_exchange\" text,\n \"inflation_index_2000_100\" real,\n \"per_capita_income_as_pct_of_usa\" real\n);\n\nQuestion: Which Inflation Index (2000=100) has a Per Capita Income (as % of USA) of 10.65, and a Year smaller than 1990?" }, { "role": "assistant", "content": "SELECT MAX(\"inflation_index_2000_100\") FROM \"historical_trend\" WHERE \"per_capita_income_as_pct_of_usa\"=10.65 AND \"year\"<1990;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1935\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What release date has 6998 as the production num.?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1935\" WHERE \"production_num\"='6998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1935\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What director has lt as the series, with 6982 as the production num.?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"1935\" WHERE \"series\"='lt' AND \"production_num\"='6982';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1935\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What series has 1935-07-13 as the release date?" }, { "role": "assistant", "content": "SELECT \"series\" FROM \"1935\" WHERE \"release_date\"='1935-07-13';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1935\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_num\" text,\n \"release_date\" text\n);\n\nQuestion: What title has lt as the series, ben hardaway as the director, with 6612 as the production num.?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"1935\" WHERE \"series\"='lt' AND \"director\"='ben hardaway' AND \"production_num\"='6612';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"albums_as\" (\n \"year\" real,\n \"title\" text,\n \"type\" text,\n \"label\" text,\n \"label_nr\" text\n);\n\nQuestion: What is the song title from 1963 on the Pacific Jazz label, and a Label-Nr of st-81?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"albums_as\" WHERE \"label\"='pacific jazz' AND \"year\"=1963 AND \"label_nr\"='st-81';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"albums_as\" (\n \"year\" real,\n \"title\" text,\n \"type\" text,\n \"label\" text,\n \"label_nr\" text\n);\n\nQuestion: What is the earliest year with a label-Nr of st-43?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"albums_as\" WHERE \"label_nr\"='st-43';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"albums_as\" (\n \"year\" real,\n \"title\" text,\n \"type\" text,\n \"label\" text,\n \"label_nr\" text\n);\n\nQuestion: What is the song title on the Pacific Jazz label, and a Label-Nr of st-20124?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"albums_as\" WHERE \"label\"='pacific jazz' AND \"label_nr\"='st-20124';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"albums_as\" (\n \"year\" real,\n \"title\" text,\n \"type\" text,\n \"label\" text,\n \"label_nr\" text\n);\n\nQuestion: What is the type earlier than 1968, and a Title of stretchin' out?" }, { "role": "assistant", "content": "SELECT \"type\" FROM \"albums_as\" WHERE \"year\"<1968 AND \"title\"='stretchin'' out';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: what is the team that is pick 31?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"supplemental_first_round_selections\" WHERE \"pick\"=31;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: what is the position when the pick is higher than 32 and the team is atlanta braves?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"supplemental_first_round_selections\" WHERE \"pick\">32 AND \"team\"='atlanta braves';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"supplemental_first_round_selections\" (\n \"pick\" real,\n \"player\" text,\n \"team\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: what is the position when the pick is higher than 33 and the school is tottenville hs (staten island, ny)?" }, { "role": "assistant", "content": "SELECT \"position\" FROM \"supplemental_first_round_selections\" WHERE \"pick\">33 AND \"school\"='tottenville hs (staten island, ny)';" } ]
[ { "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 of the game in Week 12?" }, { "role": "assistant", "content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"week\"=12;" } ]
[ { "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 Opponent on December 3, 1979?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='december 3, 1979';" } ]
[ { "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 Result of the game against Philadelphia Eagles?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"opponent\"='philadelphia eagles';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is the score March 27?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"playoffs\" WHERE \"date\"='march 27';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is the score for the game larger than 4 in series 3-2?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"playoffs\" WHERE \"game\">4 AND \"series\"='3-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is the game number for series 4-2?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"playoffs\" WHERE \"series\"='4-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What date has a game smaller than 4, and a score of 116-114?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"playoffs\" WHERE \"game\"<4 AND \"score\"='116-114';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What is the game number on April 7?" }, { "role": "assistant", "content": "SELECT COUNT(\"game\") FROM \"playoffs\" WHERE \"date\"='april 7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"matches\" (\n \"opposing_team\" text,\n \"against\" real,\n \"date\" text,\n \"venue\" text,\n \"status\" text\n);\n\nQuestion: Which Opposing Team has an Against smaller than 19, and a Date of 20/05/1979?" }, { "role": "assistant", "content": "SELECT \"opposing_team\" FROM \"matches\" WHERE \"against\"<19 AND \"date\"='20/05/1979';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1958\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" real,\n \"release_date\" text\n);\n\nQuestion: What was the production number of the episode titel of pre-hysterical hare?" }, { "role": "assistant", "content": "SELECT COUNT(\"production_number\") FROM \"1958\" WHERE \"title\"='pre-hysterical hare';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1958\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" real,\n \"release_date\" text\n);\n\nQuestion: What director had a production number of 1490?" }, { "role": "assistant", "content": "SELECT \"director\" FROM \"1958\" WHERE \"production_number\"=1490;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1958\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"production_number\" real,\n \"release_date\" text\n);\n\nQuestion: Which title was directed by chuck jones and released on 1958-04-12?" }, { "role": "assistant", "content": "SELECT \"title\" FROM \"1958\" WHERE \"director\"='chuck jones' AND \"release_date\"='1958-04-12';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: Which Name has a Time larger than 53.06, and a Lane smaller than 8, and a Rank larger than 2, and a Nationality of japan?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"semifinal_1\" WHERE \"time\">53.06 AND \"lane\"<8 AND \"rank\">2 AND \"nationality\"='japan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: How many lanes have a Time of 53.61, and a Rank larger than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"lane\") FROM \"semifinal_1\" WHERE \"time\"=53.61 AND \"rank\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may_bumps\" (\n \"year\" real,\n \"finish_position\" text,\n \"1st_day\" text,\n \"2nd_day\" text,\n \"3rd_day\" text,\n \"4th_day\" text\n);\n\nQuestion: What is the 3rd day result when the 2nd day was rowed-over in 2010?" }, { "role": "assistant", "content": "SELECT \"3rd_day\" FROM \"may_bumps\" WHERE \"2nd_day\"='rowed-over' AND \"year\"=2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may_bumps\" (\n \"year\" real,\n \"finish_position\" text,\n \"1st_day\" text,\n \"2nd_day\" text,\n \"3rd_day\" text,\n \"4th_day\" text\n);\n\nQuestion: What is the 3rd day result when the 4th day was bumped Fitzwilliam?" }, { "role": "assistant", "content": "SELECT \"3rd_day\" FROM \"may_bumps\" WHERE \"4th_day\"='bumped fitzwilliam';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may_bumps\" (\n \"year\" real,\n \"finish_position\" text,\n \"1st_day\" text,\n \"2nd_day\" text,\n \"3rd_day\" text,\n \"4th_day\" text\n);\n\nQuestion: What is the finish position in the year prior to 2009?" }, { "role": "assistant", "content": "SELECT \"finish_position\" FROM \"may_bumps\" WHERE \"year\"<2009;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"may_bumps\" (\n \"year\" real,\n \"finish_position\" text,\n \"1st_day\" text,\n \"2nd_day\" text,\n \"3rd_day\" text,\n \"4th_day\" text\n);\n\nQuestion: What is the result for the first day in a year prior to 2011 when the 4th day's result is bumped Girton?" }, { "role": "assistant", "content": "SELECT \"1st_day\" FROM \"may_bumps\" WHERE \"year\"<2011 AND \"4th_day\"='bumped girton';" } ]
[ { "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\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: Which #/ County has a Location of ossian?" }, { "role": "assistant", "content": "SELECT \"num_county\" FROM \"membership\" WHERE \"location\"='ossian';" } ]
[ { "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\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: How much Enrollment has an IHSAA Class of aaaaa, and a Mascot of spartans?" }, { "role": "assistant", "content": "SELECT COUNT(\"enrollment\") FROM \"membership\" WHERE \"ihsaa_class\"='aaaaa' AND \"mascot\"='spartans';" } ]
[ { "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\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: How much Enrollment has a School of fort wayne homestead?" }, { "role": "assistant", "content": "SELECT SUM(\"enrollment\") FROM \"membership\" WHERE \"school\"='fort wayne homestead';" } ]
[ { "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\" real,\n \"ihsaa_class\" text,\n \"num_county\" text\n);\n\nQuestion: Which IHSAA Class has a Location of columbia city?" }, { "role": "assistant", "content": "SELECT \"ihsaa_class\" FROM \"membership\" WHERE \"location\"='columbia city';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game with a score of 111-106?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"score\"='111-106';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the location of the game with a score of 113-106?" }, { "role": "assistant", "content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"score\"='113-106';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"pick\" real,\n \"team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest pick number for a pick drafted by the denver broncos?" }, { "role": "assistant", "content": "SELECT MAX(\"pick\") FROM \"third_round\" WHERE \"team\"='denver broncos';" } ]
[ { "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 opponent has l 27-7 as the result?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='l 27-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: How many weeks has 54,187 as the attendance?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\"='54,187';" } ]
[ { "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: How many weeks have an attendance greater than 55,121, and l 27-7 as the result?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"attendance\">'55,121' AND \"result\"='l 27-7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_15_10_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: What tournament had Alberta Brianti as an opponent with a score of 6-4 2-6 6-2?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles_15_10_5\" WHERE \"opponent\"='alberta brianti' AND \"score\"='6-4 2-6 6-2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles_15_10_5\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"opponent\" text,\n \"score\" text\n);\n\nQuestion: When was the score 3-6 4-6?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"singles_15_10_5\" WHERE \"score\"='3-6 4-6';" } ]
[ { "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 \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the Rank of the Swimmer with a Time of 2:25.65 in a Lane larger than 3?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"semifinal_2\" WHERE \"time\"='2:25.65' AND \"lane\">3;" } ]
[ { "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 \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the Rank of Qi Hui?" }, { "role": "assistant", "content": "SELECT COUNT(\"rank\") FROM \"semifinal_2\" WHERE \"name\"='qi hui';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"millewa\" text,\n \"wins\" real,\n \"forfeits\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many Forfeits have Wins smaller than 8, and Losses larger than 16?" }, { "role": "assistant", "content": "SELECT COUNT(\"forfeits\") FROM \"2012_ladder\" WHERE \"wins\"<8 AND \"losses\">16;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"millewa\" text,\n \"wins\" real,\n \"forfeits\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many Losses have a Millewa of nangiloc?" }, { "role": "assistant", "content": "SELECT COUNT(\"losses\") FROM \"2012_ladder\" WHERE \"millewa\"='nangiloc';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2012_ladder\" (\n \"millewa\" text,\n \"wins\" real,\n \"forfeits\" real,\n \"losses\" real,\n \"draws\" real,\n \"against\" real\n);\n\nQuestion: How many Losses have Draws larger than 0?" }, { "role": "assistant", "content": "SELECT MAX(\"losses\") FROM \"2012_ladder\" WHERE \"draws\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"volleyball_at_the_2008_summer_olympics_w\" (\n \"name\" text,\n \"height\" text,\n \"weight\" text,\n \"spike\" text,\n \"2008_club\" text\n);\n\nQuestion: What is the spike for the club of d.c. in 2008?" }, { "role": "assistant", "content": "SELECT \"spike\" FROM \"volleyball_at_the_2008_summer_olympics_w\" WHERE \"2008_club\"='d.c.';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the average rank of Elise Matthysen in lanes under 8?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"semifinal_1\" WHERE \"name\"='elise matthysen' AND \"lane\"<8;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What is the time of Yuliya Yefimova?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"semifinal_1\" WHERE \"name\"='yuliya yefimova';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_1\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: Who was from Great Britain in lanes under number 3?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"semifinal_1\" WHERE \"lane\"<3 AND \"nationality\"='great britain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_6_2\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"serial_numbers\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text,\n \"year_s_retired\" text\n);\n\nQuestion: What wheel arrangement was made in 1910?" }, { "role": "assistant", "content": "SELECT \"wheel_arrangement\" FROM \"4_6_2\" WHERE \"year_made\"='1910';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"4_6_2\" (\n \"class\" text,\n \"wheel_arrangement\" text,\n \"fleet_number_s\" text,\n \"manufacturer\" text,\n \"serial_numbers\" text,\n \"year_made\" text,\n \"quantity_made\" text,\n \"quantity_preserved\" text,\n \"year_s_retired\" text\n);\n\nQuestion: What year were the retired serial numbers 27317\u201327336?" }, { "role": "assistant", "content": "SELECT \"year_s_retired\" FROM \"4_6_2\" WHERE \"serial_numbers\"='27317\u201327336';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Surface has a score of 7-5, 5-7, 6-3?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_titles\" WHERE \"score\"='7-5, 5-7, 6-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which tournament has a Score of 6-4, 6-4?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"doubles_titles\" WHERE \"score\"='6-4, 6-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the Surface on during 10 November 2006?" }, { "role": "assistant", "content": "SELECT \"surface\" FROM \"doubles_titles\" WHERE \"date\"='10 november 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the Score on 25 May 2007?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"doubles_titles\" WHERE \"date\"='25 may 2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: What was the score on 10 November 2006?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"doubles_titles\" WHERE \"date\"='10 november 2006';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_titles\" (\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partnering\" text,\n \"opponents_in_the_final\" text,\n \"score\" text\n);\n\nQuestion: Which Partnering has a Score of 6-3, 4-6, 6-4?" }, { "role": "assistant", "content": "SELECT \"partnering\" FROM \"doubles_titles\" WHERE \"score\"='6-3, 4-6, 6-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank for the man from China with notes of QS?" }, { "role": "assistant", "content": "SELECT MAX(\"rank\") FROM \"heat_2\" WHERE \"notes\"='qs' AND \"country\"='china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the rank for the competitor from Bulgaria?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"heat_2\" WHERE \"country\"='bulgaria';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: Which athlete is ranked below 5 and is from China?" }, { "role": "assistant", "content": "SELECT \"athletes\" FROM \"heat_2\" WHERE \"rank\"<5 AND \"country\"='china';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kotaku\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Which game was a Platformer?" }, { "role": "assistant", "content": "SELECT \"game\" FROM \"kotaku\" WHERE \"genre\"='platformer';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kotaku\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Who was the developer of XCom: Enemy Unknown?" }, { "role": "assistant", "content": "SELECT \"developer_s\" FROM \"kotaku\" WHERE \"game\"='xcom: enemy unknown';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"kotaku\" (\n \"year\" real,\n \"game\" text,\n \"genre\" text,\n \"platform_s\" text,\n \"developer_s\" text\n);\n\nQuestion: Which platform was Red Dead Redemption for?" }, { "role": "assistant", "content": "SELECT \"platform_s\" FROM \"kotaku\" WHERE \"game\"='red dead redemption';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"name\" text,\n \"egyptian_premier_league\" real,\n \"egypt_cup\" real,\n \"caf_champions_league\" real,\n \"total\" real\n);\n\nQuestion: What is the highest total for players with under 2 Egyptian Premier League goals and 0 Egypt Cup goals?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"top_scorers\" WHERE \"egyptian_premier_league\"<2 AND \"egypt_cup\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"top_scorers\" (\n \"name\" text,\n \"egyptian_premier_league\" real,\n \"egypt_cup\" real,\n \"caf_champions_league\" real,\n \"total\" real\n);\n\nQuestion: What is the aveage Egypt Cup value for players with 0 CAF Champions League goals, 6 Egyptian Premier League goals, and totals under 6?" }, { "role": "assistant", "content": "SELECT AVG(\"egypt_cup\") FROM \"top_scorers\" WHERE \"caf_champions_league\"=0 AND \"egyptian_premier_league\"=6 AND \"total\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: how many times is gold more than 0 and the rank less than 2?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_count_by_country\" WHERE \"gold\">0 AND \"rank\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the highest total when the nation is france and silver is more than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"total\") FROM \"medal_count_by_country\" WHERE \"nation\"='france' AND \"silver\">1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: what is the least silver for germany when gold is more than 4?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"medal_count_by_country\" WHERE \"nation\"='germany' AND \"gold\">4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_count_by_country\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many times is the total less than 15, rank less than 5, bronze is 4 and gold smaller than 3?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medal_count_by_country\" WHERE \"total\"<15 AND \"rank\"<5 AND \"bronze\"=4 AND \"gold\"<3;" } ]
[ { "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 venue did the game on september 5, 1998 take place at?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"date\"='september 5, 1998';" } ]
[ { "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 venue did the 2000 tiger cup take place at on November 10, 2000?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"international_goals\" WHERE \"competition\"='2000 tiger cup' AND \"date\"='november 10, 2000';" } ]
[ { "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 date had a game with a score of 5-4?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"international_goals\" WHERE \"score\"='5-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_districts\" (\n \"district\" text,\n \"s_barangay\" real,\n \"population_2010_census\" real,\n \"area_has\" real,\n \"pop_density_per_km2\" real\n);\n\nQuestion: What is the total of Barangay with an area larger than 865.13?" }, { "role": "assistant", "content": "SELECT SUM(\"s_barangay\") FROM \"administrative_districts\" WHERE \"area_has\">865.13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_districts\" (\n \"district\" text,\n \"s_barangay\" real,\n \"population_2010_census\" real,\n \"area_has\" real,\n \"pop_density_per_km2\" real\n);\n\nQuestion: What is the lowest population density for the district of Santa Cruz and a Barangay larger than 82?" }, { "role": "assistant", "content": "SELECT MIN(\"pop_density_per_km2\") FROM \"administrative_districts\" WHERE \"district\"='santa cruz' AND \"s_barangay\">82;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_districts\" (\n \"district\" text,\n \"s_barangay\" real,\n \"population_2010_census\" real,\n \"area_has\" real,\n \"pop_density_per_km2\" real\n);\n\nQuestion: What is the highest population density that is less than 115,942 and a Barangay less than 82?" }, { "role": "assistant", "content": "SELECT MAX(\"pop_density_per_km2\") FROM \"administrative_districts\" WHERE \"population_2010_census\"<'115,942' AND \"s_barangay\"<82;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"administrative_districts\" (\n \"district\" text,\n \"s_barangay\" real,\n \"population_2010_census\" real,\n \"area_has\" real,\n \"pop_density_per_km2\" real\n);\n\nQuestion: What is the total population with a population density less than 29,384.8 in San Nicolas?" }, { "role": "assistant", "content": "SELECT SUM(\"population_2010_census\") FROM \"administrative_districts\" WHERE \"pop_density_per_km2\"<'29,384.8' AND \"district\"='san nicolas';" } ]
[ { "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 average number of golds for teams in rank 17 with more than 4 silver?" }, { "role": "assistant", "content": "SELECT AVG(\"gold\") FROM \"medal_table\" WHERE \"rank\"='17' 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: What is the average total for teams with under 34 bronzes, 0 silver, and under 14 gold?" }, { "role": "assistant", "content": "SELECT AVG(\"total\") FROM \"medal_table\" WHERE \"bronze\"<34 AND \"gold\"<14 AND \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the fewest number of golds for teams with 0 silver?" }, { "role": "assistant", "content": "SELECT MIN(\"gold\") FROM \"medal_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 \"world_championships_and_world_cups\" (\n \"sport\" text,\n \"body\" text,\n \"year\" text,\n \"event_type\" text,\n \"location\" text,\n \"nations\" text\n);\n\nQuestion: What nations participated in 2007?" }, { "role": "assistant", "content": "SELECT \"nations\" FROM \"world_championships_and_world_cups\" WHERE \"year\"='2007';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_and_world_cups\" (\n \"sport\" text,\n \"body\" text,\n \"year\" text,\n \"event_type\" text,\n \"location\" text,\n \"nations\" text\n);\n\nQuestion: What event type had BODY CMAS in 1980 and underwater hockey?" }, { "role": "assistant", "content": "SELECT \"event_type\" FROM \"world_championships_and_world_cups\" WHERE \"body\"='cmas' AND \"year\"='1980' AND \"sport\"='underwater hockey';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_and_world_cups\" (\n \"sport\" text,\n \"body\" text,\n \"year\" text,\n \"event_type\" text,\n \"location\" text,\n \"nations\" text\n);\n\nQuestion: What body is at the World Championship for Underwater Target shooting?" }, { "role": "assistant", "content": "SELECT \"body\" FROM \"world_championships_and_world_cups\" WHERE \"event_type\"='world championship' AND \"sport\"='underwater target shooting';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_and_world_cups\" (\n \"sport\" text,\n \"body\" text,\n \"year\" text,\n \"event_type\" text,\n \"location\" text,\n \"nations\" text\n);\n\nQuestion: What body participated in 1973?" }, { "role": "assistant", "content": "SELECT \"body\" FROM \"world_championships_and_world_cups\" WHERE \"year\"='1973';" } ]