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 \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: what is the average rank when the lane is more than 4 and the name is dominik meichtry?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"semifinal_2\" WHERE \"lane\">4 AND \"name\"='dominik meichtry';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"largest_employers\" (\n \"rank_2012\" real,\n \"rank_2010\" real,\n \"employer\" text,\n \"industry\" text,\n \"2012_employees_total\" real,\n \"2010_employees_total\" real,\n \"2007_employees_total\" text,\n \"head_office\" text\n);\n\nQuestion: What is the 2012 Employees (Total) when the rank (2012) is 7?" }, { "role": "assistant", "content": "SELECT \"2012_employees_total\" FROM \"largest_employers\" WHERE \"rank_2012\"=7;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"largest_employers\" (\n \"rank_2012\" real,\n \"rank_2010\" real,\n \"employer\" text,\n \"industry\" text,\n \"2012_employees_total\" real,\n \"2010_employees_total\" real,\n \"2007_employees_total\" text,\n \"head_office\" text\n);\n\nQuestion: What is the total number of 2012 Employees (Total) when 2007 Employees (Total) is 8,985, and rank (2010) is smaller than 9?" }, { "role": "assistant", "content": "SELECT COUNT(\"2012_employees_total\") FROM \"largest_employers\" WHERE \"2007_employees_total\"='8,985' AND \"rank_2010\"<9;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"largest_employers\" (\n \"rank_2012\" real,\n \"rank_2010\" real,\n \"employer\" text,\n \"industry\" text,\n \"2012_employees_total\" real,\n \"2010_employees_total\" real,\n \"2007_employees_total\" text,\n \"head_office\" text\n);\n\nQuestion: What is the lowest 2010 Employees (Total) when the 2007 Employees (Total) is see note, and the 2012 Employees (Total) is larger than 99,400?" }, { "role": "assistant", "content": "SELECT MIN(\"2010_employees_total\") FROM \"largest_employers\" WHERE \"2007_employees_total\"='see note' AND \"2012_employees_total\">'99,400';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"largest_employers\" (\n \"rank_2012\" real,\n \"rank_2010\" real,\n \"employer\" text,\n \"industry\" text,\n \"2012_employees_total\" real,\n \"2010_employees_total\" real,\n \"2007_employees_total\" text,\n \"head_office\" text\n);\n\nQuestion: What shows for 2010 Employees (Total) when the employer is University of Alberta?" }, { "role": "assistant", "content": "SELECT SUM(\"2010_employees_total\") FROM \"largest_employers\" WHERE \"employer\"='university of alberta';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: How many floors when the rank is 73.0 72=?" }, { "role": "assistant", "content": "SELECT \"floors\" FROM \"tallest_buildings\" WHERE \"rank\"='73.0 72=';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tallest_buildings\" (\n \"rank\" text,\n \"name\" text,\n \"height_ft_m\" text,\n \"floors\" real,\n \"year\" real\n);\n\nQuestion: What year was the 190 South Lasalle Street?" }, { "role": "assistant", "content": "SELECT MAX(\"year\") FROM \"tallest_buildings\" WHERE \"name\"='190 south lasalle street';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What rank has a Time of 4:00.191?" }, { "role": "assistant", "content": "SELECT \"rank\" FROM \"heat_2\" WHERE \"time\"='4:00.191';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"athletes\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What is the time for Brazil?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"heat_2\" WHERE \"country\"='brazil';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_no\" text\n);\n\nQuestion: what is the date when the format is cd (limited edition steel-box) from united kingdom?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"release_history\" WHERE \"format\"='cd (limited edition steel-box)' AND \"country\"='united kingdom';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_no\" text\n);\n\nQuestion: What is the country that has the format of cd, the label of sony music and the catalogue no sicp-2055?" }, { "role": "assistant", "content": "SELECT \"country\" FROM \"release_history\" WHERE \"format\"='cd' AND \"label\"='sony music' AND \"catalogue_no\"='sicp-2055';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_no\" text\n);\n\nQuestion: what is the format for the country united kingdom on 20 october 2008?" }, { "role": "assistant", "content": "SELECT \"format\" FROM \"release_history\" WHERE \"country\"='united kingdom' AND \"date\"='20 october 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"release_history\" (\n \"country\" text,\n \"date\" text,\n \"label\" text,\n \"format\" text,\n \"catalogue_no\" text\n);\n\nQuestion: what is the catalogue no when the format is cd (limited edition steel-box) and the country is germany?" }, { "role": "assistant", "content": "SELECT \"catalogue_no\" FROM \"release_history\" WHERE \"format\"='cd (limited edition steel-box)' AND \"country\"='germany';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Total has a Rank of 4, and a Silver larger than 2?" }, { "role": "assistant", "content": "SELECT MIN(\"total\") FROM \"medals_table\" WHERE \"rank\"='4' AND \"silver\">2;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Total has a Rank of 5, and a Bronze larger than 3?" }, { "role": "assistant", "content": "SELECT SUM(\"total\") FROM \"medals_table\" WHERE \"rank\"='5' AND \"bronze\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: Which Silver has a Nation of total, and a Bronze smaller than 18?" }, { "role": "assistant", "content": "SELECT MAX(\"silver\") FROM \"medals_table\" WHERE \"nation\"='total' AND \"bronze\"<18;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: How much Silver has a Nation of total, and a Total smaller than 54?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"medals_table\" WHERE \"nation\"='total' AND \"total\"<54;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_achievements\" (\n \"year\" real,\n \"organisation\" text,\n \"award\" text,\n \"nominated_work_title\" text,\n \"result\" text\n);\n\nQuestion: What was the result for the award for best current affairs presenter?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"awards_achievements\" WHERE \"award\"='best current affairs presenter';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"awards_achievements\" (\n \"year\" real,\n \"organisation\" text,\n \"award\" text,\n \"nominated_work_title\" text,\n \"result\" text\n);\n\nQuestion: Which award was given to Lianhe Zaobao?" }, { "role": "assistant", "content": "SELECT \"award\" FROM \"awards_achievements\" WHERE \"organisation\"='lianhe zaobao';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"1966\" (\n \"title\" text,\n \"series\" text,\n \"director\" text,\n \"release_date\" text,\n \"characters\" text\n);\n\nQuestion: What's the release date of Feather Finger with an MM Series?" }, { "role": "assistant", "content": "SELECT \"release_date\" FROM \"1966\" WHERE \"series\"='mm' AND \"title\"='feather finger';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Opponent has a Venue of h, and a Result of 0\u20131, and a Date of 29 august 1998?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"fa_premier_league\" WHERE \"venue\"='h' AND \"result\"='0\u20131' AND \"date\"='29 august 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which Opponent has a Result of 1\u20131, and a Date of 28 november 1998?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"fa_premier_league\" WHERE \"result\"='1\u20131' AND \"date\"='28 november 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"fa_premier_league\" (\n \"date\" text,\n \"opponent\" text,\n \"venue\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the venue on 14 november 1998?" }, { "role": "assistant", "content": "SELECT \"venue\" FROM \"fa_premier_league\" WHERE \"date\"='14 november 1998';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"festival_da_can_o_1996\" (\n \"draw\" real,\n \"singer\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: Which Place is the highest one that has a Draw larger than 1, and 49 Points?" }, { "role": "assistant", "content": "SELECT MAX(\"place\") FROM \"festival_da_can_o_1996\" WHERE \"draw\">1 AND \"points\"=49;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"festival_da_can_o_1996\" (\n \"draw\" real,\n \"singer\" text,\n \"song\" text,\n \"points\" real,\n \"place\" real\n);\n\nQuestion: Which Song has Points smaller than 54, and a Draw smaller than 4, and a Place smaller than 10?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"festival_da_can_o_1996\" WHERE \"points\"<54 AND \"draw\"<4 AND \"place\"<10;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the bronze number when the total is 54/" }, { "role": "assistant", "content": "SELECT AVG(\"bronze\") FROM \"world_championships_total_medals\" WHERE \"total\"=54;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least bronze number when the silver is less than 0?" }, { "role": "assistant", "content": "SELECT MIN(\"bronze\") FROM \"world_championships_total_medals\" WHERE \"silver\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the least silver when the total is more than 2, bronze is 3, gold is more than 0, and rank is 1?" }, { "role": "assistant", "content": "SELECT MIN(\"silver\") FROM \"world_championships_total_medals\" WHERE \"total\">2 AND \"bronze\"=3 AND \"gold\">0 AND \"rank\"='1';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"world_championships_total_medals\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the number of silver when the total is more than 2, and bronze is less than 3, with a rank of 7?" }, { "role": "assistant", "content": "SELECT COUNT(\"silver\") FROM \"world_championships_total_medals\" WHERE \"total\">2 AND \"bronze\"<3 AND \"rank\"='7';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: Which Time has a Lane smaller than 4, and a Rank larger than 6?" }, { "role": "assistant", "content": "SELECT AVG(\"time\") FROM \"semifinal_2\" WHERE \"lane\"<4 AND \"rank\">6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: Which Rank has a Nationality of france, and a Name of alain bernard, and a Lane smaller than 6?" }, { "role": "assistant", "content": "SELECT AVG(\"rank\") FROM \"semifinal_2\" WHERE \"nationality\"='france' AND \"name\"='alain bernard' AND \"lane\"<6;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"semifinal_2\" (\n \"rank\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" real\n);\n\nQuestion: Which Nationality has a Rank larger than 1, and a Time smaller than 22.12, and a Lane smaller than 4, and a Name of ashley callus?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"semifinal_2\" WHERE \"rank\">1 AND \"time\"<22.12 AND \"lane\"<4 AND \"name\"='ashley callus';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendance_at_home_games\" (\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"score_aufc_away\" text,\n \"attendance\" real,\n \"weekday\" text\n);\n\nQuestion: When the date is 8 october 2008 what is the sum of attendance?" }, { "role": "assistant", "content": "SELECT SUM(\"attendance\") FROM \"attendance_at_home_games\" WHERE \"date\"='8 october 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendance_at_home_games\" (\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"score_aufc_away\" text,\n \"attendance\" real,\n \"weekday\" text\n);\n\nQuestion: What date has an against of pohang steelers?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"attendance_at_home_games\" WHERE \"against\"='pohang steelers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"attendance_at_home_games\" (\n \"round\" text,\n \"date\" text,\n \"against\" text,\n \"score_aufc_away\" text,\n \"attendance\" real,\n \"weekday\" text\n);\n\nQuestion: What weekday has an against of kashima antlers?" }, { "role": "assistant", "content": "SELECT \"weekday\" FROM \"attendance_at_home_games\" WHERE \"against\"='kashima antlers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What was the final score of Game #4?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"=4;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_and_cup_history\" (\n \"season\" text,\n \"league_contested\" text,\n \"level\" real,\n \"league_position\" text,\n \"avg_home_attendance_1\" text,\n \"fa_cup\" text,\n \"fa_trophy\" text,\n \"leading_scorer_1\" text\n);\n\nQuestion: Which Level has a Leading scorer 1 of tom greaves 8?" }, { "role": "assistant", "content": "SELECT \"level\" FROM \"league_and_cup_history\" WHERE \"leading_scorer_1\"='tom greaves 8';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_and_cup_history\" (\n \"season\" text,\n \"league_contested\" text,\n \"level\" real,\n \"league_position\" text,\n \"avg_home_attendance_1\" text,\n \"fa_cup\" text,\n \"fa_trophy\" text,\n \"leading_scorer_1\" text\n);\n\nQuestion: Which Leading scorer 1 has a Season of 2010\u201311?" }, { "role": "assistant", "content": "SELECT \"leading_scorer_1\" FROM \"league_and_cup_history\" WHERE \"season\"='2010\u201311';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_and_cup_history\" (\n \"season\" text,\n \"league_contested\" text,\n \"level\" real,\n \"league_position\" text,\n \"avg_home_attendance_1\" text,\n \"fa_cup\" text,\n \"fa_trophy\" text,\n \"leading_scorer_1\" text\n);\n\nQuestion: Which Leading scorer 1 has a League Contested of northern premier league premier division, and an FA Cup of 2q?" }, { "role": "assistant", "content": "SELECT \"leading_scorer_1\" FROM \"league_and_cup_history\" WHERE \"league_contested\"='northern premier league premier division' AND \"fa_cup\"='2q';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"league_and_cup_history\" (\n \"season\" text,\n \"league_contested\" text,\n \"level\" real,\n \"league_position\" text,\n \"avg_home_attendance_1\" text,\n \"fa_cup\" text,\n \"fa_trophy\" text,\n \"leading_scorer_1\" text\n);\n\nQuestion: Which Level has a League Contested of northern premier league premier division, and a Season of 2011\u201312?" }, { "role": "assistant", "content": "SELECT AVG(\"level\") FROM \"league_and_cup_history\" WHERE \"league_contested\"='northern premier league premier division' AND \"season\"='2011\u201312';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: What is the least Top-5 when 1 is the cuts made?" }, { "role": "assistant", "content": "SELECT MIN(\"top_5\") FROM \"summary\" WHERE \"cuts_made\"=1;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: With events less than 0, what is the fewest Top-5?" }, { "role": "assistant", "content": "SELECT MIN(\"top_5\") FROM \"summary\" WHERE \"events\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many wins of average has cuts made less than 0?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"summary\" WHERE \"cuts_made\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: How many events total is the Top-5 2, and 4 is the cuts made, and less than 0 wins?" }, { "role": "assistant", "content": "SELECT COUNT(\"events\") FROM \"summary\" WHERE \"top_5\"=2 AND \"cuts_made\"=4 AND \"wins\"<0;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"summary\" (\n \"tournament\" text,\n \"wins\" real,\n \"top_5\" real,\n \"events\" real,\n \"cuts_made\" real\n);\n\nQuestion: In the Open Championship with more than 3 cuts made, what is the average wins?" }, { "role": "assistant", "content": "SELECT AVG(\"wins\") FROM \"summary\" WHERE \"tournament\"='the open championship' AND \"cuts_made\">3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What lane did the barbados swimmer compete in before heat 3?" }, { "role": "assistant", "content": "SELECT \"lane\" FROM \"heats\" WHERE \"heat\"<3 AND \"nationality\"='barbados';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heats\" (\n \"rank\" real,\n \"heat\" real,\n \"lane\" real,\n \"name\" text,\n \"nationality\" text,\n \"time\" text\n);\n\nQuestion: What was the time of the 5th ranked swimmer who swam after heat 3 and was in a lane under 5?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"heats\" WHERE \"heat\">3 AND \"lane\"<5 AND \"rank\"=5;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What is the average population for an area less than 433.7km and a 23013 code?" }, { "role": "assistant", "content": "SELECT AVG(\"population\") FROM \"main_places\" WHERE \"area_km_2\"<433.7 AND \"code\"=23013;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"main_places\" (\n \"place\" text,\n \"code\" real,\n \"area_km_2\" real,\n \"population\" real,\n \"most_spoken_language\" text\n);\n\nQuestion: What is the total code number for Amadiba?" }, { "role": "assistant", "content": "SELECT COUNT(\"code\") FROM \"main_places\" WHERE \"place\"='amadiba';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rugby_union\" (\n \"club\" text,\n \"league\" text,\n \"city_town\" text,\n \"stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What is the total capacity for the Leicester Tigers?" }, { "role": "assistant", "content": "SELECT COUNT(\"capacity\") FROM \"rugby_union\" WHERE \"club\"='leicester tigers';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"rugby_union\" (\n \"club\" text,\n \"league\" text,\n \"city_town\" text,\n \"stadium\" text,\n \"capacity\" real\n);\n\nQuestion: What town has the Welford Road Stadium?" }, { "role": "assistant", "content": "SELECT \"city_town\" FROM \"rugby_union\" WHERE \"stadium\"='welford road';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scotland\" (\n \"player\" text,\n \"int_l_debut\" text,\n \"year\" real,\n \"cross_code_debut\" text,\n \"date\" text,\n \"position\" text\n);\n\nQuestion: What date was the Cross Code Debut of rl 1st test great britain v australia, and the Int'l Debut was RU Five Nations v Ireland?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"scotland\" WHERE \"cross_code_debut\"='rl 1st test great britain v australia' AND \"int_l_debut\"='ru five nations v ireland';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"scotland\" (\n \"player\" text,\n \"int_l_debut\" text,\n \"year\" real,\n \"cross_code_debut\" text,\n \"date\" text,\n \"position\" text\n);\n\nQuestion: What year was the player David Rose?" }, { "role": "assistant", "content": "SELECT SUM(\"year\") FROM \"scotland\" WHERE \"player\"='david rose';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tennessee_counties_ranked_by_per_capita_\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the median family income when the per capita is $24,114?" }, { "role": "assistant", "content": "SELECT \"median_family_income\" FROM \"tennessee_counties_ranked_by_per_capita_\" WHERE \"per_capita_income\"='$24,114';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tennessee_counties_ranked_by_per_capita_\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the median household income when the per capita is $21,585?" }, { "role": "assistant", "content": "SELECT \"median_household_income\" FROM \"tennessee_counties_ranked_by_per_capita_\" WHERE \"per_capita_income\"='$21,585';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tennessee_counties_ranked_by_per_capita_\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the population where the median family income is $48,446 and there are more than 35,343 households?" }, { "role": "assistant", "content": "SELECT AVG(\"population\") FROM \"tennessee_counties_ranked_by_per_capita_\" WHERE \"median_family_income\"='$48,446' AND \"number_of_households\">'35,343';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"tennessee_counties_ranked_by_per_capita_\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What is the population where the median household income is $87,832 and there are fewer than 64,886 households?" }, { "role": "assistant", "content": "SELECT AVG(\"population\") FROM \"tennessee_counties_ranked_by_per_capita_\" WHERE \"median_household_income\"='$87,832' AND \"number_of_households\"<'64,886';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stats\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text,\n \"scorers\" text\n);\n\nQuestion: What is the score 1 for the major league soccer all-star game?" }, { "role": "assistant", "content": "SELECT \"score1\" FROM \"stats\" WHERE \"competition_or_tour\"='major league soccer all-star game';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stats\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text,\n \"scorers\" text\n);\n\nQuestion: What is the score 1 with a h ground?" }, { "role": "assistant", "content": "SELECT \"score1\" FROM \"stats\" WHERE \"ground\"='h';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stats\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text,\n \"scorers\" text\n);\n\nQuestion: Who are the scorers on 1 August 2008, where the ground was A?" }, { "role": "assistant", "content": "SELECT \"scorers\" FROM \"stats\" WHERE \"ground\"='a' AND \"date\"='1 august 2008';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stats\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: What ground had Portsmouth reserves as an opponent?" }, { "role": "assistant", "content": "SELECT \"ground\" FROM \"stats\" WHERE \"opponent\"='portsmouth reserves';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"stats\" (\n \"match\" real,\n \"date\" text,\n \"competition_or_tour\" text,\n \"ground\" text,\n \"opponent\" text,\n \"score1\" text\n);\n\nQuestion: What ground had a match smaller than 6 and Chelsea Reserves as the opponent?" }, { "role": "assistant", "content": "SELECT \"ground\" FROM \"stats\" WHERE \"match\"<6 AND \"opponent\"='chelsea reserves';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws_p_k_wins_p_k_losses\" text,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: Which Team has Losses larger than 5, and a Position of 12?" }, { "role": "assistant", "content": "SELECT \"team\" FROM \"torneo_clausura\" WHERE \"losses\">5 AND \"position\"=12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws_p_k_wins_p_k_losses\" text,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: How many Points have a Position larger than 4, and Losses larger than 5, and a Conceded of 15, and a Scored larger than 11?" }, { "role": "assistant", "content": "SELECT COUNT(\"points\") FROM \"torneo_clausura\" WHERE \"position\">4 AND \"losses\">5 AND \"conceded\"=15 AND \"scored\">11;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"torneo_clausura\" (\n \"position\" real,\n \"team\" text,\n \"played\" real,\n \"wins\" real,\n \"draws_p_k_wins_p_k_losses\" text,\n \"losses\" real,\n \"scored\" real,\n \"conceded\" real,\n \"points\" real\n);\n\nQuestion: How many positions have Played smaller than 12?" }, { "role": "assistant", "content": "SELECT SUM(\"position\") FROM \"torneo_clausura\" WHERE \"played\"<12;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"faction\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: Who was the Prato Elector with a faction of Italian?" }, { "role": "assistant", "content": "SELECT \"elector\" FROM \"cardinal_electors\" WHERE \"faction\"='italian' AND \"nationality\"='prato';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"faction\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What's the elevator of Jacques D'euse?" }, { "role": "assistant", "content": "SELECT \"elevator\" FROM \"cardinal_electors\" WHERE \"elector\"='jacques d''euse';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"cardinal_electors\" (\n \"elector\" text,\n \"nationality\" text,\n \"faction\" text,\n \"elevated\" text,\n \"elevator\" text\n);\n\nQuestion: What's the nationality for Nicholas III?" }, { "role": "assistant", "content": "SELECT \"nationality\" FROM \"cardinal_electors\" WHERE \"elevator\"='nicholas iii';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specimen_set_editions\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What is the fewest mintage from Dora de P\u00e9dery-Hunt, and the year was before 2002?" }, { "role": "assistant", "content": "SELECT MIN(\"mintage\") FROM \"specimen_set_editions\" WHERE \"artist\"='dora de p\u00e9dery-hunt' AND \"year\"<2002;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specimen_set_editions\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What is the most mintage with common eider as the theme, and the year less than 2008?" }, { "role": "assistant", "content": "SELECT MAX(\"mintage\") FROM \"specimen_set_editions\" WHERE \"theme\"='common eider' AND \"year\"<2008;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specimen_set_editions\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: What is the earliest year when the 25th Anniversary Loonie was the theme, and the mintage was less than 35,000?" }, { "role": "assistant", "content": "SELECT MIN(\"year\") FROM \"specimen_set_editions\" WHERE \"theme\"='25th anniversary loonie' AND \"mintage\"<'35,000';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"specimen_set_editions\" (\n \"year\" real,\n \"theme\" text,\n \"artist\" text,\n \"mintage\" real,\n \"issue_price\" text\n);\n\nQuestion: Who was the artist that had $49.95 as the issue price for the 2010 year?" }, { "role": "assistant", "content": "SELECT \"artist\" FROM \"specimen_set_editions\" WHERE \"issue_price\"='$49.95' AND \"year\"=2010;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What is the score for the southern home team?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"first_round\" WHERE \"home_team\"='southern';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"first_round\" (\n \"time\" text,\n \"home_team\" text,\n \"score\" text,\n \"away_team\" text,\n \"venue\" text\n);\n\nQuestion: What time is it for the southern home team?" }, { "role": "assistant", "content": "SELECT \"time\" FROM \"first_round\" WHERE \"home_team\"='southern';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Result of the game on November 24, 1946?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"schedule\" WHERE \"date\"='november 24, 1946';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Week number on September 6, 1946?" }, { "role": "assistant", "content": "SELECT SUM(\"week\") FROM \"schedule\" WHERE \"date\"='september 6, 1946';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"score\" text,\n \"record\" text\n);\n\nQuestion: What is the Date of the game with a Record of 5-3?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"schedule\" WHERE \"record\"='5-3';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What was the lowest ranking rower from Great Britain?" }, { "role": "assistant", "content": "SELECT MIN(\"rank\") FROM \"heat_2\" WHERE \"country\"='great britain';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"heat_2\" (\n \"rank\" real,\n \"rowers\" text,\n \"country\" text,\n \"time\" text,\n \"notes\" text\n);\n\nQuestion: What are the notes for the rower in ranks over 2 and having a time of 7:00:46?" }, { "role": "assistant", "content": "SELECT \"notes\" FROM \"heat_2\" WHERE \"rank\">2 AND \"time\"='7:00:46';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which Programming has a Video of audio only?" }, { "role": "assistant", "content": "SELECT \"programming\" FROM \"digital_channels\" WHERE \"video\"='audio only';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which Video has a Channel of 25.3?" }, { "role": "assistant", "content": "SELECT \"video\" FROM \"digital_channels\" WHERE \"channel\"=25.3;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"digital_channels\" (\n \"channel\" real,\n \"video\" text,\n \"aspect\" text,\n \"psip_short_name\" text,\n \"programming\" text\n);\n\nQuestion: Which Video has an Aspect of 16:9?" }, { "role": "assistant", "content": "SELECT \"video\" FROM \"digital_channels\" WHERE \"aspect\"='16:9';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"episodes\" (\n \"no_in_series\" real,\n \"title\" text,\n \"directed_by\" text,\n \"written_by\" text,\n \"original_air_date\" text\n);\n\nQuestion: What is the Original Air date of the episode \"Touch and Go\"?" }, { "role": "assistant", "content": "SELECT \"original_air_date\" FROM \"episodes\" WHERE \"title\"='\\\"touch and go\\\"';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democratic_primary\" (\n \"source\" text,\n \"date\" text,\n \"jody_wagner\" text,\n \"pat_edmonson\" text,\n \"michael_signer\" text,\n \"rich_savage\" text,\n \"jon_bowerbank\" text,\n \"undecided\" text\n);\n\nQuestion: On which date did Michael Signer earn 4%?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"democratic_primary\" WHERE \"michael_signer\"='4%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democratic_primary\" (\n \"source\" text,\n \"date\" text,\n \"jody_wagner\" text,\n \"pat_edmonson\" text,\n \"michael_signer\" text,\n \"rich_savage\" text,\n \"jon_bowerbank\" text,\n \"undecided\" text\n);\n\nQuestion: Which polling source gave Michael Signer 5%?" }, { "role": "assistant", "content": "SELECT \"source\" FROM \"democratic_primary\" WHERE \"michael_signer\"='5%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democratic_primary\" (\n \"source\" text,\n \"date\" text,\n \"jody_wagner\" text,\n \"pat_edmonson\" text,\n \"michael_signer\" text,\n \"rich_savage\" text,\n \"jon_bowerbank\" text,\n \"undecided\" text\n);\n\nQuestion: Which date had the undecided percentage at 42%?" }, { "role": "assistant", "content": "SELECT \"date\" FROM \"democratic_primary\" WHERE \"undecided\"='42%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democratic_primary\" (\n \"source\" text,\n \"date\" text,\n \"jody_wagner\" text,\n \"pat_edmonson\" text,\n \"michael_signer\" text,\n \"rich_savage\" text,\n \"jon_bowerbank\" text,\n \"undecided\" text\n);\n\nQuestion: What is the Rich Savage percentage in the poll with Jody Wagner at 30%?" }, { "role": "assistant", "content": "SELECT \"rich_savage\" FROM \"democratic_primary\" WHERE \"jody_wagner\"='30%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"democratic_primary\" (\n \"source\" text,\n \"date\" text,\n \"jody_wagner\" text,\n \"pat_edmonson\" text,\n \"michael_signer\" text,\n \"rich_savage\" text,\n \"jon_bowerbank\" text,\n \"undecided\" text\n);\n\nQuestion: What is the Rich Savage percentage in the poll that had undecideds at 68%?" }, { "role": "assistant", "content": "SELECT \"rich_savage\" FROM \"democratic_primary\" WHERE \"undecided\"='68%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent when the record was 31-24?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"record\"='31-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 \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score of Game 48?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"game\"='48';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: Who was the opponent at the game at Madison Square Garden?" }, { "role": "assistant", "content": "SELECT \"opponent\" FROM \"game_log\" WHERE \"location_attendance\"='madison square garden';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" text,\n \"date\" text,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score of the game at Great Western Forum?" }, { "role": "assistant", "content": "SELECT \"score\" FROM \"game_log\" WHERE \"location_attendance\"='great western forum';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_winter_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which Romaji Title has a Japanese Title of \u82b1\u3088\u308a\u7537\u5b502\uff08\u30ea\u30bf\u30fc\u30f3\u30ba\uff09?" }, { "role": "assistant", "content": "SELECT \"romaji_title\" FROM \"2007_winter_season\" WHERE \"japanese_title\"='\u82b1\u3088\u308a\u7537\u5b502\uff08\u30ea\u30bf\u30fc\u30f3\u30ba\uff09';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_winter_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which Romaji Title has a TV Station of fuji tv, and Average Ratings of 12.41%?" }, { "role": "assistant", "content": "SELECT \"romaji_title\" FROM \"2007_winter_season\" WHERE \"tv_station\"='fuji tv' AND \"average_ratings\"='12.41%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_winter_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which Japanese Title has more than 9 Episodes, and a Romaji Title of haikei, chichiue-sama?" }, { "role": "assistant", "content": "SELECT \"japanese_title\" FROM \"2007_winter_season\" WHERE \"episodes\">9 AND \"romaji_title\"='haikei, chichiue-sama';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"2007_winter_season\" (\n \"japanese_title\" text,\n \"romaji_title\" text,\n \"tv_station\" text,\n \"episodes\" real,\n \"average_ratings\" text\n);\n\nQuestion: Which Romaji Title has 11 Episodes, and a TV Station of fuji tv, and Average Ratings of 14.9%?" }, { "role": "assistant", "content": "SELECT \"romaji_title\" FROM \"2007_winter_season\" WHERE \"episodes\"=11 AND \"tv_station\"='fuji tv' AND \"average_ratings\"='14.9%';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"artios_awards\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What was the result of nomination for Season 6 after 1995?" }, { "role": "assistant", "content": "SELECT \"result\" FROM \"artios_awards\" WHERE \"year\">1995 AND \"episode\"='season 6';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"artios_awards\" (\n \"year\" real,\n \"category\" text,\n \"nominee_s\" text,\n \"episode\" text,\n \"result\" text\n);\n\nQuestion: What was the category of the award that John Frank Levey was nominated for after 1995?" }, { "role": "assistant", "content": "SELECT \"category\" FROM \"artios_awards\" WHERE \"nominee_s\"='john frank levey' AND \"year\">1995;" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What is the English Translation for the French song by the Artist Rachel?" }, { "role": "assistant", "content": "SELECT \"english_translation\" FROM \"results\" WHERE \"language\"='french' AND \"artist\"='rachel';" } ]
[ { "role": "system", "content": "You are an expert SQL query generator. Only output valid SQL." }, { "role": "user", "content": "### Database Schema\nCREATE TABLE \"results\" (\n \"draw\" real,\n \"language\" text,\n \"artist\" text,\n \"song\" text,\n \"english_translation\" text,\n \"place\" real,\n \"points\" real\n);\n\nQuestion: What is the Song by Artist Robert Cogoi?" }, { "role": "assistant", "content": "SELECT \"song\" FROM \"results\" WHERE \"artist\"='robert cogoi';" } ]