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 \"2010_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the hometown for tre madden?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"2010_team\" WHERE \"player\"='tre madden';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the hometown for the player that is defensive back and went to alabama?"
},
{
"role": "assistant",
"content": "SELECT \"hometown\" FROM \"2010_team\" WHERE \"position\"='defensive back' AND \"college\"='alabama';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_team\" (\n \"player\" text,\n \"position\" text,\n \"school\" text,\n \"hometown\" text,\n \"college\" text\n);\n\nQuestion: What is the college for the player that went to ridge community high school and is defensive back?"
},
{
"role": "assistant",
"content": "SELECT \"college\" FROM \"2010_team\" WHERE \"position\"='defensive back' AND \"school\"='ridge community high school';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_present\" (\n \"year\" real,\n \"date\" text,\n \"type\" text,\n \"president\" text,\n \"location\" text\n);\n\nQuestion: What is the sum of Year with a Type of informal, and a Location with justus lipsius building, brussels, and a Date with 23 may?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"2010_present\" WHERE \"type\"='informal' AND \"location\"='justus lipsius building, brussels' AND \"date\"='23 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_present\" (\n \"year\" real,\n \"date\" text,\n \"type\" text,\n \"president\" text,\n \"location\" text\n);\n\nQuestion: What is the Type with a Location with justus lipsius building, brussels, and a Year of 2012, and a President with herman van rompuy (1st term), and a Date with 23 may?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"2010_present\" WHERE \"location\"='justus lipsius building, brussels' AND \"year\"=2012 AND \"president\"='herman van rompuy (1st term)' AND \"date\"='23 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_present\" (\n \"year\" real,\n \"date\" text,\n \"type\" text,\n \"president\" text,\n \"location\" text\n);\n\nQuestion: What is the President with a Location of justus lipsius building, brussels, and a Type with scheduled, and a Year larger than 2011, and a Date with 18\u201319 october?"
},
{
"role": "assistant",
"content": "SELECT \"president\" FROM \"2010_present\" WHERE \"location\"='justus lipsius building, brussels' AND \"type\"='scheduled' AND \"year\">2011 AND \"date\"='18\u201319 october';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_present\" (\n \"year\" real,\n \"date\" text,\n \"type\" text,\n \"president\" text,\n \"location\" text\n);\n\nQuestion: What is the Location with a Year larger than 2011, and a President with herman van rompuy (2nd term), and a Date of 28\u201329 june, and a Type with scheduled?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"2010_present\" WHERE \"year\">2011 AND \"president\"='herman van rompuy (2nd term)' AND \"date\"='28\u201329 june' AND \"type\"='scheduled';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_present\" (\n \"year\" real,\n \"date\" text,\n \"type\" text,\n \"president\" text,\n \"location\" text\n);\n\nQuestion: What is the President with a Year larger than 2011, and a Date with 23 may?"
},
{
"role": "assistant",
"content": "SELECT \"president\" FROM \"2010_present\" WHERE \"year\">2011 AND \"date\"='23 may';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2010_present\" (\n \"year\" real,\n \"date\" text,\n \"type\" text,\n \"president\" text,\n \"location\" text\n);\n\nQuestion: What is the Type with a Year larger than 2010, and a Location with justus lipsius building, brussels, and a President of herman van rompuy (2nd term), and a Date with 28\u201329 june?"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"2010_present\" WHERE \"year\">2010 AND \"location\"='justus lipsius building, brussels' AND \"president\"='herman van rompuy (2nd term)' AND \"date\"='28\u201329 june';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"international_goals\" (\n \"goal\" real,\n \"date\" text,\n \"score\" text,\n \"result\" text,\n \"competition\" text\n);\n\nQuestion: What competition has a goal number of 13?"
},
{
"role": "assistant",
"content": "SELECT \"competition\" FROM \"international_goals\" WHERE \"goal\"=13;"
}
] |
[
{
"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 \"asst\" real,\n \"total_tk\" real,\n \"sack\" real,\n \"yards\" real,\n \"fum_r\" real\n);\n\nQuestion: What is the total of yards when asst. is 19, totaltk is 60 and sack is more than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"yards\") FROM \"defense\" WHERE \"asst\"=19 AND \"total_tk\"=60 AND \"sack\">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 \"asst\" real,\n \"total_tk\" real,\n \"sack\" real,\n \"yards\" real,\n \"fum_r\" real\n);\n\nQuestion: what is the total sack for mike green when fumr is less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"sack\") FROM \"defense\" WHERE \"player\"='mike green' AND \"fum_r\"<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 \"asst\" real,\n \"total_tk\" real,\n \"sack\" real,\n \"yards\" real,\n \"fum_r\" real\n);\n\nQuestion: what is the total sack when totaltk is 1 and asst. is more than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"sack\") FROM \"defense\" WHERE \"total_tk\"=1 AND \"asst\">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 \"asst\" real,\n \"total_tk\" real,\n \"sack\" real,\n \"yards\" real,\n \"fum_r\" real\n);\n\nQuestion: what is the total number of tackles when fumr is 0, totaltk is 54 and yards is less than 0?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"tackles\") FROM \"defense\" WHERE \"fum_r\"=0 AND \"total_tk\"=54 AND \"yards\"<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 \"asst\" real,\n \"total_tk\" real,\n \"sack\" real,\n \"yards\" real,\n \"fum_r\" real\n);\n\nQuestion: what is the sum of totaltk when yards is less than 0?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"total_tk\") FROM \"defense\" WHERE \"yards\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: What class is after 1973 with 41 points?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"grand_prix_motorcycle_racing_results\" WHERE \"year\">1973 AND \"points\"=41;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"grand_prix_motorcycle_racing_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"points\" real,\n \"wins\" real\n);\n\nQuestion: How many wins for bikes with under 54 points, team yamaha, a 250cc bike, and before 1977?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"wins\") FROM \"grand_prix_motorcycle_racing_results\" WHERE \"points\"<54 AND \"team\"='yamaha' AND \"class\"='250cc' AND \"year\"<1977;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stages\" (\n \"stage\" real,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"gc_leader\" text\n);\n\nQuestion: What distance did giovanni lombardi win after stage 5?"
},
{
"role": "assistant",
"content": "SELECT \"distance\" FROM \"stages\" WHERE \"stage\">5 AND \"winner\"='giovanni lombardi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"stages\" (\n \"stage\" real,\n \"date\" text,\n \"course\" text,\n \"distance\" text,\n \"winner\" text,\n \"gc_leader\" text\n);\n\nQuestion: Who is the GC leader at \u00e1vila - segovia?"
},
{
"role": "assistant",
"content": "SELECT \"gc_leader\" FROM \"stages\" WHERE \"course\"='\u00e1vila - segovia';"
}
] |
[
{
"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: How many grids have less than 41 laps and a Driver of pedro de la rosa?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"grid\") FROM \"race\" WHERE \"laps\"<41 AND \"driver\"='pedro de la rosa';"
}
] |
[
{
"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: Which Time/Retired has a Grid smaller than 3, and a Driver of mika h\u00e4kkinen?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\"<3 AND \"driver\"='mika h\u00e4kkinen';"
}
] |
[
{
"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: What are toranosuke takagi's average laps?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"laps\") FROM \"race\" WHERE \"driver\"='toranosuke takagi';"
}
] |
[
{
"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: Which grid has a Time/Retired of +5.004?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"time_retired\"='+5.004';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\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 score of the game on November 9 when Atlanta was the visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"november\" WHERE \"visitor\"='atlanta' AND \"date\"='november 9';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\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 score of the home game at Tampa Bay?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"november\" WHERE \"home\"='tampa bay';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"november\" (\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 date of the game where Ottawa was the home team and Atlanta is the visiting team?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"november\" WHERE \"visitor\"='atlanta' AND \"home\"='ottawa';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"pitcher\" text,\n \"date\" text,\n \"team\" text,\n \"result\" text,\n \"site\" text\n);\n\nQuestion: I want the result for team of giants"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards\" WHERE \"team\"='giants';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"pitcher\" text,\n \"date\" text,\n \"team\" text,\n \"result\" text,\n \"site\" text\n);\n\nQuestion: Tell me the pitcher on september 6, 2006"
},
{
"role": "assistant",
"content": "SELECT \"pitcher\" FROM \"awards\" WHERE \"date\"='september 6, 2006';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"pitcher\" text,\n \"date\" text,\n \"team\" text,\n \"result\" text,\n \"site\" text\n);\n\nQuestion: I want the date for rockies"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"awards\" WHERE \"team\"='rockies';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"pitcher\" text,\n \"date\" text,\n \"team\" text,\n \"result\" text,\n \"site\" text\n);\n\nQuestion: I want the date for an\u00edbal s\u00e1nchez"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"awards\" WHERE \"pitcher\"='an\u00edbal s\u00e1nchez';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"pitcher\" text,\n \"date\" text,\n \"team\" text,\n \"result\" text,\n \"site\" text\n);\n\nQuestion: I want the result for team of giants"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"awards\" WHERE \"team\"='giants';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"awards\" (\n \"pitcher\" text,\n \"date\" text,\n \"team\" text,\n \"result\" text,\n \"site\" text\n);\n\nQuestion: I want the site for september 29, 2013"
},
{
"role": "assistant",
"content": "SELECT \"site\" FROM \"awards\" WHERE \"date\"='september 29, 2013';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"5001_5100\" (\n \"ngc_number\" real,\n \"object_type\" text,\n \"constellation\" text,\n \"right_ascension_j2000\" text,\n \"declination_j2000\" text,\n \"apparent_magnitude\" real\n);\n\nQuestion: When the apparent magnitude is 10.5, what is the right ascension?"
},
{
"role": "assistant",
"content": "SELECT \"right_ascension_j2000\" FROM \"5001_5100\" WHERE \"apparent_magnitude\"=10.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"north_british_railway_coaches\" (\n \"number_name\" text,\n \"description\" text,\n \"current_status\" text,\n \"livery\" text,\n \"date\" text\n);\n\nQuestion: Which livery is from 1919?"
},
{
"role": "assistant",
"content": "SELECT \"livery\" FROM \"north_british_railway_coaches\" WHERE \"date\"='1919';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"loss\" text,\n \"attendance\" real,\n \"record\" text\n);\n\nQuestion: Of the games with a record of 80-81, what was the highest attendance?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"game_log\" WHERE \"record\"='80-81';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2005\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: How many entries have a HK viewers of 2.23 million, and a Rank below 2?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"peak\") FROM \"highest_rating_drama_series_of_2005\" WHERE \"hk_viewers\"='2.23 million' AND \"rank\">2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2005\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: What premiere has a finale of less than 41, peak less than 40, average above 31, and a Chinese title of \u5b78\u8b66\u96c4\u5fc3?"
},
{
"role": "assistant",
"content": "SELECT \"premiere\" FROM \"highest_rating_drama_series_of_2005\" WHERE \"finale\"<41 AND \"peak\"<40 AND \"average\">31 AND \"chinese_title\"='\u5b78\u8b66\u96c4\u5fc3';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_rating_drama_series_of_2005\" (\n \"rank\" real,\n \"english_title\" text,\n \"chinese_title\" text,\n \"average\" real,\n \"peak\" real,\n \"premiere\" real,\n \"finale\" real,\n \"hk_viewers\" text\n);\n\nQuestion: What is the high average that has a Finale larger than 35, a HK viewers of 2.12 million, and a Peak larger than 40?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"average\") FROM \"highest_rating_drama_series_of_2005\" WHERE \"finale\">35 AND \"hk_viewers\"='2.12 million' AND \"peak\">40;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 for the home team when the venue is Junction Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_18\" WHERE \"venue\"='junction oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_18\" (\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 location when the home team score is 11.16 (82) and the away team score is 18.13 (121)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_18\" WHERE \"home_team_score\"='11.16 (82)' AND \"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_18\" (\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 lowest crowd number at the venue MCG?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_18\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"american_weekly_ratings\" (\n \"episode\" text,\n \"air_date\" text,\n \"timeslot_est\" text,\n \"rating\" real,\n \"share\" text,\n \"18_49_rating\" text,\n \"viewers_millions\" real,\n \"rank\" text\n);\n\nQuestion: How many total viewers for \"the summer house\"?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"viewers_millions\") FROM \"american_weekly_ratings\" WHERE \"episode\"='\\\"the summer house\\\"';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_supercross_results\" (\n \"round\" real,\n \"date\" text,\n \"place\" text,\n \"finished\" text,\n \"total_points\" real,\n \"standing\" text\n);\n\nQuestion: Name the average round for jacksonville"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"2011_supercross_results\" WHERE \"place\"='jacksonville';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"2011_supercross_results\" (\n \"round\" real,\n \"date\" text,\n \"place\" text,\n \"finished\" text,\n \"total_points\" real,\n \"standing\" text\n);\n\nQuestion: I want the standing for january 29 and finished of 3rd and total points less than 248"
},
{
"role": "assistant",
"content": "SELECT \"standing\" FROM \"2011_supercross_results\" WHERE \"total_points\"<248 AND \"finished\"='3rd' AND \"date\"='january 29';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What was the result and score of the game on February 22?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"season_schedule\" WHERE \"date\"='february 22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: What is the largest Rd# for a PI GP greater than 0 and a Reg GP less than 62?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rd_num\") FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"pl_gp\">0 AND \"reg_gp\"<62;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_vancouver_canucks_draft_picks\" (\n \"rd_num\" real,\n \"pick_num\" real,\n \"player\" text,\n \"team_league\" text,\n \"reg_gp\" real,\n \"pl_gp\" real\n);\n\nQuestion: Which team has a Reg GP over 62?"
},
{
"role": "assistant",
"content": "SELECT \"team_league\" FROM \"list_of_vancouver_canucks_draft_picks\" WHERE \"reg_gp\">62;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"achievements\" (\n \"year\" real,\n \"competition\" text,\n \"venue\" text,\n \"position\" text,\n \"event\" text,\n \"notes\" text\n);\n\nQuestion: What is the total year with a Position of 12th?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"achievements\" WHERE \"position\"='12th';"
}
] |
[
{
"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: When a race had less than 18 laps and time/retired of accident, what was the smallest grid?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"grid\") FROM \"race\" WHERE \"time_retired\"='accident' AND \"laps\"<18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"race\" (\n \"driver\" text,\n \"constructor\" text,\n \"laps\" real,\n \"time_retired\" text,\n \"grid\" real\n);\n\nQuestion: What is the time/retired for a grid over 17 with 74 laps?"
},
{
"role": "assistant",
"content": "SELECT \"time_retired\" FROM \"race\" WHERE \"grid\">17 AND \"laps\"=74;"
}
] |
[
{
"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: What is the grid total for david coulthard?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"grid\") FROM \"race\" WHERE \"driver\"='david coulthard';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"walking\" (\n \"event\" text,\n \"data\" text,\n \"athlete\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: What day did Chris Maddocks compete in the 35000 m?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"walking\" WHERE \"athlete\"='chris maddocks' AND \"event\"='35000 m';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"walking\" (\n \"event\" text,\n \"data\" text,\n \"athlete\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: Who has a walking data of 214.061km?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"walking\" WHERE \"data\"='214.061km';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"walking\" (\n \"event\" text,\n \"data\" text,\n \"athlete\" text,\n \"date\" text,\n \"place\" text\n);\n\nQuestion: Who has a walking data of 3:10:48+?"
},
{
"role": "assistant",
"content": "SELECT \"athlete\" FROM \"walking\" WHERE \"data\"='3:10:48+';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: what is the title of the episode with the original air date of october2,2002?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"season_1\" WHERE \"original_air_date\"='october2,2002';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: what is the title of the episode with the production code of ad1a22?"
},
{
"role": "assistant",
"content": "SELECT \"title\" FROM \"season_1\" WHERE \"production_code\"='ad1a22';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_1\" (\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text,\n \"production_code\" text\n);\n\nQuestion: who was the director of the episode with production code ad1a26?"
},
{
"role": "assistant",
"content": "SELECT \"directed_by\" FROM \"season_1\" WHERE \"production_code\"='ad1a26';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: Who is the constructor whose circuit was Oulton Park?"
},
{
"role": "assistant",
"content": "SELECT \"constructor\" FROM \"non_championship_race_results\" WHERE \"circuit\"='oulton park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"non_championship_race_results\" (\n \"race_name\" text,\n \"circuit\" text,\n \"date\" text,\n \"winning_driver\" text,\n \"constructor\" text,\n \"report\" text\n);\n\nQuestion: What is the name of the race for which the circuit was Snetterton?"
},
{
"role": "assistant",
"content": "SELECT \"race_name\" FROM \"non_championship_race_results\" WHERE \"circuit\"='snetterton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"b\" (\n \"player\" text,\n \"no_s\" text,\n \"height_in_ft\" text,\n \"position\" text,\n \"years_for_rockets\" text,\n \"school_club_team_country\" text\n);\n\nQuestion: During what years did the Guard from Oklahoma with a height of 6-6 play for the Rockets?"
},
{
"role": "assistant",
"content": "SELECT \"years_for_rockets\" FROM \"b\" WHERE \"height_in_ft\"='6-6' AND \"position\"='guard' AND \"school_club_team_country\"='oklahoma';"
}
] |
[
{
"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: What was the away team's score at MCG when attendance was more than 24,365?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_3\" WHERE \"crowd\">'24,365' AND \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"season_summaries\" (\n \"competition\" text,\n \"played\" real,\n \"drawn\" real,\n \"lost\" real,\n \"position\" text\n);\n\nQuestion: how many times what the position 6th, the competition was super league xvii and played was larger than 27?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"drawn\") FROM \"season_summaries\" WHERE \"position\"='6th' AND \"competition\"='super league xvii' AND \"played\">27;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_goalscorers\" (\n \"name\" text,\n \"scotland_career\" text,\n \"caps\" real,\n \"goals\" real,\n \"average\" real\n);\n\nQuestion: What is the average cap number in scotland in 1986\u20131998 leass than 69?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"average\") FROM \"highest_goalscorers\" WHERE \"caps\"<69 AND \"scotland_career\"='1986\u20131998';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_goalscorers\" (\n \"name\" text,\n \"scotland_career\" text,\n \"caps\" real,\n \"goals\" real,\n \"average\" real\n);\n\nQuestion: Which caps was in scotland in 1920\u20131923?"
},
{
"role": "assistant",
"content": "SELECT \"caps\" FROM \"highest_goalscorers\" WHERE \"scotland_career\"='1920\u20131923';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_goalscorers\" (\n \"name\" text,\n \"scotland_career\" text,\n \"caps\" real,\n \"goals\" real,\n \"average\" real\n);\n\nQuestion: What is the goal low with caps less than 38 and an average less than 1.083?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals\") FROM \"highest_goalscorers\" WHERE \"caps\"<38 AND \"average\"<1.083;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_goalscorers\" (\n \"name\" text,\n \"scotland_career\" text,\n \"caps\" real,\n \"goals\" real,\n \"average\" real\n);\n\nQuestion: What is the goal top with caps of 38 and an average less than 0.579?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals\") FROM \"highest_goalscorers\" WHERE \"caps\"=38 AND \"average\"<0.579;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"highest_goalscorers\" (\n \"name\" text,\n \"scotland_career\" text,\n \"caps\" real,\n \"goals\" real,\n \"average\" real\n);\n\nQuestion: What is the low goal for kenny miller with an average smaller than 0.261?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"goals\") FROM \"highest_goalscorers\" WHERE \"name\"='kenny miller' AND \"average\"<0.261;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 home team plays at victoria park?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_11\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 home team scored 23.17 (155)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_11\" WHERE \"home_team_score\"='23.17 (155)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 away team st kilda play with a crowd larger than 22,764?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_11\" WHERE \"crowd\">'22,764' AND \"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 \"round_11\" (\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 north melbourne played as the home team, what was the away team score?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_11\" 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_11\" (\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 away team when home scored 17.15 (117)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_11\" WHERE \"home_team_score\"='17.15 (117)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_11\" (\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 away team score at victoria park?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_11\" WHERE \"venue\"='victoria park';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the high goal against associated with 18 wins, a Goal Difference of 43, and under 6 draws?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"goals_against\") FROM \"league_standings\" WHERE \"wins\"=18 AND \"goal_difference\"=43 AND \"draws\"<6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"league_standings\" (\n \"position\" real,\n \"club\" text,\n \"played\" real,\n \"wins\" real,\n \"draws\" real,\n \"losses\" real,\n \"goals_for\" real,\n \"goals_against\" real,\n \"points\" real,\n \"goal_difference\" real\n);\n\nQuestion: What is the average win total associated with under 4 draws, and under 15 goals?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"league_standings\" WHERE \"draws\"<4 AND \"goals_for\"<15;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 that played at Moorabbin Oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_5\" WHERE \"venue\"='moorabbin oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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: How large was the crowd when the away team scored 11.15 (81)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_5\" WHERE \"away_team_score\"='11.15 (81)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 away team scored 12.19 (91) and the crowd was larger than 20,350?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_5\" WHERE \"crowd\">'20,350' AND \"away_team_score\"='12.19 (91)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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: How large was the crowd when Carlton was the away team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_5\" WHERE \"away_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 scored 19.11 (125)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_5\" WHERE \"home_team_score\"='19.11 (125)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: I want the sum of year for mark barron"
},
{
"role": "assistant",
"content": "SELECT SUM(\"year\") FROM \"player_selections\" WHERE \"player_name\"='mark barron';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"player_selections\" (\n \"year\" real,\n \"pick\" text,\n \"player_name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Tell me the year for defensive tackle and college of lsu"
},
{
"role": "assistant",
"content": "SELECT \"year\" FROM \"player_selections\" WHERE \"position\"='defensive tackle' AND \"college\"='lsu';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"playoffs\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"decision\" text,\n \"attendance\" real,\n \"series\" text\n);\n\nQuestion: On April 28, what was the average number of people attending?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"attendance\") FROM \"playoffs\" WHERE \"date\"='april 28';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which player is a centre?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"position\"='centre';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_5\" (\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 venue when Collingwood was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_5\" 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 \"most_tries_in_a_match\" (\n \"player\" text,\n \"tries\" text,\n \"conv\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Where did Brian Hightower play when he has the Conv of 0?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"most_tries_in_a_match\" WHERE \"conv\"='0' AND \"player\"='brian hightower';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_tries_in_a_match\" (\n \"player\" text,\n \"tries\" text,\n \"conv\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: What was Dick Hyland's conv?"
},
{
"role": "assistant",
"content": "SELECT \"conv\" FROM \"most_tries_in_a_match\" WHERE \"player\"='dick hyland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_tries_in_a_match\" (\n \"player\" text,\n \"tries\" text,\n \"conv\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: How many tries took place on 06/07/1996?"
},
{
"role": "assistant",
"content": "SELECT \"tries\" FROM \"most_tries_in_a_match\" WHERE \"date\"='06/07/1996';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_tries_in_a_match\" (\n \"player\" text,\n \"tries\" text,\n \"conv\" text,\n \"venue\" text,\n \"date\" text\n);\n\nQuestion: Which player played on 07/06/1997?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"most_tries_in_a_match\" WHERE \"date\"='07/06/1997';"
}
] |
[
{
"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: The home team scored 11.17 (83) on what day?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_4\" WHERE \"home_team_score\"='11.17 (83)';"
}
] |
[
{
"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: When the crowd was over 16,000 people and south melbourne was the away team, what date was the game?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_4\" WHERE \"crowd\">'16,000' AND \"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_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: Which home team scored 16.16 (112)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_4\" WHERE \"home_team_score\"='16.16 (112)';"
}
] |
[
{
"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: When the Away team is melbourne, what venue do they play at?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_4\" WHERE \"away_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the lowest interview of Texas, with an average larger than 9.531?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"interview\") FROM \"final_competition\" WHERE \"state\"='texas' AND \"average\">9.531;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the total interviews of Iowa, and with an evening gown smaller than 9.625?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"interview\") FROM \"final_competition\" WHERE \"state\"='iowa' AND \"evening_gown\"<9.625;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the sum of the average of Hawaii, with an interviewer larger than 9.636?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"average\") FROM \"final_competition\" WHERE \"state\"='hawaii' AND \"interview\">9.636;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the highest evening gown with an average of 9.531 and swimsuit smaller than 9.449?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"evening_gown\") FROM \"final_competition\" WHERE \"average\"=9.531 AND \"swimsuit\"<9.449;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the sum of swimsuit with an evening gown of 9.773 and average larger than 9.674?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"swimsuit\") FROM \"final_competition\" WHERE \"evening_gown\"=9.773 AND \"average\">9.674;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_competition\" (\n \"state\" text,\n \"interview\" real,\n \"swimsuit\" real,\n \"evening_gown\" real,\n \"average\" real\n);\n\nQuestion: What is the average of the swimsuit smaller than 9.545 , of Iowa, with an evening gown larger than 9.625?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"average\") FROM \"final_competition\" WHERE \"swimsuit\"<9.545 AND \"state\"='iowa' AND \"evening_gown\">9.625;"
}
] |
[
{
"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 \"record\" text\n);\n\nQuestion: Name the leading scorer for 1 april 2008"
},
{
"role": "assistant",
"content": "SELECT \"leading_scorer\" FROM \"april\" WHERE \"date\"='1 april 2008';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.