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 \"career_summary\" (\n \"season\" text,\n \"series\" text,\n \"team\" text,\n \"races\" real,\n \"wins\" real,\n \"poles\" real,\n \"points\" text,\n \"position\" text\n);\n\nQuestion: What is the fewest number of wins when he has 3 poles in 2010?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"career_summary\" WHERE \"poles\"=3 AND \"season\"='2010';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_organizations\" (\n \"favorite_professional_sport\" text,\n \"2005\" text,\n \"2008\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What's listed for the 2012 that has a 2011 of 7.7% with a 2008 of 7.9%?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"professional_organizations\" WHERE \"2011\"='7.7%' AND \"2008\"='7.9%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_organizations\" (\n \"favorite_professional_sport\" text,\n \"2005\" text,\n \"2008\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is listed for the 2011 that has a 2005 of 4.2%?" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"professional_organizations\" WHERE \"2005\"='4.2%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_organizations\" (\n \"favorite_professional_sport\" text,\n \"2005\" text,\n \"2008\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is listed for the 2012 that has a 2011 of 28.9%?" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"professional_organizations\" WHERE \"2011\"='28.9%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_organizations\" (\n \"favorite_professional_sport\" text,\n \"2005\" text,\n \"2008\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is listed for the 2005 that has a 2012 of 4.2%?" }, { "role": "assistant", "content": "SELECT \"2005\" FROM \"professional_organizations\" WHERE \"2012\"='4.2%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_organizations\" (\n \"favorite_professional_sport\" text,\n \"2005\" text,\n \"2008\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is listed the Favorite Professional Sport that's got a 2005 of 17.1%?" }, { "role": "assistant", "content": "SELECT \"favorite_professional_sport\" FROM \"professional_organizations\" WHERE \"2005\"='17.1%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"professional_organizations\" (\n \"favorite_professional_sport\" text,\n \"2005\" text,\n \"2008\" text,\n \"2011\" text,\n \"2012\" text\n);\n\nQuestion: What is listed as the Favorite Professional Sport that has a 2008 of 8.9%?" }, { "role": "assistant", "content": "SELECT \"favorite_professional_sport\" FROM \"professional_organizations\" WHERE \"2008\"='8.9%';" } ]
[ { "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 score of the game that led to a 79-77 record?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='79-77';" } ]
[ { "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 record after the game in which Rosales (1-1) took the loss?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='rosales (1-1)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"living_canadian_supercentenarians\" (\n \"name\" text,\n \"birth_date\" text,\n \"age_as_of_1_february_2014\" text,\n \"province_or_country_of_birth\" text,\n \"province_of_residence\" text\n);\n\nQuestion: Which supercentenarians were born in Manitoba?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"living_canadian_supercentenarians\" WHERE \"province_or_country_of_birth\"='manitoba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"living_canadian_supercentenarians\" (\n \"name\" text,\n \"birth_date\" text,\n \"age_as_of_1_february_2014\" text,\n \"province_or_country_of_birth\" text,\n \"province_of_residence\" text\n);\n\nQuestion: What is the average age as of February 1, 2014 for the supercentenarians born in the United States?" }, { "role": "assistant", "content": "SELECT \"age_as_of_1_february_2014\" FROM \"living_canadian_supercentenarians\" WHERE \"province_or_country_of_birth\"='united states';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Which 2010 Tournament has a 2001 of grand slam tournaments?" }, { "role": "assistant", "content": "SELECT \"2010\" FROM \"singles\" WHERE \"2001\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Which 2006 Tournament has a 2004, and a 2002 of not tier i?" }, { "role": "assistant", "content": "SELECT \"2006\" FROM \"singles\" WHERE \"2004\"='a' AND \"2002\"='not tier i';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Which 2008 Tournament has a 2007 of a and a 2010 of qf?" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"singles\" WHERE \"2007\"='a' AND \"2010\"='qf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Which Tournament has a 2002 of grand slam tournaments?" }, { "role": "assistant", "content": "SELECT \"tournament\" FROM \"singles\" WHERE \"2002\"='grand slam tournaments';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"tournament\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"2004\" text,\n \"2005\" text,\n \"2006\" text,\n \"2007\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text\n);\n\nQuestion: Which 2000 Tournament has a 2002 of not tier i, and a 2006 of 2r?" }, { "role": "assistant", "content": "SELECT \"2000\" FROM \"singles\" WHERE \"2002\"='not tier i' AND \"2006\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_mandarin_satellite_television\" (\n \"name\" text,\n \"hanzi\" text,\n \"language\" text,\n \"launch\" real,\n \"owner\" text\n);\n\nQuestion: Which language's launch was in 2006 when then hanzi was \u9752\u6d77\u7535\u89c6\u53f0\u85cf\u8bed\u7efc\u5408\u9891\u9053?" }, { "role": "assistant", "content": "SELECT \"language\" FROM \"non_mandarin_satellite_television\" WHERE \"launch\"=2006 AND \"hanzi\"='\u9752\u6d77\u7535\u89c6\u53f0\u85cf\u8bed\u7efc\u5408\u9891\u9053';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_mandarin_satellite_television\" (\n \"name\" text,\n \"hanzi\" text,\n \"language\" text,\n \"launch\" real,\n \"owner\" text\n);\n\nQuestion: Which hanzi's name is nmtv mongolian satellite television?" }, { "role": "assistant", "content": "SELECT \"hanzi\" FROM \"non_mandarin_satellite_television\" WHERE \"name\"='nmtv mongolian satellite television';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"non_mandarin_satellite_television\" (\n \"name\" text,\n \"hanzi\" text,\n \"language\" text,\n \"launch\" real,\n \"owner\" text\n);\n\nQuestion: Which hanzi's launch is before 2009, when the language was tibetan, and the name was qinghai tibetian general channel?" }, { "role": "assistant", "content": "SELECT \"hanzi\" FROM \"non_mandarin_satellite_television\" WHERE \"launch\"<2009 AND \"language\"='tibetan' AND \"name\"='qinghai tibetian general channel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What Team had a 1:24.365 Qual 2?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"qual_2\"='1:24.365';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What Team had a 1:24.152 Best?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"best\"='1:24.152';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What was Robert Doornbos' Best?" }, { "role": "assistant", "content": "SELECT \"best\" FROM \"qualifying_results\" WHERE \"name\"='robert doornbos';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What was Alex Figge's Best?" }, { "role": "assistant", "content": "SELECT \"best\" FROM \"qualifying_results\" WHERE \"name\"='alex figge';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What Team had a 1:25.602 Best?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"qualifying_results\" WHERE \"best\"='1:25.602';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"qualifying_results\" (\n \"name\" text,\n \"team\" text,\n \"qual_1\" text,\n \"qual_2\" text,\n \"best\" text\n);\n\nQuestion: What was the Name of the person with a Qual 1 of 1:26.056?" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"qualifying_results\" WHERE \"qual_1\"='1:26.056';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: How many picks were there for the Bentley team?" }, { "role": "assistant", "content": "SELECT COUNT(\"pick\") FROM \"nfl_draft\" WHERE \"school_club_team\"='bentley';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the largest round number for Dan Connor, the player?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"player\"='dan connor';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the largest round number for the dt position when the pick number is bigger than 181?" }, { "role": "assistant", "content": "SELECT MAX(\"round\") FROM \"nfl_draft\" WHERE \"position\"='dt' AND \"pick\">181;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"season_calendar\" (\n \"date\" text,\n \"round\" text,\n \"circuit\" text,\n \"race_1_winner\" text,\n \"race_2_winner\" text,\n \"report\" text\n);\n\nQuestion: what circuit is in italy" }, { "role": "assistant", "content": "SELECT \"circuit\" FROM \"season_calendar\" WHERE \"round\"='italy';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"nfl_draft\" (\n \"round\" real,\n \"pick\" real,\n \"player\" text,\n \"position\" text,\n \"school\" text\n);\n\nQuestion: What is the average pick for clarence mason?" }, { "role": "assistant", "content": "SELECT AVG(\"pick\") FROM \"nfl_draft\" WHERE \"player\"='clarence mason';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the frequency for the city of Lamar, Colorado?" }, { "role": "assistant", "content": "SELECT AVG(\"frequency_m_hz\") FROM \"translators\" WHERE \"city_of_license\"='lamar, colorado';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the average ERP W for callsign K207BK?" }, { "role": "assistant", "content": "SELECT AVG(\"erp_w\") FROM \"translators\" WHERE \"call_sign\"='k207bk';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which callsign has ERP W of 99 and a frequency of greater than 88.7MHz?" }, { "role": "assistant", "content": "SELECT \"call_sign\" FROM \"translators\" WHERE \"frequency_m_hz\">88.7 AND \"erp_w\"=99;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"translators\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: Which city has ERP W under 14 and a frequency over 93.7MHz?" }, { "role": "assistant", "content": "SELECT \"city_of_license\" FROM \"translators\" WHERE \"erp_w\"<14 AND \"frequency_m_hz\">93.7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_28_wisconsin_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: What were the total number of field goals when there were 0 touchdowns and 2 extra points?" }, { "role": "assistant", "content": "SELECT COUNT(\"field_goals\") FROM \"michigan_28_wisconsin_0\" WHERE \"touchdowns\"=0 AND \"extra_points\"=2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_28_wisconsin_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many field goals did Carter get when he had 0 extra points?" }, { "role": "assistant", "content": "SELECT SUM(\"field_goals\") FROM \"michigan_28_wisconsin_0\" WHERE \"player\"='carter' AND \"extra_points\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_28_wisconsin_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: What is the highest amount of extra points someone got when they scored 28 points but had 0 field goals?" }, { "role": "assistant", "content": "SELECT MAX(\"extra_points\") FROM \"michigan_28_wisconsin_0\" WHERE \"points\"=28 AND \"field_goals\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_28_wisconsin_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: What is the average field goal someone has when they have 0 extra points but more than 5 touch downs?" }, { "role": "assistant", "content": "SELECT AVG(\"field_goals\") FROM \"michigan_28_wisconsin_0\" WHERE \"extra_points\">0 AND \"touchdowns\">5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the lowest number of wins with more than 113 points in 4th rank?" }, { "role": "assistant", "content": "SELECT MIN(\"wins\") FROM \"grand_prix_career_statistics\" WHERE \"points\">113 AND \"rank\"='4th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: How many wins had less than 91 points in 25th rank?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"grand_prix_career_statistics\" WHERE \"points\"<91 AND \"rank\"='25th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: How many wins in 1992?" }, { "role": "assistant", "content": "SELECT \"wins\" FROM \"grand_prix_career_statistics\" WHERE \"year\"=1992;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"grand_prix_career_statistics\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: How many wins occurred for 6th rank?" }, { "role": "assistant", "content": "SELECT COUNT(\"wins\") FROM \"grand_prix_career_statistics\" WHERE \"rank\"='6th';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" text,\n \"time_retired\" text,\n \"grid\" text\n);\n\nQuestion: Who was the constructor of the car driven by Heikki Kovalainen?" }, { "role": "assistant", "content": "SELECT \"constructor\" FROM \"race\" WHERE \"driver\"='heikki kovalainen';" } ]
[ { "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\" real,\n \"division\" real,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text\n);\n\nQuestion: Which Reg Season has a Division of 2?" }, { "role": "assistant", "content": "SELECT \"reg_season\" FROM \"year_by_year\" WHERE \"division\"=2;" } ]
[ { "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\" real,\n \"division\" real,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text\n);\n\nQuestion: Which Year is the highest one that has a Reg Season of 3rd, western, and a Division larger than 2?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"year_by_year\" WHERE \"reg_season\"='3rd, western' AND \"division\">2;" } ]
[ { "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\" real,\n \"division\" real,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text\n);\n\nQuestion: Which year is the lowest one when the playoffs did not qualify?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"year_by_year\" WHERE \"playoffs\"='did not qualify';" } ]
[ { "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\" real,\n \"division\" real,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text\n);\n\nQuestion: Which Year has a Reg Season of 3rd, western?" }, { "role": "assistant", "content": "SELECT AVG(\"year\") FROM \"year_by_year\" WHERE \"reg_season\"='3rd, western';" } ]
[ { "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\" real,\n \"division\" real,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text\n);\n\nQuestion: Which Division that has a Reg Season of 1st, western, and Playoffs of champions, and a Year smaller than 2013?" }, { "role": "assistant", "content": "SELECT AVG(\"division\") FROM \"year_by_year\" WHERE \"reg_season\"='1st, western' AND \"playoffs\"='champions' AND \"year\"<2013;" } ]
[ { "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: Who was the opponent during the game that had more than 31,891 people in attendance?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"attendance\">'31,891';" } ]
[ { "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 average attendance for the game before week 4 that was on october 16, 1955?" }, { "role": "assistant", "content": "SELECT AVG(\"attendance\") FROM \"schedule\" WHERE \"date\"='october 16, 1955' AND \"week\"<4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the total number of weeks that were on September 25, 1955 with more than 16,901 people in attendance?" }, { "role": "assistant", "content": "SELECT COUNT(\"week\") FROM \"schedule\" WHERE \"attendance\">'16,901' AND \"date\"='september 25, 1955';" } ]
[ { "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: Who was the opponent for the game on November 20, 1955?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='november 20, 1955';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"title_history\" (\n \"reign\" real,\n \"days_held\" text,\n \"location\" text,\n \"successful_defenses\" real,\n \"event\" text\n);\n\nQuestion: What is the highest number of successful defenses in brandon, florida and a reign less than 1?" }, { "role": "assistant", "content": "SELECT MAX(\"successful_defenses\") FROM \"title_history\" WHERE \"location\"='brandon, florida' AND \"reign\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1965\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What was the date of the game against Norway with a 1:1 result?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"1965\" WHERE \"opponent\"='norway' AND \"results\"='1:1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1965\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What type of game had a 0:0 result?" }, { "role": "assistant", "content": "SELECT \"type_of_game\" FROM \"1965\" WHERE \"results\"='0:0';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1965\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What city held that game with a 5:2 result?" }, { "role": "assistant", "content": "SELECT \"city\" FROM \"1965\" WHERE \"results\"='5:2';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the score of the game that has a record of 1-2-1?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"record\"='1-2-1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"october\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the team's record in games against the Hartford Whalers?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule_and_results\" WHERE \"opponent\"='hartford whalers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Record on Week 13 at the Hoosier Dome?" }, { "role": "assistant", "content": "SELECT \"record\" FROM \"schedule\" WHERE \"game_site\"='hoosier dome' AND \"week\"=13;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What was the Week on October 18, 1992?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"date\"='october 18, 1992';" } ]
[ { "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 loss has 16-6 as the record?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='16-6';" } ]
[ { "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 loss has 4-2 as the record?" }, { "role": "assistant", "content": "SELECT \"loss\" FROM \"game_log\" WHERE \"record\"='4-2';" } ]
[ { "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 attendance has astros as the opponent, and april 29 as the date?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"game_log\" WHERE \"opponent\"='astros' AND \"date\"='april 29';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_floor_versions\" (\n \"city\" text,\n \"operator\" text,\n \"type_designation\" text,\n \"number_of_vehicles\" real,\n \"width\" text\n);\n\nQuestion: Which Operator has a Width of 2.65 m, and a Type designation of m5000?" }, { "role": "assistant", "content": "SELECT \"operator\" FROM \"high_floor_versions\" WHERE \"width\"='2.65 m' AND \"type_designation\"='m5000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_floor_versions\" (\n \"city\" text,\n \"operator\" text,\n \"type_designation\" text,\n \"number_of_vehicles\" real,\n \"width\" text\n);\n\nQuestion: Which Width has a Number of vehicles larger than 15, and a Type designation of k5000?" }, { "role": "assistant", "content": "SELECT \"width\" FROM \"high_floor_versions\" WHERE \"number_of_vehicles\">15 AND \"type_designation\"='k5000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"high_floor_versions\" (\n \"city\" text,\n \"operator\" text,\n \"type_designation\" text,\n \"number_of_vehicles\" real,\n \"width\" text\n);\n\nQuestion: Which Number of vehicles has a Type designation of u5-25 (bi-directional)?" }, { "role": "assistant", "content": "SELECT \"number_of_vehicles\" FROM \"high_floor_versions\" WHERE \"type_designation\"='u5-25 (bi-directional)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_counties\" (\n \"county\" text,\n \"irish_name\" text,\n \"county_town\" text,\n \"most_populous_city_town\" text,\n \"province\" text,\n \"region\" text\n);\n\nQuestion: Province of leinster, and a County of fingal has which irish name?" }, { "role": "assistant", "content": "SELECT \"irish_name\" FROM \"list_of_counties\" WHERE \"province\"='leinster' AND \"county\"='fingal';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_counties\" (\n \"county\" text,\n \"irish_name\" text,\n \"county_town\" text,\n \"most_populous_city_town\" text,\n \"province\" text,\n \"region\" text\n);\n\nQuestion: Irish name of an d\u00fan (contae an d\u00fain) has what county town?" }, { "role": "assistant", "content": "SELECT \"county_town\" FROM \"list_of_counties\" WHERE \"irish_name\"='an d\u00fan (contae an d\u00fain)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_counties\" (\n \"county\" text,\n \"irish_name\" text,\n \"county_town\" text,\n \"most_populous_city_town\" text,\n \"province\" text,\n \"region\" text\n);\n\nQuestion: Most populous city/town of clonmel, and a Irish name of tiobraid \u00e1rann (contae thiobraid \u00e1rann) is which region?" }, { "role": "assistant", "content": "SELECT \"region\" FROM \"list_of_counties\" WHERE \"most_populous_city_town\"='clonmel' AND \"irish_name\"='tiobraid \u00e1rann (contae thiobraid \u00e1rann)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_counties\" (\n \"county\" text,\n \"irish_name\" text,\n \"county_town\" text,\n \"most_populous_city_town\" text,\n \"province\" text,\n \"region\" text\n);\n\nQuestion: County town of d\u00fan laoghaire has the most populous city/town?" }, { "role": "assistant", "content": "SELECT \"most_populous_city_town\" FROM \"list_of_counties\" WHERE \"county_town\"='d\u00fan laoghaire';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_counties\" (\n \"county\" text,\n \"irish_name\" text,\n \"county_town\" text,\n \"most_populous_city_town\" text,\n \"province\" text,\n \"region\" text\n);\n\nQuestion: Irish name of d\u00fan na ngall (contae dh\u00fan na ngall) has the most populous city/town?" }, { "role": "assistant", "content": "SELECT \"most_populous_city_town\" FROM \"list_of_counties\" WHERE \"irish_name\"='d\u00fan na ngall (contae dh\u00fan na ngall)';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"list_of_counties\" (\n \"county\" text,\n \"irish_name\" text,\n \"county_town\" text,\n \"most_populous_city_town\" text,\n \"province\" text,\n \"region\" text\n);\n\nQuestion: County town of castlebar has the most populous city/town?" }, { "role": "assistant", "content": "SELECT \"most_populous_city_town\" FROM \"list_of_counties\" WHERE \"county_town\"='castlebar';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Name the games for rub\u00e9n limardo" }, { "role": "assistant", "content": "SELECT \"games\" FROM \"medalists\" WHERE \"name\"='rub\u00e9n limardo';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Name the sport for men's light flyweight with medal of gold" }, { "role": "assistant", "content": "SELECT \"sport\" FROM \"medalists\" WHERE \"medal\"='gold' AND \"event\"='men''s light flyweight';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medalists\" (\n \"medal\" text,\n \"name\" text,\n \"games\" text,\n \"sport\" text,\n \"event\" text\n);\n\nQuestion: Tell me the name for men's featherweight and sport of weightlifting" }, { "role": "assistant", "content": "SELECT \"name\" FROM \"medalists\" WHERE \"event\"='men''s featherweight' AND \"sport\"='weightlifting';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"great_little_railways\" (\n \"episode_no\" real,\n \"episode_title\" text,\n \"uk_broadcast_date\" text,\n \"narrator\" text,\n \"writer\" text,\n \"details_of_journey\" text,\n \"countries_visited\" text\n);\n\nQuestion: Which details of journey had simon hoggart as a narrator?" }, { "role": "assistant", "content": "SELECT \"details_of_journey\" FROM \"great_little_railways\" WHERE \"narrator\"='simon hoggart';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"great_little_railways\" (\n \"episode_no\" real,\n \"episode_title\" text,\n \"uk_broadcast_date\" text,\n \"narrator\" text,\n \"writer\" text,\n \"details_of_journey\" text,\n \"countries_visited\" text\n);\n\nQuestion: Which countries visited had an episode number of less than 7 when Ray Gosling was the writer?" }, { "role": "assistant", "content": "SELECT \"countries_visited\" FROM \"great_little_railways\" WHERE \"episode_no\"<7 AND \"writer\"='ray gosling';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"louisville\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"height\" text,\n \"weight\" real,\n \"class\" text,\n \"hometown\" text,\n \"games\" real\n);\n\nQuestion: How tall is Zipp Duncan?" }, { "role": "assistant", "content": "SELECT \"height\" FROM \"louisville\" WHERE \"name\"='zipp duncan';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"louisville\" (\n \"position\" text,\n \"number\" real,\n \"name\" text,\n \"height\" text,\n \"weight\" real,\n \"class\" text,\n \"hometown\" text,\n \"games\" real\n);\n\nQuestion: What is the average games of Tony Dixon?" }, { "role": "assistant", "content": "SELECT AVG(\"games\") FROM \"louisville\" WHERE \"name\"='tony dixon';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the total of wins where the top 25 is 6, top 10 is more than 2, and the event number is less than 19?" }, { "role": "assistant", "content": "SELECT SUM(\"wins\") FROM \"summary\" WHERE \"top_25\"=6 AND \"top_10\">2 AND \"events\"<19;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the total of cuts made where the top 25 is less than 6 and the top-5 is more than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"cuts_made\") FROM \"summary\" WHERE \"top_25\"<6 AND \"top_5\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"top_10\" real,\n \"top_25\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many top-10 numbers had a top 25 of more than 6 with less than 2 wins?" }, { "role": "assistant", "content": "SELECT COUNT(\"top_10\") FROM \"summary\" WHERE \"top_25\">6 AND \"wins\"<2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2011 with 2010 of 1r and 2012 of sf" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"doubles_performance_timeline\" WHERE \"2010\"='1r' AND \"2012\"='sf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2008 with 2012 of 2r and 2006 of 2r" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"doubles_performance_timeline\" WHERE \"2012\"='2r' AND \"2006\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2008 for 2012 of sf" }, { "role": "assistant", "content": "SELECT \"2008\" FROM \"doubles_performance_timeline\" WHERE \"2012\"='sf';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2013 for 2011 of 1r" }, { "role": "assistant", "content": "SELECT \"2013\" FROM \"doubles_performance_timeline\" WHERE \"2011\"='1r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2011 with 2006 of 2r and 2008 of 2r" }, { "role": "assistant", "content": "SELECT \"2011\" FROM \"doubles_performance_timeline\" WHERE \"2006\"='2r' AND \"2008\"='2r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"doubles_performance_timeline\" (\n \"tournament\" text,\n \"2006\" text,\n \"2008\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Name the 2012 with 2013 of 2r and 2009 of 3r" }, { "role": "assistant", "content": "SELECT \"2012\" FROM \"doubles_performance_timeline\" WHERE \"2013\"='2r' AND \"2009\"='3r';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_48_ohio_northern_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many Field goals have Points larger than 5, and Touchdowns larger than 2, and an Extra points smaller than 0?" }, { "role": "assistant", "content": "SELECT COUNT(\"field_goals\") FROM \"michigan_48_ohio_northern_0\" WHERE \"points\">5 AND \"touchdowns\">2 AND \"extra_points\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_48_ohio_northern_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: How many Touchdowns have Extra points larger than 0, and Points of 48?" }, { "role": "assistant", "content": "SELECT COUNT(\"touchdowns\") FROM \"michigan_48_ohio_northern_0\" WHERE \"extra_points\">0 AND \"points\"=48;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_48_ohio_northern_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Touchdowns have an Extra points smaller than 5, and a Player of clark, and Field goals larger than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"touchdowns\") FROM \"michigan_48_ohio_northern_0\" WHERE \"extra_points\"<5 AND \"player\"='clark' AND \"field_goals\">0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"michigan_48_ohio_northern_0\" (\n \"player\" text,\n \"touchdowns\" real,\n \"extra_points\" real,\n \"field_goals\" real,\n \"points\" real\n);\n\nQuestion: Which Points have Touchdowns larger than 0, and an Extra points smaller than 0?" }, { "role": "assistant", "content": "SELECT SUM(\"points\") FROM \"michigan_48_ohio_northern_0\" WHERE \"touchdowns\">0 AND \"extra_points\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"september\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"semifinalists\" text\n);\n\nQuestion: Which Semifinalists has a Champions of michael chang 6-0 6-4?" }, { "role": "assistant", "content": "SELECT \"semifinalists\" FROM \"september\" WHERE \"champions\"='michael chang 6-0 6-4';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"september\" (\n \"week_of\" text,\n \"tournament\" text,\n \"champions\" text,\n \"runners_up\" text,\n \"semifinalists\" text\n);\n\nQuestion: Whose Runner-up has a Semifinalist of guillermo p\u00e9rez-rold\u00e1n andrea gaudenzi?" }, { "role": "assistant", "content": "SELECT \"runners_up\" FROM \"september\" WHERE \"semifinalists\"='guillermo p\u00e9rez-rold\u00e1n andrea gaudenzi';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"club_career_stats\" (\n \"season\" real,\n \"team\" text,\n \"country\" text,\n \"league\" text,\n \"level\" real,\n \"apps\" text,\n \"goals\" real\n);\n\nQuestion: Tell me the least season with level less than 1" }, { "role": "assistant", "content": "SELECT MIN(\"season\") FROM \"club_career_stats\" WHERE \"level\"<1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2007/ 08 has a 2010/ 11 of not held, and a 2011/ 12 of not held, and a 2008/ 09 of not held, and a 2006/ 07 of lq?" }, { "role": "assistant", "content": "SELECT \"2007_08\" FROM \"performance_and_rankings_timeline\" WHERE \"2010_11\"='not held' AND \"2011_12\"='not held' AND \"2008_09\"='not held' AND \"2006_07\"='lq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2009/10 has a 2005/06 of not held, and a 2010/11 of not held?" }, { "role": "assistant", "content": "SELECT \"2009_10\" FROM \"performance_and_rankings_timeline\" WHERE \"2005_06\"='not held' AND \"2010_11\"='not held';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2011/ 12 has a 2006/ 07 of not held, and a 2008/ 09 of not held, and a 2012/ 13 of dnq?" }, { "role": "assistant", "content": "SELECT \"2011_12\" FROM \"performance_and_rankings_timeline\" WHERE \"2006_07\"='not held' AND \"2008_09\"='not held' AND \"2012_13\"='dnq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2011/ 12 has a 2010/ 11 of A, and a 2007/ 08 of not held, and a 2012/ 13 of lq?" }, { "role": "assistant", "content": "SELECT \"2011_12\" FROM \"performance_and_rankings_timeline\" WHERE \"2010_11\"='a' AND \"2007_08\"='not held' AND \"2012_13\"='lq';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"performance_and_rankings_timeline\" (\n \"2005_06\" text,\n \"2006_07\" text,\n \"2007_08\" text,\n \"2008_09\" text,\n \"2009_10\" text,\n \"2010_11\" text,\n \"2011_12\" text,\n \"2012_13\" text\n);\n\nQuestion: Which 2007/ 08 has a 2005/ 06 of A, and a 2009/ 10 of A, and a 2012/ 13 of A?" }, { "role": "assistant", "content": "SELECT \"2007_08\" FROM \"performance_and_rankings_timeline\" WHERE \"2005_06\"='a' AND \"2009_10\"='a' AND \"2012_13\"='a';" } ]