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 \"results\" (\n \"party\" text,\n \"votes_gib\" real,\n \"votes_sw_eng\" real,\n \"pct_gib\" real,\n \"pct_sw_eng\" real,\n \"change_sw_eng\" real,\n \"seats\" real\n);\n\nQuestion: What's the lowest Votes (SW Eng) with a % (SW Eng) that's larger than 2.1, Votes (Gib) of 1,127, and a Change (SW Eng) that's larger than -3.6?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"votes_sw_eng\") FROM \"results\" WHERE \"pct_sw_eng\">2.1 AND \"votes_gib\"='1,127' AND \"change_sw_eng\">-3.6;"
}
] |
[
{
"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: Which Gold is the lowest one that has a Bronze of 14, and a Total larger than 42?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"gold\") FROM \"medal_table\" WHERE \"bronze\"=14 AND \"total\">42;"
}
] |
[
{
"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: Which Bronze is the lowest one that has a Nation of total, and a Gold smaller than 14?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"bronze\") FROM \"medal_table\" WHERE \"nation\"='total' AND \"gold\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Total has a Nation of kazakhstan (kaz), and a Gold larger than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"medal_table\" WHERE \"nation\"='kazakhstan (kaz)' AND \"gold\">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: Which Total is the highest one that has a Rank of 1, and a Gold larger than 11?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"medal_table\" WHERE \"rank\"='1' AND \"gold\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual_events\" (\n \"round\" text,\n \"venue\" text,\n \"discipline\" text,\n \"date\" text,\n \"winner\" text,\n \"second\" text,\n \"third\" text\n);\n\nQuestion: Who finished 3rd in Oslo?"
},
{
"role": "assistant",
"content": "SELECT \"third\" FROM \"individual_events\" WHERE \"venue\"='oslo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1950\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: On November 22, what were the results of the friendly type game?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"1950\" WHERE \"type_of_game\"='friendly' AND \"date\"='november 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1950\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: On October 8, what city was the game played?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"1950\" WHERE \"date\"='october 8';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1950\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: On June 29, who was the opponent?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"1950\" WHERE \"date\"='june 29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1950\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What date had an opponent of Sweden and a friendly type game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"1950\" WHERE \"type_of_game\"='friendly' AND \"opponent\"='sweden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1950\" (\n \"date\" text,\n \"city\" text,\n \"opponent\" text,\n \"results\" text,\n \"type_of_game\" text\n);\n\nQuestion: What were the results on September 7?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"1950\" WHERE \"date\"='september 7';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"index_trends_in_major_states_by_respecti\" (\n \"state\" text,\n \"1990_95\" real,\n \"1996_00\" real,\n \"2001_05\" real,\n \"2006_10\" real\n);\n\nQuestion: Which 1990\u201395 is the highest one that has a State of karnataka, and a 2001\u201305 smaller than 0.2?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"1990_95\") FROM \"index_trends_in_major_states_by_respecti\" WHERE \"state\"='karnataka' AND \"2001_05\"<0.2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"index_trends_in_major_states_by_respecti\" (\n \"state\" text,\n \"1990_95\" real,\n \"1996_00\" real,\n \"2001_05\" real,\n \"2006_10\" real\n);\n\nQuestion: Which 1996-00 is the lowest one that has a State of maharashtra, and a 2006\u201310 smaller than 0.26?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"1996_00\") FROM \"index_trends_in_major_states_by_respecti\" WHERE \"state\"='maharashtra' AND \"2006_10\"<0.26;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"index_trends_in_major_states_by_respecti\" (\n \"state\" text,\n \"1990_95\" real,\n \"1996_00\" real,\n \"2001_05\" real,\n \"2006_10\" real\n);\n\nQuestion: Which 1990\u201395 is the average one that has a 2001\u201305 larger than 0.55?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"1990_95\") FROM \"index_trends_in_major_states_by_respecti\" WHERE \"2001_05\">0.55;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"index_trends_in_major_states_by_respecti\" (\n \"state\" text,\n \"1990_95\" real,\n \"1996_00\" real,\n \"2001_05\" real,\n \"2006_10\" real\n);\n\nQuestion: Which 1990\u201395 is the highest one that has a State of assam, and a 1996-00 smaller than 0.02?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"1990_95\") FROM \"index_trends_in_major_states_by_respecti\" WHERE \"state\"='assam' AND \"1996_00\"<0.02;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_2006\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: What is the Winning team on january 28, 2006?"
},
{
"role": "assistant",
"content": "SELECT \"winning_team\" FROM \"2005_2006\" WHERE \"date\"='january 28, 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_2006\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: Which Series has a Winning team of iowa state and a Sport of w basketball?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"2005_2006\" WHERE \"winning_team\"='iowa state' AND \"sport\"='w basketball';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_2006\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: Which Series has a Site of ames on september 10, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"2005_2006\" WHERE \"site\"='ames' AND \"date\"='september 10, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_2006\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: Which Series has a Site of ames and a Sport of w gymnastics?"
},
{
"role": "assistant",
"content": "SELECT \"series\" FROM \"2005_2006\" WHERE \"site\"='ames' AND \"sport\"='w gymnastics';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_2006\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: WHich port is on march 17, 2006 and has a Winning team of iowa state?"
},
{
"role": "assistant",
"content": "SELECT \"sport\" FROM \"2005_2006\" WHERE \"date\"='march 17, 2006' AND \"winning_team\"='iowa state';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2005_2006\" (\n \"date\" text,\n \"site\" text,\n \"sport\" text,\n \"winning_team\" text,\n \"series\" text\n);\n\nQuestion: Which Site has a Date of march 17, 2006 and an iowa state Winning team?"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"2005_2006\" WHERE \"date\"='march 17, 2006' AND \"winning_team\"='iowa state';"
}
] |
[
{
"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 of the game before week 11 on October 31, 1976?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\"<11 AND \"date\"='october 31, 1976';"
}
] |
[
{
"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 highest attendance of the game on week 9?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"week\"=9;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" real,\n \"episodes\" real,\n \"first_air_date\" text,\n \"last_air_date\" text,\n \"timeslot\" text,\n \"dvd_release\" text\n);\n\nQuestion: When is the last episode air date for season 3?"
},
{
"role": "assistant",
"content": "SELECT \"last_air_date\" FROM \"seasons\" WHERE \"season\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" real,\n \"episodes\" real,\n \"first_air_date\" text,\n \"last_air_date\" text,\n \"timeslot\" text,\n \"dvd_release\" text\n);\n\nQuestion: Which season had its last episode air on March 11, 2001?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"seasons\" WHERE \"last_air_date\"='march 11, 2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What games have more than 1 draw?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"games\") FROM \"first_round\" WHERE \"drawn\">1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"games\" real,\n \"drawn\" real,\n \"lost\" real,\n \"points_difference\" text,\n \"points\" real\n);\n\nQuestion: What game is the lowest with 1 draw and less than 7 points?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"games\") FROM \"first_round\" WHERE \"drawn\"=1 AND \"points\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_league\" (\n \"year\" real,\n \"league\" text,\n \"class\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Manager of art griggs had what lowest year?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"western_league\" WHERE \"manager\"='art griggs';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_league\" (\n \"year\" real,\n \"league\" text,\n \"class\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Manager of spencer abbott, and a Year of 1919 involves what playoffs?"
},
{
"role": "assistant",
"content": "SELECT \"playoffs\" FROM \"western_league\" WHERE \"manager\"='spencer abbott' AND \"year\"=1919;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_league\" (\n \"year\" real,\n \"league\" text,\n \"class\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Manager of marty berghammer / nick allen is what year?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"western_league\" WHERE \"manager\"='marty berghammer / nick allen';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_league\" (\n \"year\" real,\n \"league\" text,\n \"class\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Manager of lyman lamb / marty berghammer is in what league?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"western_league\" WHERE \"manager\"='lyman lamb / marty berghammer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_league\" (\n \"year\" real,\n \"league\" text,\n \"class\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Manager of marty berghammer, and a Finish of 1st involved what lowest year?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"western_league\" WHERE \"manager\"='marty berghammer' AND \"finish\"='1st';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"western_league\" (\n \"year\" real,\n \"league\" text,\n \"class\" text,\n \"record\" text,\n \"finish\" text,\n \"manager\" text,\n \"playoffs\" text\n);\n\nQuestion: Playoffs of league champs, and a Record of 77-63 is in what league?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"western_league\" WHERE \"playoffs\"='league champs' AND \"record\"='77-63';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"1998\" 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 \"career_w_l\" text\n);\n\nQuestion: Name the 2005 with 2007 of sf"
},
{
"role": "assistant",
"content": "SELECT \"2005\" FROM \"doubles\" WHERE \"2007\"='sf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"1998\" 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 \"career_w_l\" text\n);\n\nQuestion: Name the 2006 with 2008 of 1r and 2004 of 1r"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"doubles\" WHERE \"2008\"='1r' AND \"2004\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"1998\" 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 \"career_w_l\" text\n);\n\nQuestion: Name the 2011 with 2002 of 1r and 2009 of a"
},
{
"role": "assistant",
"content": "SELECT \"2011\" FROM \"doubles\" WHERE \"2002\"='1r' AND \"2009\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"1998\" 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 \"career_w_l\" text\n);\n\nQuestion: Name the 1999 with 2011 of 2r"
},
{
"role": "assistant",
"content": "SELECT \"1999\" FROM \"doubles\" WHERE \"2011\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"1998\" 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 \"career_w_l\" text\n);\n\nQuestion: Name the 2008 with 1998 of a and 2002 of 1r with 2004 of 2r"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"doubles\" WHERE \"1998\"='a' AND \"2002\"='1r' AND \"2004\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles\" (\n \"tournament\" text,\n \"1998\" 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 \"career_w_l\" text\n);\n\nQuestion: Name the 2001 with 2007 of sf"
},
{
"role": "assistant",
"content": "SELECT \"2001\" FROM \"doubles\" WHERE \"2007\"='sf';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Which AAA class has Fort Bend Dulles as a Class AAAAA?"
},
{
"role": "assistant",
"content": "SELECT \"class_aaa\" FROM \"individual\" WHERE \"class_aaaaa\"='fort bend dulles';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: Which school year was the Class AAA dalhart and the class AAAAA edinburg?"
},
{
"role": "assistant",
"content": "SELECT \"school_year\" FROM \"individual\" WHERE \"class_aaa\"='dalhart' AND \"class_aaaaa\"='edinburg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: For what Class A is the school year 1987-88?"
},
{
"role": "assistant",
"content": "SELECT \"class_a\" FROM \"individual\" WHERE \"school_year\"='1987-88';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What is the Class AAAAA when Class AA is Tuscola Jim Ned and Class AAA Snyder?"
},
{
"role": "assistant",
"content": "SELECT \"class_aaaaa\" FROM \"individual\" WHERE \"class_aa\"='tuscola jim ned' AND \"class_aaa\"='snyder';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"individual\" (\n \"school_year\" text,\n \"class_a\" text,\n \"class_aa\" text,\n \"class_aaa\" text,\n \"class_aaaa\" text,\n \"class_aaaaa\" text\n);\n\nQuestion: What is the Class AAAAA when the Class AAA is Gonzales?"
},
{
"role": "assistant",
"content": "SELECT \"class_aaaa\" FROM \"individual\" WHERE \"class_aaa\"='gonzales';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_b\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which team scored less than 35 points?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"campeonato_brasileiro_s_rie_b\" WHERE \"points\"<35;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_b\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Position has a Team of crici\u00fama, and a Drawn larger than 8?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"position\") FROM \"campeonato_brasileiro_s_rie_b\" WHERE \"team\"='crici\u00fama' AND \"drawn\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_b\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Drawn has Points smaller than 46, and a Position smaller than 20, and a Lost smaller than 19, and an Against of 56?"
},
{
"role": "assistant",
"content": "SELECT \"drawn\" FROM \"campeonato_brasileiro_s_rie_b\" WHERE \"points\"<46 AND \"position\"<20 AND \"lost\"<19 AND \"against\"=56;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"campeonato_brasileiro_s_rie_b\" (\n \"position\" real,\n \"team\" text,\n \"points\" real,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"against\" real,\n \"difference\" text\n);\n\nQuestion: Which Played has a Lost larger than 14, and a Drawn of 10, and Points larger than 46?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"campeonato_brasileiro_s_rie_b\" WHERE \"lost\">14 AND \"drawn\"=10 AND \"points\">46;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"harrachov\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What's the name of a Rank 3 with a 1st (m) smaller than 199.5?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"harrachov\" WHERE \"1st_m\"<199.5 AND \"rank\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"harrachov\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"points\" real,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What's the Overall WC points (Rank) for Rank 2?"
},
{
"role": "assistant",
"content": "SELECT \"overall_wc_points_rank\" FROM \"harrachov\" WHERE \"rank\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"january\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"record\" text\n);\n\nQuestion: What score has devin brown (24) as the leading scorer?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"january\" WHERE \"leading_scorer\"='devin brown (24)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: Which height, in meters, has 36 floors?"
},
{
"role": "assistant",
"content": "SELECT \"height_ft_m\" FROM \"timeline_of_tallest_buildings\" WHERE \"floors\"=36;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: Which Floors is the highest one that has a Name of one indiana square?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"floors\") FROM \"timeline_of_tallest_buildings\" WHERE \"name\"='one indiana square';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"timeline_of_tallest_buildings\" (\n \"name\" text,\n \"street_address\" text,\n \"years_as_tallest\" text,\n \"height_ft_m\" text,\n \"floors\" real\n);\n\nQuestion: How tall is the Street address of 07.0 200 east washington street?"
},
{
"role": "assistant",
"content": "SELECT \"height_ft_m\" FROM \"timeline_of_tallest_buildings\" WHERE \"street_address\"='07.0 200 east washington street';"
}
] |
[
{
"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 \"record\" text\n);\n\nQuestion: What was the date of the game where the indians record was 37-44?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='37-44';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"museums_with_paleontology_holdings\" (\n \"name\" text,\n \"town_city\" text,\n \"region\" text,\n \"on_dinosaur_trail\" text,\n \"education_programs_guided_tours\" text,\n \"associated_field_digs\" text\n);\n\nQuestion: What city is Garfield County Museum located in?"
},
{
"role": "assistant",
"content": "SELECT \"town_city\" FROM \"museums_with_paleontology_holdings\" WHERE \"name\"='garfield county museum';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"museums_with_paleontology_holdings\" (\n \"name\" text,\n \"town_city\" text,\n \"region\" text,\n \"on_dinosaur_trail\" text,\n \"education_programs_guided_tours\" text,\n \"associated_field_digs\" text\n);\n\nQuestion: Is the Rudyard Depot Museum on the Dinosaur Trail?"
},
{
"role": "assistant",
"content": "SELECT \"on_dinosaur_trail\" FROM \"museums_with_paleontology_holdings\" WHERE \"name\"='rudyard depot museum';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"museums_with_paleontology_holdings\" (\n \"name\" text,\n \"town_city\" text,\n \"region\" text,\n \"on_dinosaur_trail\" text,\n \"education_programs_guided_tours\" text,\n \"associated_field_digs\" text\n);\n\nQuestion: What is the name of the museum located in Malta with no associated field digs?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"museums_with_paleontology_holdings\" WHERE \"associated_field_digs\"='no' AND \"town_city\"='malta';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"museums_with_paleontology_holdings\" (\n \"name\" text,\n \"town_city\" text,\n \"region\" text,\n \"on_dinosaur_trail\" text,\n \"education_programs_guided_tours\" text,\n \"associated_field_digs\" text\n);\n\nQuestion: What is the museum name located in Rudyard?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"museums_with_paleontology_holdings\" WHERE \"town_city\"='rudyard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"museums_with_paleontology_holdings\" (\n \"name\" text,\n \"town_city\" text,\n \"region\" text,\n \"on_dinosaur_trail\" text,\n \"education_programs_guided_tours\" text,\n \"associated_field_digs\" text\n);\n\nQuestion: What is the region that the Blaine County Museum is located in?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"museums_with_paleontology_holdings\" WHERE \"name\"='blaine county museum';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What Tournament had a Score of 6\u20133, 2\u20136, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"doubles_6_2_4\" WHERE \"score\"='6\u20133, 2\u20136, 6\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: What Partner had a Score of 6\u20133, 2\u20136, 6\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"partner\" FROM \"doubles_6_2_4\" WHERE \"score\"='6\u20133, 2\u20136, 6\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"doubles_6_2_4\" (\n \"outcome\" text,\n \"date\" text,\n \"tournament\" text,\n \"surface\" text,\n \"partner\" text,\n \"opponents\" text,\n \"score\" text\n);\n\nQuestion: Who were the Opponents in the match on a Hard Surface with Catherine Suire as Partner and Outcome of runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"doubles_6_2_4\" WHERE \"outcome\"='runner-up' AND \"surface\"='hard' AND \"partner\"='catherine suire';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visiting team when the record was 6\u201312\u20135\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"game_log\" WHERE \"record\"='6\u201312\u20135\u20131';"
}
] |
[
{
"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 \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the home team when the record was 21\u201345\u20138\u20135?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"record\"='21\u201345\u20138\u20135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pointer_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: Which of the attributes has is cancelable and an answer of yes for bubbles?"
},
{
"role": "assistant",
"content": "SELECT \"attribute\" FROM \"pointer_events\" WHERE \"cancelable\"='yes' AND \"bubbles\"='yes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pointer_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: Which bubbles has an atribute of onlostpointercapture?"
},
{
"role": "assistant",
"content": "SELECT \"bubbles\" FROM \"pointer_events\" WHERE \"attribute\"='onlostpointercapture';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pointer_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: For the attribute of onpointerout, what is the cancelable?"
},
{
"role": "assistant",
"content": "SELECT \"cancelable\" FROM \"pointer_events\" WHERE \"attribute\"='onpointerout';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pointer_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: Which bubble have a cancelable of yes and an attribute of onpointerdown?"
},
{
"role": "assistant",
"content": "SELECT \"bubbles\" FROM \"pointer_events\" WHERE \"cancelable\"='yes' AND \"attribute\"='onpointerdown';"
}
] |
[
{
"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 \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What's the highest grid of Ronnie Bremer, who had more than 18 points?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"grid\") FROM \"race\" WHERE \"driver\"='ronnie bremer' AND \"points\">18;"
}
] |
[
{
"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 \"team\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real,\n \"points\" real\n);\n\nQuestion: What are the most points Lap 70 had with a grid larger than 16?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"race\" WHERE \"laps\"=70 AND \"grid\">16;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"track\" text,\n \"city\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What is the name of the track in Holland?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"city\"='holland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"track\" text,\n \"city\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What is the track in Washington state?"
},
{
"role": "assistant",
"content": "SELECT \"track\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"state\"='washington';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"track\" text,\n \"city\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What is the city the track of manzanita speedway is in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"track\"='manzanita speedway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"track\" text,\n \"city\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What is the surface of the track at the indianapolis speedrome?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"track\"='indianapolis speedrome';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"track\" text,\n \"city\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What is the surface for the riverhead raceway?"
},
{
"role": "assistant",
"content": "SELECT \"surface\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"track\"='riverhead raceway';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_auto_racing_tracks_in_the_united\" (\n \"track\" text,\n \"city\" text,\n \"state\" text,\n \"opened_closing_date_if_defunct\" text,\n \"surface\" text,\n \"length\" text\n);\n\nQuestion: What city is the indianapolis speedrome in?"
},
{
"role": "assistant",
"content": "SELECT \"city\" FROM \"list_of_auto_racing_tracks_in_the_united\" WHERE \"track\"='indianapolis speedrome';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"common_trihalomethanes_ordered_by_molecu\" (\n \"molecular_formula\" text,\n \"iupac_name\" text,\n \"cas_registry_number\" text,\n \"common_name\" text,\n \"other_names\" text\n);\n\nQuestion: What is the IUPAC name for chloroform?"
},
{
"role": "assistant",
"content": "SELECT \"iupac_name\" FROM \"common_trihalomethanes_ordered_by_molecu\" WHERE \"common_name\"='chloroform';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"fidesz\" text,\n \"mszp\" text,\n \"szdsz\" text,\n \"jobbik\" text,\n \"others\" text\n);\n\nQuestion: What is the SZDSZ percentage with an MSZP of 25% on 25/2/2009?"
},
{
"role": "assistant",
"content": "SELECT \"szdsz\" FROM \"opinion_polls\" WHERE \"mszp\"='25%' AND \"date\"='25/2/2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"fidesz\" text,\n \"mszp\" text,\n \"szdsz\" text,\n \"jobbik\" text,\n \"others\" text\n);\n\nQuestion: What percentage of others have an SZDSZ of 4% and a Fidesz of 60%?"
},
{
"role": "assistant",
"content": "SELECT \"others\" FROM \"opinion_polls\" WHERE \"szdsz\"='4%' AND \"fidesz\"='60%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"fidesz\" text,\n \"mszp\" text,\n \"szdsz\" text,\n \"jobbik\" text,\n \"others\" text\n);\n\nQuestion: What is the percentage of others with a Fidesz of 62% and a Jobbik of 4%?"
},
{
"role": "assistant",
"content": "SELECT \"others\" FROM \"opinion_polls\" WHERE \"fidesz\"='62%' AND \"jobbik\"='4%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"fidesz\" text,\n \"mszp\" text,\n \"szdsz\" text,\n \"jobbik\" text,\n \"others\" text\n);\n\nQuestion: On what date do others have 5% with an SZDSZ of 5%?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"opinion_polls\" WHERE \"others\"='5%' AND \"szdsz\"='5%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"fidesz\" text,\n \"mszp\" text,\n \"szdsz\" text,\n \"jobbik\" text,\n \"others\" text\n);\n\nQuestion: What is the SZDSZ percentage with a Jobbik of 5% and a Fidesz of 68%?"
},
{
"role": "assistant",
"content": "SELECT \"szdsz\" FROM \"opinion_polls\" WHERE \"jobbik\"='5%' AND \"fidesz\"='68%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"fidesz\" text,\n \"mszp\" text,\n \"szdsz\" text,\n \"jobbik\" text,\n \"others\" text\n);\n\nQuestion: What is the Jobbik percentage with a Fidesz of 61% and others of 2%?"
},
{
"role": "assistant",
"content": "SELECT \"jobbik\" FROM \"opinion_polls\" WHERE \"fidesz\"='61%' AND \"others\"='2%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_province\" (\n \"province\" text,\n \"kibaki\" text,\n \"raila\" text,\n \"wamalwa\" text,\n \"ngilu\" text,\n \"others\" text,\n \"registered_voters\" text,\n \"turnout_pct\" text\n);\n\nQuestion: What's listed for the Turnout % with a Ngilu of 3,429?"
},
{
"role": "assistant",
"content": "SELECT \"turnout_pct\" FROM \"by_province\" WHERE \"ngilu\"='3,429';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_province\" (\n \"province\" text,\n \"kibaki\" text,\n \"raila\" text,\n \"wamalwa\" text,\n \"ngilu\" text,\n \"others\" text,\n \"registered_voters\" text,\n \"turnout_pct\" text\n);\n\nQuestion: What's listed for the Turnout % with a Raila of 519,180?"
},
{
"role": "assistant",
"content": "SELECT \"turnout_pct\" FROM \"by_province\" WHERE \"raila\"='519,180';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_province\" (\n \"province\" text,\n \"kibaki\" text,\n \"raila\" text,\n \"wamalwa\" text,\n \"ngilu\" text,\n \"others\" text,\n \"registered_voters\" text,\n \"turnout_pct\" text\n);\n\nQuestion: What's listed for the Turnout % with a Ngilu of 30,535?"
},
{
"role": "assistant",
"content": "SELECT \"turnout_pct\" FROM \"by_province\" WHERE \"ngilu\"='30,535';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_province\" (\n \"province\" text,\n \"kibaki\" text,\n \"raila\" text,\n \"wamalwa\" text,\n \"ngilu\" text,\n \"others\" text,\n \"registered_voters\" text,\n \"turnout_pct\" text\n);\n\nQuestion: What's listed for the Registered Voters with a Ngilu of 3,429?"
},
{
"role": "assistant",
"content": "SELECT \"registered_voters\" FROM \"by_province\" WHERE \"ngilu\"='3,429';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_province\" (\n \"province\" text,\n \"kibaki\" text,\n \"raila\" text,\n \"wamalwa\" text,\n \"ngilu\" text,\n \"others\" text,\n \"registered_voters\" text,\n \"turnout_pct\" text\n);\n\nQuestion: What is listed for the Province with a Wamalwa of 4,431?"
},
{
"role": "assistant",
"content": "SELECT \"province\" FROM \"by_province\" WHERE \"wamalwa\"='4,431';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_province\" (\n \"province\" text,\n \"kibaki\" text,\n \"raila\" text,\n \"wamalwa\" text,\n \"ngilu\" text,\n \"others\" text,\n \"registered_voters\" text,\n \"turnout_pct\" text\n);\n\nQuestion: What's listed for the Wamalwa that has a Turnout % of 55.9%?"
},
{
"role": "assistant",
"content": "SELECT \"wamalwa\" FROM \"by_province\" WHERE \"turnout_pct\"='55.9%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_type\" (\n \"rocket\" text,\n \"country\" text,\n \"family\" text,\n \"launches\" real,\n \"successes\" real,\n \"failures\" real,\n \"partial_failures\" real\n);\n\nQuestion: What were the average partial failures when the rocket was Ariane 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"partial_failures\") FROM \"by_type\" WHERE \"rocket\"='ariane 5';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_type\" (\n \"rocket\" text,\n \"country\" text,\n \"family\" text,\n \"launches\" real,\n \"successes\" real,\n \"failures\" real,\n \"partial_failures\" real\n);\n\nQuestion: What are average launches with 0 failures, rocket of Soyuz, and less than 12 successes?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"launches\") FROM \"by_type\" WHERE \"failures\"=0 AND \"rocket\"='soyuz' AND \"successes\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_type\" (\n \"rocket\" text,\n \"country\" text,\n \"family\" text,\n \"launches\" real,\n \"successes\" real,\n \"failures\" real,\n \"partial_failures\" real\n);\n\nQuestion: What is the sum of launches with Long March 3 and 0 failures?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"launches\") FROM \"by_type\" WHERE \"rocket\"='long march 3' AND \"failures\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_type\" (\n \"rocket\" text,\n \"country\" text,\n \"family\" text,\n \"launches\" real,\n \"successes\" real,\n \"failures\" real,\n \"partial_failures\" real\n);\n\nQuestion: What is the least amount of failures with 1 launch and 0 partial failures?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"failures\") FROM \"by_type\" WHERE \"launches\"=1 AND \"partial_failures\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_type\" (\n \"rocket\" text,\n \"country\" text,\n \"family\" text,\n \"launches\" real,\n \"successes\" real,\n \"failures\" real,\n \"partial_failures\" real\n);\n\nQuestion: What were the average launches for Ariane 5 and 0 partial failures?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"launches\") FROM \"by_type\" WHERE \"rocket\"='ariane 5' AND \"partial_failures\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_01_season_as_a_four_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: What was the race of the jockey in na group in 4th place?"
},
{
"role": "assistant",
"content": "SELECT \"race\" FROM \"2000_01_season_as_a_four_year_old\" WHERE \"group\"='na' AND \"result\"='4th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2000_01_season_as_a_four_year_old\" (\n \"result\" text,\n \"date\" text,\n \"race\" text,\n \"venue\" text,\n \"group\" text,\n \"distance\" text,\n \"weight_kg\" real,\n \"jockey\" text,\n \"winner_2nd\" text\n);\n\nQuestion: How far did p. carbery run to get 2nd?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"2000_01_season_as_a_four_year_old\" WHERE \"jockey\"='p. carbery' AND \"result\"='2nd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"trim\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"fuel_mileage_latest_epa_mpg_us\" text\n);\n\nQuestion: What is the Removal that has a Trim of xe (2009)?"
},
{
"role": "assistant",
"content": "SELECT \"transmission\" FROM \"engines\" WHERE \"trim\"='xe (2009)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"engines\" (\n \"trim\" text,\n \"engine\" text,\n \"displacement\" text,\n \"power\" text,\n \"torque\" text,\n \"transmission\" text,\n \"fuel_mileage_latest_epa_mpg_us\" text\n);\n\nQuestion: What is the Torque that has a Power of hp (kw), and a Trim of xr (2009)? Question 6"
},
{
"role": "assistant",
"content": "SELECT \"torque\" FROM \"engines\" WHERE \"power\"='hp (kw)' AND \"trim\"='xr (2009)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which Round is the lowest one that has a College/Junior/Club Team (League) of oshawa generals (oha), and a Player of bob kelly?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"round\") FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='oshawa generals (oha)' AND \"player\"='bob kelly';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.