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 \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: I want the driver with Laps larger than 16 with a ferrari and grid less than 15"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"race\" WHERE \"laps\">16 AND \"constructor\"='ferrari' AND \"grid\"<15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 46 \u221a with a D 43 \u221a with r 3?"
},
{
"role": "assistant",
"content": "SELECT \"d_46\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_43\"='r 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 43 \u221a with a D 49 \u221a with d 49 \u221a?"
},
{
"role": "assistant",
"content": "SELECT \"d_43\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_49\"='d 49 \u221a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 48 \u221a with a D 46 \u221a with r 33 o?"
},
{
"role": "assistant",
"content": "SELECT \"d_48\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_46\"='r 33 o';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 48 \u221a with a D 49 \u221a with r 9?"
},
{
"role": "assistant",
"content": "SELECT \"d_48\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_49\"='r 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 46 \u221a with a D 41 \u221a with d 38 \u221a?"
},
{
"role": "assistant",
"content": "SELECT \"d_46\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_41\"='d 38 \u221a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate_composition_as_a_result_of_the_el\" (\n \"d_49\" text,\n \"d_48\" text,\n \"d_47\" text,\n \"d_46\" text,\n \"d_45\" text,\n \"d_44\" text,\n \"d_43\" text,\n \"d_42\" text,\n \"d_41\" text\n);\n\nQuestion: What is the D 45 \u221a with a D 46 \u221a with d 46 \u221a?"
},
{
"role": "assistant",
"content": "SELECT \"d_45\" FROM \"senate_composition_as_a_result_of_the_el\" WHERE \"d_46\"='d 46 \u221a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which constructor was there for the race with 25 laps?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"classification\" WHERE \"laps\"=25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which driver had brm as a constructor and a time/retired of engine?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"constructor\"='brm' AND \"time_retired\"='engine';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repeaters\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the call sign for a class of A?"
},
{
"role": "assistant",
"content": "SELECT \"call_sign\" FROM \"repeaters\" WHERE \"class\"='a';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repeaters\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the average frequency MHz for license of eastville, virginia?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"frequency_m_hz\") FROM \"repeaters\" WHERE \"city_of_license\"='eastville, virginia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"repeaters\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What is the average ERP W when the call sign is whre?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"erp_w\") FROM \"repeaters\" WHERE \"call_sign\"='whre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kaipatiki_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What is the name of the school in Hillcrest?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"kaipatiki_local_board\" WHERE \"area\"='hillcrest';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kaipatiki_local_board\" (\n \"name\" text,\n \"years\" text,\n \"gender\" text,\n \"area\" text,\n \"authority\" text,\n \"decile\" real,\n \"roll\" real\n);\n\nQuestion: What are the years available at Bayview School, which has state authority and a roll number larger than 333?"
},
{
"role": "assistant",
"content": "SELECT \"years\" FROM \"kaipatiki_local_board\" WHERE \"authority\"='state' AND \"roll\">333 AND \"name\"='bayview school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2007_rugby_world_cup_squads\" (\n \"player\" text,\n \"position\" text,\n \"date_of_birth_age\" text,\n \"caps\" real,\n \"club_province\" text\n);\n\nQuestion: When was Tomokazu Soma born who plays for the wild knights?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_birth_age\" FROM \"2007_rugby_world_cup_squads\" WHERE \"club_province\"='wild knights' AND \"player\"='tomokazu soma';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: On November 19, 2008 what was the score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='november 19, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the score on February 23, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"international_goals\" WHERE \"date\"='february 23, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"date\" text,\n \"venue\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What is the result foe October 12, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"international_goals\" WHERE \"date\"='october 12, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: How many events for orville moody, ranking below 3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"events\") FROM \"leaders\" WHERE \"rank\">3 AND \"player\"='orville moody';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"events\" real,\n \"wins\" real\n);\n\nQuestion: What is the rank for don january with over 2 wins and over 17 events?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"rank\") FROM \"leaders\" WHERE \"wins\">2 AND \"player\"='don january' AND \"events\">17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the score of the Home team of geelong?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_6\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Away team has a Home team of south melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_6\" WHERE \"home_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Away team has a Venue of arden street oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_6\" WHERE \"venue\"='arden street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Away team score has a Venue of scg?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_6\" WHERE \"venue\"='scg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What school has the player of mike rosario?"
},
{
"role": "assistant",
"content": "SELECT \"school\" FROM \"2008_boys_team\" WHERE \"player\"='mike rosario';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2008_boys_team\" (\n \"player\" text,\n \"height\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text,\n \"nba_draft\" text\n);\n\nQuestion: What was the nba draft for al-farouq aminu?"
},
{
"role": "assistant",
"content": "SELECT \"nba_draft\" FROM \"2008_boys_team\" WHERE \"player\"='al-farouq aminu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the average attendance of a team with a 38\u201331\u20138 record?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"march\" WHERE \"record\"='38\u201331\u20138';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the smallest grid for Bob Anderson?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"classification\" WHERE \"driver\"='bob anderson';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_j\" (\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 was the time when the score was 0\u20133?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"pool_j\" WHERE \"score\"='0\u20133';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pool_j\" (\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 was the first set with a third set of 25\u201321?"
},
{
"role": "assistant",
"content": "SELECT \"set_1\" FROM \"pool_j\" WHERE \"set_3\"='25\u201321';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_fbs_football_win_loss_re\" (\n \"pac_12\" text,\n \"lost\" real,\n \"tied\" real,\n \"pct\" real,\n \"years\" real,\n \"total_games\" real\n);\n\nQuestion: How many total games associated with the Pac-12 of california and 117 years?"
},
{
"role": "assistant",
"content": "SELECT \"total_games\" FROM \"ncaa_division_i_fbs_football_win_loss_re\" WHERE \"years\"=117 AND \"pac_12\"='california';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_fbs_football_win_loss_re\" (\n \"pac_12\" text,\n \"lost\" real,\n \"tied\" real,\n \"pct\" real,\n \"years\" real,\n \"total_games\" real\n);\n\nQuestion: How many games tied for the team with over 94 years in the conference, lost under 5,297 games, and a percentage higher than 0.6106?"
},
{
"role": "assistant",
"content": "SELECT \"tied\" FROM \"ncaa_division_i_fbs_football_win_loss_re\" WHERE \"years\">94 AND \"lost\"<'5,297' AND \"pct\">0.6106;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_fbs_football_win_loss_re\" (\n \"pac_12\" text,\n \"lost\" real,\n \"tied\" real,\n \"pct\" real,\n \"years\" real,\n \"total_games\" real\n);\n\nQuestion: What is the average number of years associated with 51 games tied and over 1184 total games?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"years\") FROM \"ncaa_division_i_fbs_football_win_loss_re\" WHERE \"tied\"=51 AND \"total_games\">1184;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ncaa_division_i_fbs_football_win_loss_re\" (\n \"pac_12\" text,\n \"lost\" real,\n \"tied\" real,\n \"pct\" real,\n \"years\" real,\n \"total_games\" real\n);\n\nQuestion: What is the highest number of games tied for teams with under 551 games and a percentage of under 0.5593?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"tied\") FROM \"ncaa_division_i_fbs_football_win_loss_re\" WHERE \"pct\"<0.5593 AND \"lost\"=551;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passengers_carried_in_2011\" (\n \"rank\" real,\n \"airline\" text,\n \"country\" text,\n \"remarks\" text,\n \"alliance\" text\n);\n\nQuestion: Name the country for airline of gol"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"passengers_carried_in_2011\" WHERE \"airline\"='gol';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"passengers_carried_in_2011\" (\n \"rank\" real,\n \"airline\" text,\n \"country\" text,\n \"remarks\" text,\n \"alliance\" text\n);\n\nQuestion: Name the airline for rank of 4"
},
{
"role": "assistant",
"content": "SELECT \"airline\" FROM \"passengers_carried_in_2011\" WHERE \"rank\"=4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_performances\" (\n \"week\" text,\n \"performer_s\" text,\n \"hot_100_reaction\" text,\n \"hot_digital_songs_reaction\" text,\n \"notes\" text\n);\n\nQuestion: What digital reaction has a hot 100 reaction of 4 (+4)?"
},
{
"role": "assistant",
"content": "SELECT \"hot_digital_songs_reaction\" FROM \"guest_performances\" WHERE \"hot_100_reaction\"='4 (+4)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_performances\" (\n \"week\" text,\n \"performer_s\" text,\n \"hot_100_reaction\" text,\n \"hot_digital_songs_reaction\" text,\n \"notes\" text\n);\n\nQuestion: What digital reaction has hot 100 reaction of 2 (+1)?"
},
{
"role": "assistant",
"content": "SELECT \"hot_digital_songs_reaction\" FROM \"guest_performances\" WHERE \"hot_100_reaction\"='2 (+1)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_performances\" (\n \"week\" text,\n \"performer_s\" text,\n \"hot_100_reaction\" text,\n \"hot_digital_songs_reaction\" text,\n \"notes\" text\n);\n\nQuestion: Which week has hot 100 reaction as did not debut for Natalie Cole?"
},
{
"role": "assistant",
"content": "SELECT \"week\" FROM \"guest_performances\" WHERE \"hot_100_reaction\"='did not debut' AND \"performer_s\"='natalie cole';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_performances\" (\n \"week\" text,\n \"performer_s\" text,\n \"hot_100_reaction\" text,\n \"hot_digital_songs_reaction\" text,\n \"notes\" text\n);\n\nQuestion: What is the hot 100 reaction in week of top 13 for Kanye West?"
},
{
"role": "assistant",
"content": "SELECT \"hot_100_reaction\" FROM \"guest_performances\" WHERE \"week\"='top 13' AND \"performer_s\"='kanye west';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"guest_performances\" (\n \"week\" text,\n \"performer_s\" text,\n \"hot_100_reaction\" text,\n \"hot_digital_songs_reaction\" text,\n \"notes\" text\n);\n\nQuestion: What is the digital reaction for week of top 5 for Taylor Hicks?"
},
{
"role": "assistant",
"content": "SELECT \"hot_digital_songs_reaction\" FROM \"guest_performances\" WHERE \"week\"='top 5' AND \"performer_s\"='taylor hicks';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which Time/Retired had a grid number bigger than 1 and whose driver was Damon Hill?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"grid\">1 AND \"driver\"='damon hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Which lap number had Olivier Panis as a driver?"
},
{
"role": "assistant",
"content": "SELECT \"laps\" FROM \"classification\" WHERE \"driver\"='olivier panis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the grid when the time/retired is oil pressure and the laps are more than 50?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"grid\") FROM \"classification\" WHERE \"time_retired\"='oil pressure' AND \"laps\">50;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: what is the grid when the time/retired is 1:46:42.3?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"classification\" WHERE \"time_retired\"='1:46:42.3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the attendance when Fitzroy played as the away team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_12\" WHERE \"away_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the home team score at Western Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"venue\"='western oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team when the attendance was more than 20,283?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_12\" WHERE \"crowd\">'20,283';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: On April 29, with a game larger than 2, what is the high points?"
},
{
"role": "assistant",
"content": "SELECT \"high_points\" FROM \"playoffs\" WHERE \"game\">2 AND \"date\"='april 29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What was the score for Game 3?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"playoffs\" WHERE \"game\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the grid total for cars that went 17 laps?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"classification\" WHERE \"laps\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medal_table\" (\n \"rank\" real,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How many golds for the nation ranked below 5 and over 1 bronze medals?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medal_table\" WHERE \"rank\">5 AND \"bronze\"<1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: During footscray's home match, who was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: On which date did an away team score 9.16 (70)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_12\" WHERE \"away_team_score\"='9.16 (70)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: Which format had a United States region and a date of August 11, 2009?"
},
{
"role": "assistant",
"content": "SELECT \"format\" FROM \"release_history\" WHERE \"region\"='united states' AND \"date\"='august 11, 2009';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: Which date had a Japan region?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"release_history\" WHERE \"region\"='japan';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: Which region had a catalogue number of 9362482872?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"catalogue\"='9362482872';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: Which region had the date of November 18, 2002?"
},
{
"role": "assistant",
"content": "SELECT \"region\" FROM \"release_history\" WHERE \"date\"='november 18, 2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: Which label had a Japan region and a date of November 3, 2004?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"region\"='japan' AND \"date\"='november 3, 2004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"region\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue\" text\n);\n\nQuestion: Which label had a CD format and a date of June 25, 2002?"
},
{
"role": "assistant",
"content": "SELECT \"label\" FROM \"release_history\" WHERE \"format\"='cd' AND \"date\"='june 25, 2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_recognition\" (\n \"year\" real,\n \"result\" text,\n \"award\" text,\n \"film_or_series\" text,\n \"character\" text\n);\n\nQuestion: What award was nominated in 2007?"
},
{
"role": "assistant",
"content": "SELECT \"award\" FROM \"awards_and_recognition\" WHERE \"result\"='nominated' AND \"year\"=2007;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards_and_recognition\" (\n \"year\" real,\n \"result\" text,\n \"award\" text,\n \"film_or_series\" text,\n \"character\" text\n);\n\nQuestion: What year did was the Inside Soap Awards won?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"awards_and_recognition\" WHERE \"result\"='won' AND \"award\"='inside soap awards';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: What was the record for the game on April 9, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"april\" WHERE \"date\"='april 9, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"april\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"leading_scorer\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the leading scorer on April 9, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"april\" WHERE \"date\"='april 9, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_4\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: in a game against st kilda, what was the away team's score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_4\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_19\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: In the match where geelong was the away team, who was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_19\" WHERE \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What did the away team score when the home team scored 12.11 (83)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_9\" WHERE \"home_team_score\"='12.11 (83)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the home team in the game where the away team scored 14.19 (103)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_9\" WHERE \"away_team_score\"='14.19 (103)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"result_of_the_24th_election_to_the_new_z\" (\n \"party\" text,\n \"leader\" text,\n \"votes\" real,\n \"percentage\" text,\n \"seats\" real\n);\n\nQuestion: What is the number of votes for the party which got more than 28 seats?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"votes\") FROM \"result_of_the_24th_election_to_the_new_z\" WHERE \"seats\">28;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"result_of_the_24th_election_to_the_new_z\" (\n \"party\" text,\n \"leader\" text,\n \"votes\" real,\n \"percentage\" text,\n \"seats\" real\n);\n\nQuestion: What is the number of votes for the Party of Labour?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"votes\") FROM \"result_of_the_24th_election_to_the_new_z\" WHERE \"party\"='labour';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"result_of_the_24th_election_to_the_new_z\" (\n \"party\" text,\n \"leader\" text,\n \"votes\" real,\n \"percentage\" text,\n \"seats\" real\n);\n\nQuestion: What is the percentage of votes for the party that has Seats of 80?"
},
{
"role": "assistant",
"content": "SELECT \"percentage\" FROM \"result_of_the_24th_election_to_the_new_z\" WHERE \"seats\"=80;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"result_of_the_24th_election_to_the_new_z\" (\n \"party\" text,\n \"leader\" text,\n \"votes\" real,\n \"percentage\" text,\n \"seats\" real\n);\n\nQuestion: Who is the leader of the party which has Seats less than 28, a percentage of votes 54.03, and more votes than 120,801?"
},
{
"role": "assistant",
"content": "SELECT \"leader\" FROM \"result_of_the_24th_election_to_the_new_z\" WHERE \"seats\"<28 AND \"percentage\"='54.03' AND \"votes\">'120,801';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"result_of_the_24th_election_to_the_new_z\" (\n \"party\" text,\n \"leader\" text,\n \"votes\" real,\n \"percentage\" text,\n \"seats\" real\n);\n\nQuestion: Which highest number of Seats has votes of 244,867?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"seats\") FROM \"result_of_the_24th_election_to_the_new_z\" WHERE \"votes\"='244,867';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the Away team score when the Home team had a score of 13.12 (90)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_1\" WHERE \"home_team_score\"='13.12 (90)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the lowest Crowd of the game that had an Away team score of 13.17 (95)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_1\" WHERE \"away_team_score\"='13.17 (95)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the Date of the game of the Home team of melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_1\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score of the Home team in the game that had the Away team of south melbourne?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_1\" WHERE \"away_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: what was the away team for the north melbourne home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"home_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: what was the away team score in a game with north melbourne as home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_2\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: what was the away team with st kilda as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_2\" WHERE \"away_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: How many yards for the player with 20 solo tackles and under 0 TDs?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"yards\") FROM \"defense\" WHERE \"solo\"=20 AND \"td_s\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"defense\" (\n \"player\" text,\n \"tackles\" real,\n \"solo\" real,\n \"assisted\" real,\n \"sack\" real,\n \"yards\" real,\n \"td_s\" real\n);\n\nQuestion: How many yards for the player with 1 solo tackle and over 0 sacks?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"yards\") FROM \"defense\" WHERE \"solo\"=1 AND \"sack\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"hand\" text,\n \"1_credit\" text,\n \"2_credits\" text,\n \"3_credits\" text,\n \"4_credits\" text,\n \"5_credits\" text\n);\n\nQuestion: What does a hand of Theoretical return have as a 3 credit?"
},
{
"role": "assistant",
"content": "SELECT \"3_credits\" FROM \"see_also\" WHERE \"hand\"='theoretical return';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"hand\" text,\n \"1_credit\" text,\n \"2_credits\" text,\n \"3_credits\" text,\n \"4_credits\" text,\n \"5_credits\" text\n);\n\nQuestion: Which hand results in a 2 credits of 16?"
},
{
"role": "assistant",
"content": "SELECT \"hand\" FROM \"see_also\" WHERE \"2_credits\"='16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"hand\" text,\n \"1_credit\" text,\n \"2_credits\" text,\n \"3_credits\" text,\n \"4_credits\" text,\n \"5_credits\" text\n);\n\nQuestion: What does full house have as a 5 credits?"
},
{
"role": "assistant",
"content": "SELECT \"5_credits\" FROM \"see_also\" WHERE \"hand\"='full house';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"hand\" text,\n \"1_credit\" text,\n \"2_credits\" text,\n \"3_credits\" text,\n \"4_credits\" text,\n \"5_credits\" text\n);\n\nQuestion: What is the 2 credits of a hand that has a 3 credits of 180?"
},
{
"role": "assistant",
"content": "SELECT \"2_credits\" FROM \"see_also\" WHERE \"3_credits\"='180';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"hand\" text,\n \"1_credit\" text,\n \"2_credits\" text,\n \"3_credits\" text,\n \"4_credits\" text,\n \"5_credits\" text\n);\n\nQuestion: What would be the 4 credits result of a straight?"
},
{
"role": "assistant",
"content": "SELECT \"4_credits\" FROM \"see_also\" WHERE \"hand\"='straight';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What team did the away team play against when they scored 11.9 (75)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_12\" WHERE \"away_team_score\"='11.9 (75)';"
}
] |
[
{
"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 at the game that had a score of 2 \u2013 2?"
},
{
"role": "assistant",
"content": "SELECT \"home\" FROM \"game_log\" WHERE \"score\"='2 \u2013 2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What was the date of the game when Colorado was the visiting team and Chicago was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"visitor\"='colorado' AND \"home\"='chicago';"
}
] |
[
{
"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: What was the date of the game when the Avalanche had a record of 8\u20133\u20131?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"record\"='8\u20133\u20131';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"partnership_records\" (\n \"wicket_partnership\" text,\n \"runs\" text,\n \"batsmen\" text,\n \"opponents\" text,\n \"venue\" text,\n \"season\" text\n);\n\nQuestion: Who was the opponents of the 5th Wicket Partnership?"
},
{
"role": "assistant",
"content": "SELECT \"opponents\" FROM \"partnership_records\" WHERE \"wicket_partnership\"='5th';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fc_alania_in_europe\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"score\" text\n);\n\nQuestion: In which season was there a competition in the Champions League?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"fc_alania_in_europe\" WHERE \"competition\"='champions league';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"fc_alania_in_europe\" (\n \"season\" text,\n \"competition\" text,\n \"round\" text,\n \"club\" text,\n \"score\" text\n);\n\nQuestion: What scores did the RSC Anderlecht club have?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"fc_alania_in_europe\" WHERE \"club\"='rsc anderlecht';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"biggest_opening_week_nett_gross_first_7_\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"opening_week_nett_gross\" real\n);\n\nQuestion: What is the average rank of the movie with an opening week net gross more than 81,77,00,000 after 2012?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank\") FROM \"biggest_opening_week_nett_gross_first_7_\" WHERE \"opening_week_nett_gross\">'81,77,00,000' AND \"year\">2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"biggest_opening_week_nett_gross_first_7_\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"opening_week_nett_gross\" real\n);\n\nQuestion: What is the highest opening week net gross of the movie ranked higher than 5 from Reliance Entertainment?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"opening_week_nett_gross\") FROM \"biggest_opening_week_nett_gross_first_7_\" WHERE \"rank\"<5 AND \"studio_s\"='reliance entertainment';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"biggest_opening_week_nett_gross_first_7_\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"opening_week_nett_gross\" real\n);\n\nQuestion: What is the highest rank of Jab Tak Hai Jaan, which has an opening week net gross less than 99,00,00,000 and was after 2012?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"biggest_opening_week_nett_gross_first_7_\" WHERE \"opening_week_nett_gross\"<'99,00,00,000' AND \"movie\"='jab tak hai jaan' AND \"year\">2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"biggest_opening_week_nett_gross_first_7_\" (\n \"rank\" real,\n \"movie\" text,\n \"year\" real,\n \"studio_s\" text,\n \"opening_week_nett_gross\" real\n);\n\nQuestion: What is the highest rank of the movie with an opening week net gross less than 80,87,00,000 before 2011?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"biggest_opening_week_nett_gross_first_7_\" WHERE \"year\"<2011 AND \"opening_week_nett_gross\"<'80,87,00,000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Tell me the total number of Grid for Bob Evans and Laps less than 68"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"classification\" WHERE \"driver\"='bob evans' AND \"laps\"<68;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"classification\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: Tell me constructor for Laps less than 17 and Grid more than 11 for alan jones"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"classification\" WHERE \"laps\"<17 AND \"grid\">11 AND \"driver\"='alan jones';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.