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 \"senate\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successor_s_formal_installation\" text\n);\n\nQuestion: Who is the vacator for the February 1, 1971 date of successor's formal installation?"
},
{
"role": "assistant",
"content": "SELECT \"vacator\" FROM \"senate\" WHERE \"date_of_successor_s_formal_installation\"='february 1, 1971';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"senate\" (\n \"state_class\" text,\n \"vacator\" text,\n \"reason_for_change\" text,\n \"successor\" text,\n \"date_of_successor_s_formal_installation\" text\n);\n\nQuestion: What is the state of the senator with a November 14, 1972 date of successor's formal installation?"
},
{
"role": "assistant",
"content": "SELECT \"state_class\" FROM \"senate\" WHERE \"date_of_successor_s_formal_installation\"='november 14, 1972';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What team did the Red Sox play against on June 3?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"date\"='june 3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the Record at the game that had an attendance of 21,191?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\"='21,191';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the final score of the game on June 17?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"date\"='june 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yards_on_the_west_coast\" (\n \"yard_name\" text,\n \"location_city_state\" text,\n \"1st_ship_delivery_date\" text,\n \"total_number_of_ways\" text,\n \"total_vessels_built\" text\n);\n\nQuestion: What is the 1st ship delivery date of 6 ways?"
},
{
"role": "assistant",
"content": "SELECT \"1st_ship_delivery_date\" FROM \"yards_on_the_west_coast\" WHERE \"total_number_of_ways\"='6 ways';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"yards_on_the_west_coast\" (\n \"yard_name\" text,\n \"location_city_state\" text,\n \"1st_ship_delivery_date\" text,\n \"total_number_of_ways\" text,\n \"total_vessels_built\" text\n);\n\nQuestion: What is the total vessels built in Wilmington, California?"
},
{
"role": "assistant",
"content": "SELECT \"total_vessels_built\" FROM \"yards_on_the_west_coast\" WHERE \"location_city_state\"='wilmington, california';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"boxing\" (\n \"athlete\" text,\n \"event\" text,\n \"quarterfinal\" text,\n \"semifinal\" text,\n \"final\" text\n);\n\nQuestion: What was the final round result of Mohammad Reza Samadi?"
},
{
"role": "assistant",
"content": "SELECT \"final\" FROM \"boxing\" WHERE \"athlete\"='mohammad reza samadi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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: If the Home team score was 19.15 (129), what was the Away team's score that game?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_16\" WHERE \"home_team_score\"='19.15 (129)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\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: When the Home team of footscray is playing, what's the Home team score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_16\" 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_16\" (\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: If the Away team scored 18.8 (116), what was the Home team's score?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_16\" WHERE \"away_team_score\"='18.8 (116)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_four\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"chart_peak\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What was the title of the song that peaked the charts at #1 with track 20?"
},
{
"role": "assistant",
"content": "SELECT \"song_title\" FROM \"disc_four\" WHERE \"chart_peak\"='#1' AND \"track\"=20;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_four\" (\n \"track\" real,\n \"recorded\" text,\n \"catalogue\" text,\n \"release_date\" text,\n \"chart_peak\" text,\n \"song_title\" text,\n \"time\" text\n);\n\nQuestion: What is the time from the song called Treat Me Nice?"
},
{
"role": "assistant",
"content": "SELECT \"time\" FROM \"disc_four\" WHERE \"song_title\"='treat me nice';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_callanetics_books\" (\n \"year\" real,\n \"title\" text,\n \"publisher\" text,\n \"release_date\" text,\n \"copyright_information\" text,\n \"isbn\" real\n);\n\nQuestion: What was Random House's copyright information?"
},
{
"role": "assistant",
"content": "SELECT \"copyright_information\" FROM \"official_callanetics_books\" WHERE \"publisher\"='random house';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"official_callanetics_books\" (\n \"year\" real,\n \"title\" text,\n \"publisher\" text,\n \"release_date\" text,\n \"copyright_information\" text,\n \"isbn\" real\n);\n\nQuestion: What was release date in 1992 with the ISBN #0?"
},
{
"role": "assistant",
"content": "SELECT \"release_date\" FROM \"official_callanetics_books\" WHERE \"isbn\"=0 AND \"year\"=1992;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What club team has 216 overall?"
},
{
"role": "assistant",
"content": "SELECT \"club_team\" FROM \"1996_draft_picks\" WHERE \"overall\"=216;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1996_draft_picks\" (\n \"round\" real,\n \"overall\" real,\n \"player\" text,\n \"nationality\" text,\n \"club_team\" text\n);\n\nQuestion: What is the highest round played by Chris Phillips?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"round\") FROM \"1996_draft_picks\" WHERE \"player\"='chris phillips';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What player attended Graceland College?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"round_four\" WHERE \"college\"='graceland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: What is the highest pick number of the CFL's Toronto Argonauts?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"pick_num\") FROM \"round_four\" WHERE \"cfl_team\"='toronto argonauts';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_four\" (\n \"pick_num\" real,\n \"cfl_team\" text,\n \"player\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which pick number attended McMaster College?"
},
{
"role": "assistant",
"content": "SELECT \"pick_num\" FROM \"round_four\" WHERE \"college\"='mcmaster';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Who was the visiting team at the game where Edmonton was the home team and the decision was Osgood?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"october\" WHERE \"decision\"='osgood' AND \"home\"='edmonton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_three\" (\n \"track\" real,\n \"recorded\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"writer_s\" text,\n \"time\" text\n);\n\nQuestion: What is the date recorded for I Want to Be Free with a length of 2:12?"
},
{
"role": "assistant",
"content": "SELECT \"recorded\" FROM \"disc_three\" WHERE \"time\"='2:12' AND \"song_title\"='i want to be free';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_three\" (\n \"track\" real,\n \"recorded\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"writer_s\" text,\n \"time\" text\n);\n\nQuestion: What is the highest track with a length of 1:54 written by Gene Autry and Oakley Haldeman?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"track\") FROM \"disc_three\" WHERE \"time\"='1:54' AND \"writer_s\"='gene autry and oakley haldeman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_three\" (\n \"track\" real,\n \"recorded\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"writer_s\" text,\n \"time\" text\n);\n\nQuestion: What is the title of the song with a track less than 8 released on 3/22/57?"
},
{
"role": "assistant",
"content": "SELECT \"song_title\" FROM \"disc_three\" WHERE \"track\"<8 AND \"release_date\"='3/22/57';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"disc_three\" (\n \"track\" real,\n \"recorded\" text,\n \"release_date\" text,\n \"song_title\" text,\n \"writer_s\" text,\n \"time\" text\n);\n\nQuestion: What song title was written by Kal Mann and Bernie Lowe?"
},
{
"role": "assistant",
"content": "SELECT \"song_title\" FROM \"disc_three\" WHERE \"writer_s\"='kal mann and bernie lowe';"
}
] |
[
{
"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 is the Home team score for Geelong, whereby the Away team has a score of 18.13 (121)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_9\" WHERE \"away_team_score\"='18.13 (121)';"
}
] |
[
{
"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 date did the Away team, North Melbourne, play Geelong?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_9\" WHERE \"away_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_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 Venue had an Away team score of 7.15 (57) on June 4, 1973?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_9\" WHERE \"away_team_score\"='7.15 (57)';"
}
] |
[
{
"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: The driver Jacky Ickx had what time/retired?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"classification\" WHERE \"driver\"='jacky ickx';"
}
] |
[
{
"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 least number of laps for the driver Jo Siffert?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"classification\" WHERE \"driver\"='jo siffert';"
}
] |
[
{
"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 least number of laps for the constructor Ferrari and where the grid number was less than 4?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"laps\") FROM \"classification\" WHERE \"constructor\"='ferrari' AND \"grid\"<4;"
}
] |
[
{
"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 total amount of grid when the laps amount was smaller than 68 and the time/retired was injection?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"classification\" WHERE \"laps\"<68 AND \"time_retired\"='injection';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pregnancies\" (\n \"congresswoman\" text,\n \"state\" text,\n \"date_of_delivery\" text,\n \"mother_s_age\" real,\n \"baby_gender\" text\n);\n\nQuestion: What is the gender of Congresswoman Jaime Herrera Beutler's baby?"
},
{
"role": "assistant",
"content": "SELECT \"baby_gender\" FROM \"pregnancies\" WHERE \"congresswoman\"='jaime herrera beutler';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pregnancies\" (\n \"congresswoman\" text,\n \"state\" text,\n \"date_of_delivery\" text,\n \"mother_s_age\" real,\n \"baby_gender\" text\n);\n\nQuestion: How old was the mother who delivered on December 15, 2008?"
},
{
"role": "assistant",
"content": "SELECT \"mother_s_age\" FROM \"pregnancies\" WHERE \"date_of_delivery\"='december 15, 2008';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pregnancies\" (\n \"congresswoman\" text,\n \"state\" text,\n \"date_of_delivery\" text,\n \"mother_s_age\" real,\n \"baby_gender\" text\n);\n\nQuestion: What was the delivery date of Congresswoman Kirsten Gillibrand's baby boy?"
},
{
"role": "assistant",
"content": "SELECT \"date_of_delivery\" FROM \"pregnancies\" WHERE \"baby_gender\"='boy' AND \"congresswoman\"='kirsten gillibrand';"
}
] |
[
{
"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: Which player on the Bulls has a 6 May 1978 birthday?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2007_rugby_world_cup_squads\" WHERE \"club_province\"='bulls' AND \"date_of_birth_age\"='6 may 1978';"
}
] |
[
{
"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: Which player has a 1 February 1982 birthday and more than 16 caps?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"2007_rugby_world_cup_squads\" WHERE \"caps\">16 AND \"date_of_birth_age\"='1 february 1982';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Which tournament has a 2011 of 1r?"
},
{
"role": "assistant",
"content": "SELECT \"tournament\" FROM \"women_s_doubles_performance_timeline\" WHERE \"2011\"='1r';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"women_s_doubles_performance_timeline\" (\n \"tournament\" text,\n \"2009\" text,\n \"2010\" text,\n \"2011\" text,\n \"2012\" text,\n \"2013\" text\n);\n\nQuestion: Which 2009 tournament was french open?"
},
{
"role": "assistant",
"content": "SELECT \"2009\" FROM \"women_s_doubles_performance_timeline\" WHERE \"tournament\"='french open';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\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: When the home team score was 8.12 (60), what was the date?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_3\" WHERE \"home_team_score\"='8.12 (60)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_3\" (\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: When the away team was collingwood, what was the away team score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"away_team\"='collingwood';"
}
] |
[
{
"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: Who was Richmond's home team opponent?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_2\" WHERE \"away_team\"='richmond';"
}
] |
[
{
"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: Where did Essendon play as the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_2\" WHERE \"away_team\"='essendon';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"main_characters\" (\n \"character\" text,\n \"portrayed_by\" text,\n \"first_appearance\" text,\n \"last_appearance\" text,\n \"duration\" text,\n \"episodes\" text\n);\n\nQuestion: Where did the character of Aiden Burn csi detective first appear?"
},
{
"role": "assistant",
"content": "SELECT \"first_appearance\" FROM \"main_characters\" WHERE \"character\"='aiden burn csi detective';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_14_09\" text,\n \"viavoice_5_15_09\" text,\n \"ifop_la_croix_5_15_09\" text,\n \"ipsos_5_16_09\" text,\n \"opinion_way_5_18_09\" text,\n \"csa_5_20_09\" text,\n \"ipsos_5_25_09\" text,\n \"tns_sofres_5_26_09\" text,\n \"opinion_way_5_28_09\" text,\n \"tns_sofres_5_28_09\" text\n);\n\nQuestion: Which Ipsos 5/25/09 has a TNS-Sofres 5/28/09 of 20%?"
},
{
"role": "assistant",
"content": "SELECT \"ipsos_5_25_09\" FROM \"polling\" WHERE \"tns_sofres_5_28_09\"='20%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_14_09\" text,\n \"viavoice_5_15_09\" text,\n \"ifop_la_croix_5_15_09\" text,\n \"ipsos_5_16_09\" text,\n \"opinion_way_5_18_09\" text,\n \"csa_5_20_09\" text,\n \"ipsos_5_25_09\" text,\n \"tns_sofres_5_26_09\" text,\n \"opinion_way_5_28_09\" text,\n \"tns_sofres_5_28_09\" text\n);\n\nQuestion: Which TNS-Sofres 5/26/09 has an Ipsos 5/25/09 of 1%?"
},
{
"role": "assistant",
"content": "SELECT \"tns_sofres_5_26_09\" FROM \"polling\" WHERE \"ipsos_5_25_09\"='1%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_14_09\" text,\n \"viavoice_5_15_09\" text,\n \"ifop_la_croix_5_15_09\" text,\n \"ipsos_5_16_09\" text,\n \"opinion_way_5_18_09\" text,\n \"csa_5_20_09\" text,\n \"ipsos_5_25_09\" text,\n \"tns_sofres_5_26_09\" text,\n \"opinion_way_5_28_09\" text,\n \"tns_sofres_5_28_09\" text\n);\n\nQuestion: Which OpinionWay 5/18/09 has an Ipsos 5/16/09 of 11%?"
},
{
"role": "assistant",
"content": "SELECT \"opinion_way_5_18_09\" FROM \"polling\" WHERE \"ipsos_5_16_09\"='11%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_14_09\" text,\n \"viavoice_5_15_09\" text,\n \"ifop_la_croix_5_15_09\" text,\n \"ipsos_5_16_09\" text,\n \"opinion_way_5_18_09\" text,\n \"csa_5_20_09\" text,\n \"ipsos_5_25_09\" text,\n \"tns_sofres_5_26_09\" text,\n \"opinion_way_5_28_09\" text,\n \"tns_sofres_5_28_09\" text\n);\n\nQuestion: Which Ipsos 5/16/09 has a TNS-Sofres 5/28/09 of 2.5%?"
},
{
"role": "assistant",
"content": "SELECT \"ipsos_5_16_09\" FROM \"polling\" WHERE \"tns_sofres_5_28_09\"='2.5%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_14_09\" text,\n \"viavoice_5_15_09\" text,\n \"ifop_la_croix_5_15_09\" text,\n \"ipsos_5_16_09\" text,\n \"opinion_way_5_18_09\" text,\n \"csa_5_20_09\" text,\n \"ipsos_5_25_09\" text,\n \"tns_sofres_5_26_09\" text,\n \"opinion_way_5_28_09\" text,\n \"tns_sofres_5_28_09\" text\n);\n\nQuestion: Which Ipsos 5/16/09 has an Ifop- La Croix 5/15/09 of 26%?"
},
{
"role": "assistant",
"content": "SELECT \"csa_5_20_09\" FROM \"polling\" WHERE \"ifop_la_croix_5_15_09\"='26%';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"polling\" (\n \"party\" text,\n \"results_2004\" text,\n \"csa_5_14_09\" text,\n \"viavoice_5_15_09\" text,\n \"ifop_la_croix_5_15_09\" text,\n \"ipsos_5_16_09\" text,\n \"opinion_way_5_18_09\" text,\n \"csa_5_20_09\" text,\n \"ipsos_5_25_09\" text,\n \"tns_sofres_5_26_09\" text,\n \"opinion_way_5_28_09\" text,\n \"tns_sofres_5_28_09\" text\n);\n\nQuestion: Which Viavoice 5/15/09 has a CSA 5/14/09 of 5%, and a TNS-Sofres 5/28/09 of 4.5%?"
},
{
"role": "assistant",
"content": "SELECT \"viavoice_5_15_09\" FROM \"polling\" WHERE \"csa_5_14_09\"='5%' AND \"tns_sofres_5_28_09\"='4.5%';"
}
] |
[
{
"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 driver has 44 laps?"
},
{
"role": "assistant",
"content": "SELECT \"driver\" FROM \"classification\" WHERE \"laps\"=44;"
}
] |
[
{
"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 average laps for a grid larger than 2, for a ferrari that got in an accident?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"classification\" WHERE \"grid\">2 AND \"time_retired\"='accident' AND \"constructor\"='ferrari';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_league_position\" (\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real,\n \"points\" real\n);\n\nQuestion: Name the average goal difference for draw of 7 and played more than 18"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goal_difference\") FROM \"final_league_position\" WHERE \"draw\"=7 AND \"played\">18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_league_position\" (\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real,\n \"points\" real\n);\n\nQuestion: Tell me the totla number of goal difference for goals against of 30 and played less than 18"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goal_difference\") FROM \"final_league_position\" WHERE \"goals_against\"=30 AND \"played\"<18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_league_position\" (\n \"team\" text,\n \"played\" real,\n \"draw\" real,\n \"lost\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"goal_difference\" real,\n \"points\" real\n);\n\nQuestion: Name the total number of draw for played more than 18"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"draw\") FROM \"final_league_position\" WHERE \"played\">18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: Where is the player with a pick smaller than 12 and a college of UV from?"
},
{
"role": "assistant",
"content": "SELECT \"country_of_origin\" FROM \"round_2\" WHERE \"pick\"<12 AND \"college\"='uv';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What PBA team is the player from Ateneo college and a pick of 17?"
},
{
"role": "assistant",
"content": "SELECT \"pba_team\" FROM \"round_2\" WHERE \"college\"='ateneo' AND \"pick\"=17;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What is Mark Joseph Kong's pick?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"pick\") FROM \"round_2\" WHERE \"player\"='mark joseph kong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What PBA team is the player from Ateneo college with a pick number smaller than 15 from?"
},
{
"role": "assistant",
"content": "SELECT \"pba_team\" FROM \"round_2\" WHERE \"pick\"<15 AND \"college\"='ateneo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"pick\" real,\n \"player\" text,\n \"country_of_origin\" text,\n \"pba_team\" text,\n \"college\" text\n);\n\nQuestion: What pick number is Larry Fonacier?"
},
{
"role": "assistant",
"content": "SELECT \"pick\" FROM \"round_2\" WHERE \"player\"='larry fonacier';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" text,\n \"rating\" real,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" real,\n \"rank_timeslot\" real,\n \"rank_night\" real,\n \"rank_week\" text\n);\n\nQuestion: what is the rating when the rank (timeslot) is less than 3 and the rank (night) is less than 8?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"rating\") FROM \"u_s_nielsen_ratings\" WHERE \"rank_timeslot\"<3 AND \"rank_night\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"u_s_nielsen_ratings\" (\n \"episode\" text,\n \"rating\" real,\n \"share\" real,\n \"rating_share_18_49\" text,\n \"viewers_millions\" real,\n \"rank_timeslot\" real,\n \"rank_night\" real,\n \"rank_week\" text\n);\n\nQuestion: what is the rank (night) when the rating is more than 4.3 and the viewers (millions) is more than 10.72?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rank_night\") FROM \"u_s_nielsen_ratings\" WHERE \"rating\">4.3 AND \"viewers_millions\">10.72;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\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: When was Windy Hill used as a venue?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_21\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\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 home team plays at VFL Park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_21\" WHERE \"venue\"='vfl park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_21\" (\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 team plays against Footscray as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_21\" WHERE \"away_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vs_2\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: What is the total audience on may 28?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"attendance\") FROM \"vs_2\" WHERE \"date\"='may 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"vs_2\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: What was the the total top attendance with a score of 0 \u2013 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"vs_2\" WHERE \"score\"='0 \u2013 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"honoured_clubs\" (\n \"club\" text,\n \"swedish_championship_titles\" real,\n \"allsvenskan_titles\" real,\n \"introduced\" real,\n \"stars_symbolizes\" text\n);\n\nQuestion: How many allsvenskan titles did club aik have after its introduction after 2000, with stars symbolizing the number of swedish championship titles ?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"allsvenskan_titles\") FROM \"honoured_clubs\" WHERE \"stars_symbolizes\"='number of swedish championship titles' AND \"club\"='aik' AND \"introduced\">2000;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"honoured_clubs\" (\n \"club\" text,\n \"swedish_championship_titles\" real,\n \"allsvenskan_titles\" real,\n \"introduced\" real,\n \"stars_symbolizes\" text\n);\n\nQuestion: What is the highest amount of swedish championship titles for the team that was introduced before 2006?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"swedish_championship_titles\") FROM \"honoured_clubs\" WHERE \"introduced\"<2006;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real\n);\n\nQuestion: What is the average reception of the player with 4 touchdowns and less than 171 yards?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"rec\") FROM \"wide_receivers\" WHERE \"td_s\"=4 AND \"yards\"<171;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wide_receivers\" (\n \"player\" text,\n \"rec\" real,\n \"yards\" real,\n \"avg\" real,\n \"td_s\" real\n);\n\nQuestion: What is the average that has more than 0 touchdowns and more than 135 yards?"
},
{
"role": "assistant",
"content": "SELECT \"avg\" FROM \"wide_receivers\" WHERE \"td_s\">0 AND \"yards\">135;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What is the record loss of R. Springer?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"loss\"='r. springer';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the streak on April 12?"
},
{
"role": "assistant",
"content": "SELECT \"streak\" FROM \"game_log\" WHERE \"date\"='april 12';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: What was the date of A. Benes loss to the Rockies?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"game_log\" WHERE \"loss\"='a. benes' AND \"opponent\"='rockies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text,\n \"streak\" text\n);\n\nQuestion: Which streak had an attendance of 33,013?"
},
{
"role": "assistant",
"content": "SELECT \"streak\" FROM \"game_log\" WHERE \"attendance\"='33,013';"
}
] |
[
{
"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: What was the partnership in the season of 1928"
},
{
"role": "assistant",
"content": "SELECT \"wicket_partnership\" FROM \"partnership_records\" WHERE \"season\"='1928';"
}
] |
[
{
"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 are the earnings for jim colbert with under 4 wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"earnings\") FROM \"leaders\" WHERE \"player\"='jim colbert' AND \"wins\"<4;"
}
] |
[
{
"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 ranking for the player with under 34 events and earnings of $1,444,386"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"leaders\" WHERE \"earnings\"='1,444,386' AND \"events\"<34;"
}
] |
[
{
"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 bob murphy?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"events\") FROM \"leaders\" WHERE \"player\"='bob murphy';"
}
] |
[
{
"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 bob murphy with under 4 wins?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"rank\") FROM \"leaders\" WHERE \"player\"='bob murphy' AND \"wins\"<4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"national_team\" text,\n \"club\" text,\n \"season\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: When the club is flamengo in the 2009 season, and they scored more than 0 goals, what's the sum of the Apps?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"apps\") FROM \"international_career\" WHERE \"club\"='flamengo' AND \"season\"='2009' AND \"goals\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_career\" (\n \"national_team\" text,\n \"club\" text,\n \"season\" text,\n \"apps\" real,\n \"goals\" real\n);\n\nQuestion: In the 2010 season what club has 0 goals and more than 0 Apps?"
},
{
"role": "assistant",
"content": "SELECT \"club\" FROM \"international_career\" WHERE \"goals\"=0 AND \"apps\">0 AND \"season\"='2010';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What Round is the Event cage rage 17?"
},
{
"role": "assistant",
"content": "SELECT \"round\" FROM \"mixed_martial_arts_record\" WHERE \"event\"='cage rage 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mixed_martial_arts_record\" (\n \"res\" text,\n \"record\" text,\n \"opponent\" text,\n \"method\" text,\n \"event\" text,\n \"round\" text,\n \"time\" text,\n \"location\" text\n);\n\nQuestion: What Event is at the Time 1:16?"
},
{
"role": "assistant",
"content": "SELECT \"event\" FROM \"mixed_martial_arts_record\" WHERE \"time\"='1:16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"performer\" text,\n \"length\" text,\n \"original_album\" text\n);\n\nQuestion: What is the title of the track after 11?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"track_listing\" WHERE \"track\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"performer\" text,\n \"length\" text,\n \"original_album\" text\n);\n\nQuestion: On the title feature brad mehldau as the performer, what is the original album?"
},
{
"role": "assistant",
"content": "SELECT \"original_album\" FROM \"track_listing\" WHERE \"performer\"='brad mehldau';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"track_listing\" (\n \"track\" real,\n \"title\" text,\n \"performer\" text,\n \"length\" text,\n \"original_album\" text\n);\n\nQuestion: Which track has the original album turbulent indigo?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"track\") FROM \"track_listing\" WHERE \"original_album\"='turbulent indigo';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"t\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What Utah Jazz player played Center?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"t\" WHERE \"position\"='center';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"t\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of all Utah Jazz Players, that played 1987-88?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"t\" WHERE \"years_for_jazz\"='1987-88';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"t\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What is the nationality of all Utah Jazz Players, that played 2011-present?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"t\" WHERE \"years_for_jazz\"='2011-present';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"t\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What Utah Jazz Forward played for Southern Methodist?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"t\" WHERE \"position\"='forward' AND \"school_club_team\"='southern methodist';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"t\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"years_for_jazz\" text,\n \"school_club_team\" text\n);\n\nQuestion: What years did the Utah Jazz Player from Southern Methodist, Play?"
},
{
"role": "assistant",
"content": "SELECT \"years_for_jazz\" FROM \"t\" WHERE \"school_club_team\"='southern methodist';"
}
] |
[
{
"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: Who was the home team at MCG?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_2\" WHERE \"venue\"='mcg';"
}
] |
[
{
"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: Who was Carlton's away team opponents?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_2\" WHERE \"home_team\"='carlton';"
}
] |
[
{
"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 home team South Melbourne's opponents score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_2\" 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 \"f\" (\n \"player\" text,\n \"pos\" text,\n \"from\" text,\n \"school_country\" text,\n \"rebs\" real,\n \"asts\" real\n);\n\nQuestion: What player has under 357 assists and is from 2001?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"f\" WHERE \"asts\"<357 AND \"from\"='2001';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: When the Attendance was 4,516, what was the Record?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"game_log\" WHERE \"attendance\"='4,516';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: When the Score was 4-10, what was the Attendance?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_log\" WHERE \"score\"='4-10';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: With a Record of 9-24, what was the Score?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"game_log\" WHERE \"record\"='9-24';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" text,\n \"record\" text\n);\n\nQuestion: When the Score was 6-2, which Opponent was played?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"score\"='6-2';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.