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 \"pool_3\" (\n \"team\" text,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text\n);\n\nQuestion: Which Tries against have Points against larger than 109?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tries_against\") FROM \"pool_3\" WHERE \"points_against\">109;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text\n);\n\nQuestion: What Tries against that have a Points against of 95 and Tries for larger than 20?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"tries_against\") FROM \"pool_3\" WHERE \"points_against\"=95 AND \"tries_for\">20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text\n);\n\nQuestion: What Tries for has a Team of neath, and Points against larger than 109?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"tries_for\") FROM \"pool_3\" WHERE \"team\"='neath' AND \"points_against\">109;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_3\" (\n \"team\" text,\n \"tries_for\" real,\n \"tries_against\" real,\n \"try_diff\" text,\n \"points_for\" real,\n \"points_against\" real,\n \"points_diff\" text\n);\n\nQuestion: How many Points against that have a Team of harlequins and Tries against smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"points_against\") FROM \"pool_3\" WHERE \"team\"='harlequins' AND \"tries_against\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbo_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is the power that belongs to Class A with an Identifier of CBOC-FM?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"s_rebroadcaster_of_cbo_fm\" WHERE \"class\"='a' AND \"identifier\"='cboc-fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbo_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: Which class has a frequency of 91.9 fm?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"s_rebroadcaster_of_cbo_fm\" WHERE \"frequency\"='91.9 fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbo_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What power belongs to the LP Class and has an Identifier of CBLI?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"s_rebroadcaster_of_cbo_fm\" WHERE \"class\"='lp' AND \"identifier\"='cbli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbo_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: Which city has a C1 class and Identifier of CBCD-FM?"
},
{
"role": "assistant",
"content": "SELECT \"city_of_license\" FROM \"s_rebroadcaster_of_cbo_fm\" WHERE \"class\"='c1' AND \"identifier\"='cbcd-fm';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbo_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: Which Power has a CBLI Identifier?"
},
{
"role": "assistant",
"content": "SELECT \"power\" FROM \"s_rebroadcaster_of_cbo_fm\" WHERE \"identifier\"='cbli';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"s_rebroadcaster_of_cbo_fm\" (\n \"city_of_license\" text,\n \"identifier\" text,\n \"frequency\" text,\n \"power\" text,\n \"class\" text,\n \"rec_net\" text\n);\n\nQuestion: What is the RECNet belonging to Class A with a Power of 3,000 watts?"
},
{
"role": "assistant",
"content": "SELECT \"rec_net\" FROM \"s_rebroadcaster_of_cbo_fm\" WHERE \"class\"='a' AND \"power\"='3,000 watts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"tournament_3\" (\n \"date\" text,\n \"time\" text,\n \"score\" text,\n \"set_1\" text,\n \"set_2\" text,\n \"set_3\" text,\n \"total\" text,\n \"report\" text\n);\n\nQuestion: What is the report in the tournament that started at 12:30?"
},
{
"role": "assistant",
"content": "SELECT \"report\" FROM \"tournament_3\" WHERE \"time\"='12:30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: Which 2007 has a 2003 of 1r?"
},
{
"role": "assistant",
"content": "SELECT \"2007\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2003\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: Which 2006 has a 2012 of a, and a 2011 of 3r?"
},
{
"role": "assistant",
"content": "SELECT \"2006\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2012\"='a' AND \"2011\"='3r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: Which 2008 has a 2002 of a, and a Tournament of australian open?"
},
{
"role": "assistant",
"content": "SELECT \"2008\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2002\"='a' AND \"tournament\"='australian open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: Which 2012 has a 2008 of grand slam tournaments?"
},
{
"role": "assistant",
"content": "SELECT \"2012\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2008\"='grand slam tournaments';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: Which 2002 has a 2009 of 2r?"
},
{
"role": "assistant",
"content": "SELECT \"2002\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2009\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_slam_tournament_performance_timeli\" (\n \"tournament\" 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 \"2012\" text,\n \"win_pct\" text\n);\n\nQuestion: Which 2010 has a 2002 of 2r?"
},
{
"role": "assistant",
"content": "SELECT \"2010\" FROM \"grand_slam_tournament_performance_timeli\" WHERE \"2002\"='2r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"song\" text,\n \"canada_singles\" text,\n \"us_hot_100\" text,\n \"us_a_c\" text\n);\n\nQuestion: What is th US A.C. in 1985 with a US hot 100 of 57?"
},
{
"role": "assistant",
"content": "SELECT \"us_a_c\" FROM \"singles\" WHERE \"year\"=1985 AND \"us_hot_100\"='57';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"song\" text,\n \"canada_singles\" text,\n \"us_hot_100\" text,\n \"us_a_c\" text\n);\n\nQuestion: What is the Canada singles in 1979 with a US A.C. of 24?"
},
{
"role": "assistant",
"content": "SELECT \"canada_singles\" FROM \"singles\" WHERE \"year\"=1979 AND \"us_a_c\"='24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"singles\" (\n \"year\" real,\n \"song\" text,\n \"canada_singles\" text,\n \"us_hot_100\" text,\n \"us_a_c\" text\n);\n\nQuestion: What is the US A.C. in 1974?"
},
{
"role": "assistant",
"content": "SELECT \"us_a_c\" FROM \"singles\" WHERE \"year\"=1974;"
}
] |
[
{
"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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the average round of player Sammy Morris?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"nfl_draft\" WHERE \"player\"='sammy morris';"
}
] |
[
{
"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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the sum pick # of the player from round 4?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick_num\") FROM \"nfl_draft\" WHERE \"round\"=4;"
}
] |
[
{
"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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the player from Arizona State?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"college\"='arizona state';"
}
] |
[
{
"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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the sum of the round of the player who plays linebacker and has a pick # greater than 251?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"round\") FROM \"nfl_draft\" WHERE \"position\"='linebacker' AND \"pick_num\">251;"
}
] |
[
{
"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_num\" real,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Who is the player from Arizona state with a round less than 7?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"nfl_draft\" WHERE \"round\"<7 AND \"college\"='arizona 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: What's the highest week for the day of October 21, 1956?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"schedule\" WHERE \"date\"='october 21, 1956';"
}
] |
[
{
"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 least recent week number when the attendance is 16,562?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"='16,562';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_ultra_lightweight_tt_12\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: What is Country , when Rider is Lindsay Porter?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"1972_isle_of_man_ultra_lightweight_tt_12\" WHERE \"rider\"='lindsay porter';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_ultra_lightweight_tt_12\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: What is Time, when Speed is 87.49mph?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"1972_isle_of_man_ultra_lightweight_tt_12\" WHERE \"speed\"='87.49mph';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_ultra_lightweight_tt_12\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: What is Country, when Points are more than 12?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"1972_isle_of_man_ultra_lightweight_tt_12\" WHERE \"points\">12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_ultra_lightweight_tt_12\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: What is Speed, when Time is 1:24.23.0?"
},
{
"role": "assistant",
"content": "SELECT \"speed\" FROM \"1972_isle_of_man_ultra_lightweight_tt_12\" WHERE \"time\"='1:24.23.0';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_ultra_lightweight_tt_12\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: What is Country, when Time is 1:29.43.60?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"1972_isle_of_man_ultra_lightweight_tt_12\" WHERE \"time\"='1:29.43.60';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1972_isle_of_man_ultra_lightweight_tt_12\" (\n \"place\" real,\n \"rider\" text,\n \"country\" text,\n \"machine\" text,\n \"speed\" text,\n \"time\" text,\n \"points\" real\n);\n\nQuestion: What is the lowest Place, when Points are greater than 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"place\") FROM \"1972_isle_of_man_ultra_lightweight_tt_12\" WHERE \"points\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What team was the opponent when the result was l 0-27?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"result\"='l 0-27';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What team was the opponent on 09/20/1975?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='09/20/1975';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the Location of the game on 11/08/1975*?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"schedule\" WHERE \"date\"='11/08/1975*';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many gold medals were awarded to the team with more than 2 bronze and exactly 29 silver medals?"
},
{
"role": "assistant",
"content": "SELECT \"gold\" FROM \"medal_table\" WHERE \"bronze\">2 AND \"silver\"=29;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"motion_picture\" text,\n \"result\" text\n);\n\nQuestion: What is the latest year that Cicely Tyson is the Golden Globe Award actor?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"women\" WHERE \"actor\"='cicely tyson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"motion_picture\" text,\n \"result\" text\n);\n\nQuestion: What Motion Picture after 2003 had Viola Davis nominated for Best Supporting Actress?"
},
{
"role": "assistant",
"content": "SELECT \"motion_picture\" FROM \"women\" WHERE \"year\">2003 AND \"result\"='nominated' AND \"actor\"='viola davis' AND \"award\"='best supporting actress';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"motion_picture\" text,\n \"result\" text\n);\n\nQuestion: What Award has a date of 2002?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"women\" WHERE \"year\"=2002;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"motion_picture\" text,\n \"result\" text\n);\n\nQuestion: What Award was received bby the Motion Picture What's Love Got To Do With It?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"women\" WHERE \"motion_picture\"='what''s love got to do with it';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women\" (\n \"year\" real,\n \"actor\" text,\n \"award\" text,\n \"motion_picture\" text,\n \"result\" text\n);\n\nQuestion: What is the latest Year with Marianne Jean-Baptiste as the Golden Globe Actor?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"women\" WHERE \"actor\"='marianne jean-baptiste';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"title\" text,\n \"director\" text,\n \"production_cost\" text,\n \"singapore_gross\" text\n);\n\nQuestion: Which film was released in August 2004?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"2004\" WHERE \"date\"='august 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"title\" text,\n \"director\" text,\n \"production_cost\" text,\n \"singapore_gross\" text\n);\n\nQuestion: What was the production cost for the film directed by 2004?"
},
{
"role": "assistant",
"content": "SELECT \"production_cost\" FROM \"2004\" WHERE \"director\"='2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"title\" text,\n \"director\" text,\n \"production_cost\" text,\n \"singapore_gross\" text\n);\n\nQuestion: What film did Pen-Ek Ratanaruang direct?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"2004\" WHERE \"director\"='pen-ek ratanaruang';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"title\" text,\n \"director\" text,\n \"production_cost\" text,\n \"singapore_gross\" text\n);\n\nQuestion: When was the film directed by Pen-Ek Ratanaruang released?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"2004\" WHERE \"director\"='pen-ek ratanaruang';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2004\" (\n \"date\" text,\n \"title\" text,\n \"director\" text,\n \"production_cost\" text,\n \"singapore_gross\" text\n);\n\nQuestion: Who directed Tequila?"
},
{
"role": "assistant",
"content": "SELECT \"director\" FROM \"2004\" WHERE \"title\"='tequila';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_special_representatives\" (\n \"name\" text,\n \"born_died\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"country\" text\n);\n\nQuestion: Who left office in June 2011?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_special_representatives\" WHERE \"left_office\"='june 2011';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_special_representatives\" (\n \"name\" text,\n \"born_died\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"country\" text\n);\n\nQuestion: What is the Born-Died date for the Representative of Italy?"
},
{
"role": "assistant",
"content": "SELECT \"born_died\" FROM \"list_of_special_representatives\" WHERE \"country\"='italy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_special_representatives\" (\n \"name\" text,\n \"born_died\" text,\n \"took_office\" text,\n \"left_office\" text,\n \"country\" text\n);\n\nQuestion: What is the country of the Representative that left office as incumbent?"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"list_of_special_representatives\" WHERE \"left_office\"='incumbent';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is Package/Option, when Language is Italian, and when Television Service is Sky Radio?"
},
{
"role": "assistant",
"content": "SELECT \"package_option\" FROM \"music\" WHERE \"language\"='italian' AND \"television_service\"='sky radio';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is HDTV, when Television Service is MTV Rocks?"
},
{
"role": "assistant",
"content": "SELECT \"hdtv\" FROM \"music\" WHERE \"television_service\"='mtv rocks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is Television Service, when HDTV is No, and when Language is Italian?"
},
{
"role": "assistant",
"content": "SELECT \"television_service\" FROM \"music\" WHERE \"hdtv\"='no' AND \"language\"='italian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is Television Service, when Package/Option is Sky Famiglia, and when Language is Italian?"
},
{
"role": "assistant",
"content": "SELECT \"television_service\" FROM \"music\" WHERE \"package_option\"='sky famiglia' AND \"language\"='italian';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"music\" (\n \"television_service\" text,\n \"country\" text,\n \"language\" text,\n \"content\" text,\n \"hdtv\" text,\n \"package_option\" text\n);\n\nQuestion: What is HDTV, when Language is English, and when Television Service is MTV Dance?"
},
{
"role": "assistant",
"content": "SELECT \"hdtv\" FROM \"music\" WHERE \"language\"='english' AND \"television_service\"='mtv dance';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"one_day_batting_statistics\" (\n \"player\" text,\n \"matches\" real,\n \"innings\" real,\n \"not_out\" real,\n \"runs\" real,\n \"high_score\" text,\n \"average\" text,\n \"strike_rate\" text,\n \"100s\" real\n);\n\nQuestion: What is the mean number of matches when the strike rate is 87.37 and the 100s is less than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"matches\") FROM \"one_day_batting_statistics\" WHERE \"strike_rate\"='87.37' AND \"100s\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"one_day_batting_statistics\" (\n \"player\" text,\n \"matches\" real,\n \"innings\" real,\n \"not_out\" real,\n \"runs\" real,\n \"high_score\" text,\n \"average\" text,\n \"strike_rate\" text,\n \"100s\" real\n);\n\nQuestion: How many average 100s were there for Tim Bresnan?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"100s\") FROM \"one_day_batting_statistics\" WHERE \"player\"='tim bresnan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"services\" (\n \"platform\" real,\n \"frequency_per_hour\" real,\n \"destination\" text,\n \"service_pattern\" text,\n \"operator\" text,\n \"line\" text\n);\n\nQuestion: How many Platforms have a Frequency of less than 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"platform\") FROM \"services\" WHERE \"frequency_per_hour\"<2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"name_v_t_e\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthplace\" text,\n \"1999_2000_team\" text\n);\n\nQuestion: What is the 1999-2000 team, when the Height (cm) is less than 187, and when the Birthplace is Cloquet, Minnesota?"
},
{
"role": "assistant",
"content": "SELECT \"1999_2000_team\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"height_cm\"<187 AND \"birthplace\"='cloquet, minnesota';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"name_v_t_e\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthplace\" text,\n \"1999_2000_team\" text\n);\n\nQuestion: What is the Name v t e, when the Height (cm) is greater than 179, and when the 1999-2000 team is Chicago Blackhawks?"
},
{
"role": "assistant",
"content": "SELECT \"name_v_t_e\" FROM \"list_of_united_states_national_ice_hocke\" WHERE \"height_cm\">179 AND \"1999_2000_team\"='chicago blackhawks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_united_states_national_ice_hocke\" (\n \"position\" text,\n \"name_v_t_e\" text,\n \"height_cm\" real,\n \"weight_kg\" real,\n \"birthplace\" text,\n \"1999_2000_team\" text\n);\n\nQuestion: What is the sum of Height (cm), when the Weight (kg) is 90?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"height_cm\") FROM \"list_of_united_states_national_ice_hocke\" WHERE \"weight_kg\"=90;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"pct\" text\n);\n\nQuestion: Which Losses have a Pct of .451 and Finished 6th?"
},
{
"role": "assistant",
"content": "SELECT \"losses\" FROM \"seasons\" WHERE \"pct\"='.451' AND \"finish\"='6th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"pct\" text\n);\n\nQuestion: Which season has Losses of 30?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"seasons\" WHERE \"losses\"='30';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"pct\" text\n);\n\nQuestion: In which Season was the Division Washington Bullets?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"seasons\" WHERE \"division\"='washington bullets';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"seasons\" (\n \"season\" text,\n \"division\" text,\n \"finish\" text,\n \"wins\" text,\n \"losses\" text,\n \"pct\" text\n);\n\nQuestion: In which season were there Wins of 29 and a Finished place of 3rd?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"seasons\" WHERE \"wins\"='29' AND \"finish\"='3rd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"charter_airlines\" (\n \"airline\" text,\n \"fleet_size\" real,\n \"notes\" text,\n \"iosa_iata\" text,\n \"easa_eu\" text,\n \"iasa_faa\" text\n);\n\nQuestion: What is the EASA (EU) when the notes show aoc 135?"
},
{
"role": "assistant",
"content": "SELECT \"easa_eu\" FROM \"charter_airlines\" WHERE \"notes\"='aoc 135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"charter_airlines\" (\n \"airline\" text,\n \"fleet_size\" real,\n \"notes\" text,\n \"iosa_iata\" text,\n \"easa_eu\" text,\n \"iasa_faa\" text\n);\n\nQuestion: What is the Notes when the fleet size is 3?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"charter_airlines\" WHERE \"fleet_size\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"charter_airlines\" (\n \"airline\" text,\n \"fleet_size\" real,\n \"notes\" text,\n \"iosa_iata\" text,\n \"easa_eu\" text,\n \"iasa_faa\" text\n);\n\nQuestion: What is the Fleet Size when the EASA (EU) is no?"
},
{
"role": "assistant",
"content": "SELECT \"fleet_size\" FROM \"charter_airlines\" WHERE \"easa_eu\"='no';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"charter_airlines\" (\n \"airline\" text,\n \"fleet_size\" real,\n \"notes\" text,\n \"iosa_iata\" text,\n \"easa_eu\" text,\n \"iasa_faa\" text\n);\n\nQuestion: hat is the Airline when the EASA (EU) is yes?"
},
{
"role": "assistant",
"content": "SELECT \"airline\" FROM \"charter_airlines\" WHERE \"easa_eu\"='yes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"charter_airlines\" (\n \"airline\" text,\n \"fleet_size\" real,\n \"notes\" text,\n \"iosa_iata\" text,\n \"easa_eu\" text,\n \"iasa_faa\" text\n);\n\nQuestion: What is the Airline when the notes show aoc 135?"
},
{
"role": "assistant",
"content": "SELECT \"airline\" FROM \"charter_airlines\" WHERE \"notes\"='aoc 135';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the highest Year with a Competition that is new york city marathon?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"year\") FROM \"achievements\" WHERE \"competition\"='new york city marathon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"notes\" text\n);\n\nQuestion: What is the Notes with a Venue that is venice, italy?"
},
{
"role": "assistant",
"content": "SELECT \"notes\" FROM \"achievements\" WHERE \"venue\"='venice, italy';"
}
] |
[
{
"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 \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 1994, when 2002 is ATP Masters Series?"
},
{
"role": "assistant",
"content": "SELECT \"1994\" FROM \"doubles_performance_timeline\" WHERE \"2002\"='atp masters series';"
}
] |
[
{
"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 \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 2001, when 1987 is N/A, and when Career SR is N/A?"
},
{
"role": "assistant",
"content": "SELECT \"2001\" FROM \"doubles_performance_timeline\" WHERE \"1987\"='n/a' AND \"career_sr\"='n/a';"
}
] |
[
{
"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 \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 1989, when 1999 is F, and when 1994 is 2R?"
},
{
"role": "assistant",
"content": "SELECT \"1989\" FROM \"doubles_performance_timeline\" WHERE \"1999\"='f' AND \"1994\"='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 \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 2001, when 1990 is A, when 1987 is NME, and when 1997 is 1R?"
},
{
"role": "assistant",
"content": "SELECT \"2001\" FROM \"doubles_performance_timeline\" WHERE \"1990\"='a' AND \"1987\"='nme' AND \"1997\"='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 \"1987\" text,\n \"1988\" text,\n \"1989\" text,\n \"1990\" text,\n \"1991\" text,\n \"1992\" text,\n \"1993\" text,\n \"1994\" text,\n \"1995\" text,\n \"1996\" text,\n \"1997\" text,\n \"1998\" text,\n \"1999\" text,\n \"2000\" text,\n \"2001\" text,\n \"2002\" text,\n \"2003\" text,\n \"career_sr\" text,\n \"career_win_loss\" text\n);\n\nQuestion: What is 1997, when 2003 is 0 / 4?"
},
{
"role": "assistant",
"content": "SELECT \"1997\" FROM \"doubles_performance_timeline\" WHERE \"2003\"='0 / 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hits_on_german_ships\" (\n \"ship\" text,\n \"13_5_inch_1400lb\" real,\n \"13_5_inch_1250lb\" real,\n \"12_inch\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest 13.5-inch/1400lb with a 13.5-inch/1250lb less than 2, a 12-inch of 0, and a Total larger than 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"13_5_inch_1400lb\") FROM \"hits_on_german_ships\" WHERE \"13_5_inch_1250lb\"<2 AND \"12_inch\"=0 AND \"total\">8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hits_on_german_ships\" (\n \"ship\" text,\n \"13_5_inch_1400lb\" real,\n \"13_5_inch_1250lb\" real,\n \"12_inch\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest 12-inch when the 13.5-inch/1250lb was 0, and the ship is seydlitz?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"12_inch\") FROM \"hits_on_german_ships\" WHERE \"13_5_inch_1250lb\"=0 AND \"ship\"='seydlitz';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hits_on_german_ships\" (\n \"ship\" text,\n \"13_5_inch_1400lb\" real,\n \"13_5_inch_1250lb\" real,\n \"12_inch\" real,\n \"total\" real\n);\n\nQuestion: What is the lowest 13.5-inch/1400lb with a 13.5-inch/1250lb of more than 1, and a 12-inch smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"13_5_inch_1400lb\") FROM \"hits_on_german_ships\" WHERE \"13_5_inch_1250lb\">1 AND \"12_inch\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hits_on_german_ships\" (\n \"ship\" text,\n \"13_5_inch_1400lb\" real,\n \"13_5_inch_1250lb\" real,\n \"12_inch\" real,\n \"total\" real\n);\n\nQuestion: What is the average Total when the ship was l\u00fctzow, with a 13.5-inch/1400lb smaller than 0?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"hits_on_german_ships\" WHERE \"ship\"='l\u00fctzow' AND \"13_5_inch_1400lb\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"hits_on_german_ships\" (\n \"ship\" text,\n \"13_5_inch_1400lb\" real,\n \"13_5_inch_1250lb\" real,\n \"12_inch\" real,\n \"total\" real\n);\n\nQuestion: What is the highest Total when the ship was l\u00fctzow, and a 12-inch less than 8?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"total\") FROM \"hits_on_german_ships\" WHERE \"ship\"='l\u00fctzow' AND \"12_inch\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_14th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the average total 0 are nominated by the Taoiseach and the agricultural panel is greater than 5?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"composition_of_the_14th_seanad\" WHERE \"nominated_by_the_taoiseach\"=0 AND \"agricultural_panel\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_14th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the total of the cultural and educational panel when the industrial and commercial panel is 0 and the agricultural panel is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"cultural_and_educational_panel\") FROM \"composition_of_the_14th_seanad\" WHERE \"industrial_and_commercial_panel\"=0 AND \"agricultural_panel\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_14th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the total for the University of Dublin when 2 are nominated by Taoiseach and the industrial and commercial panel is greater than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"university_of_dublin\") FROM \"composition_of_the_14th_seanad\" WHERE \"nominated_by_the_taoiseach\"=2 AND \"industrial_and_commercial_panel\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_14th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the highest labour panel when the university of dublin is less than 2 and the agricultural panel is greater than 5?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"labour_panel\") FROM \"composition_of_the_14th_seanad\" WHERE \"university_of_dublin\"<2 AND \"agricultural_panel\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"composition_of_the_14th_seanad\" (\n \"administrative_panel\" real,\n \"agricultural_panel\" real,\n \"cultural_and_educational_panel\" real,\n \"industrial_and_commercial_panel\" real,\n \"labour_panel\" real,\n \"national_university_of_ireland\" real,\n \"university_of_dublin\" real,\n \"nominated_by_the_taoiseach\" real,\n \"total\" real\n);\n\nQuestion: What is the average for the university of dublin when the industrial and commercial panel is greater than 4 and the total of the national university of ireland is larger than 3?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"university_of_dublin\") FROM \"composition_of_the_14th_seanad\" WHERE \"industrial_and_commercial_panel\">4 AND \"national_university_of_ireland\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chinese_professional_baseball_league\" (\n \"year\" real,\n \"winning_team\" text,\n \"losing_team\" text,\n \"score\" text,\n \"site\" text\n);\n\nQuestion: When has a Site of tainan city and a Score of 8\u20136?"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"chinese_professional_baseball_league\" WHERE \"site\"='tainan city' AND \"score\"='8\u20136';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"chinese_professional_baseball_league\" (\n \"year\" real,\n \"winning_team\" text,\n \"losing_team\" text,\n \"score\" text,\n \"site\" text\n);\n\nQuestion: Which Score that has a Winning team of wei chuan dragons?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"chinese_professional_baseball_league\" WHERE \"winning_team\"='wei chuan dragons';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world\" (\n \"rank\" real,\n \"city_1\" text,\n \"city_2\" text,\n \"2012_passengers_in_millions\" real,\n \"2011_passengers_in_millions\" text,\n \"distance\" text\n);\n\nQuestion: What is the number of 2011 passengers in millions that have traveled a distance of 1271km?"
},
{
"role": "assistant",
"content": "SELECT \"2011_passengers_in_millions\" FROM \"world\" WHERE \"distance\"='1271km';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world\" (\n \"rank\" real,\n \"city_1\" text,\n \"city_2\" text,\n \"2012_passengers_in_millions\" real,\n \"2011_passengers_in_millions\" text,\n \"distance\" text\n);\n\nQuestion: What is the number of 2012 passengers in millions that have traveled a distance of 1075km?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"2012_passengers_in_millions\") FROM \"world\" WHERE \"distance\"='1075km';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"world\" (\n \"rank\" real,\n \"city_1\" text,\n \"city_2\" text,\n \"2012_passengers_in_millions\" real,\n \"2011_passengers_in_millions\" text,\n \"distance\" text\n);\n\nQuestion: What is the City 1 that has less than 8.211 million passengers and traveled 1075km in distance?"
},
{
"role": "assistant",
"content": "SELECT \"city_1\" FROM \"world\" WHERE \"2012_passengers_in_millions\"<8.211 AND \"distance\"='1075km';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992_93_to_1996_97\" (\n \"season\" text,\n \"first\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text\n);\n\nQuestion: What is SECOND, when SIXTH is Victoria?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"1992_93_to_1996_97\" WHERE \"sixth\"='victoria';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1992_93_to_1996_97\" (\n \"season\" text,\n \"first\" text,\n \"second\" text,\n \"third\" text,\n \"fourth\" text,\n \"fifth\" text,\n \"sixth\" text\n);\n\nQuestion: What is SECOND, when FIRST is Western Australia?"
},
{
"role": "assistant",
"content": "SELECT \"second\" FROM \"1992_93_to_1996_97\" WHERE \"first\"='western australia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"torneio_rio_s_o_paulo\" (\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: How many losses does corinthians have when they scored over 22 points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"torneio_rio_s_o_paulo\" WHERE \"team\"='corinthians' AND \"points\">22;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_line_of_headphones\" (\n \"headphone_model\" text,\n \"headphone_class\" text,\n \"driver_matched_d_b\" real,\n \"construction\" text,\n \"earpads\" text,\n \"termination\" text,\n \"us_msrp\" text\n);\n\nQuestion: What was the termination type for the headphones with comfort pads and selling for $150?"
},
{
"role": "assistant",
"content": "SELECT \"termination\" FROM \"current_line_of_headphones\" WHERE \"earpads\"='comfort pads' AND \"us_msrp\"='$150';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_line_of_headphones\" (\n \"headphone_model\" text,\n \"headphone_class\" text,\n \"driver_matched_d_b\" real,\n \"construction\" text,\n \"earpads\" text,\n \"termination\" text,\n \"us_msrp\" text\n);\n\nQuestion: What are the earpads for the headphones that are Reference class and have MSRP of $695?"
},
{
"role": "assistant",
"content": "SELECT \"earpads\" FROM \"current_line_of_headphones\" WHERE \"headphone_class\"='reference' AND \"us_msrp\"='$695';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"current_line_of_headphones\" (\n \"headphone_model\" text,\n \"headphone_class\" text,\n \"driver_matched_d_b\" real,\n \"construction\" text,\n \"earpads\" text,\n \"termination\" text,\n \"us_msrp\" text\n);\n\nQuestion: What earpads do the headphones with driver-matched dB over 0.05 and MSRP of $79 have?"
},
{
"role": "assistant",
"content": "SELECT \"earpads\" FROM \"current_line_of_headphones\" WHERE \"driver_matched_d_b\">0.05 AND \"us_msrp\"='$79';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"race_name\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner_s\" text,\n \"team\" text\n);\n\nQuestion: What is the name of the race from round 1?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"calendar\" WHERE \"round\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"calendar\" (\n \"round\" real,\n \"race_name\" text,\n \"circuit\" text,\n \"city_state\" text,\n \"date\" text,\n \"winner_s\" text,\n \"team\" text\n);\n\nQuestion: Which race was in Sydney, New South Wales?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"calendar\" WHERE \"city_state\"='sydney, new south wales';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.