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 \"round_13\" (\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 were both the crowd larger than 15,000 and the Away team score of 9.11 (65)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_13\" WHERE \"crowd\">'15,000' AND \"away_team_score\"='9.11 (65)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance at the Meadowlands against the New England Patriots?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"regular_season\" WHERE \"game_site\"='the meadowlands' AND \"opponent\"='new england patriots';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"attendance\" text\n);\n\nQuestion: What game did Jets have an attendance of 78,722?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"regular_season\" WHERE \"attendance\"='78,722';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which home team corresponds to an away team score of 5.10 (40)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_16\" WHERE \"away_team_score\"='5.10 (40)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the largest crowd for an away team score of 8.7 (55)?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_16\" WHERE \"away_team_score\"='8.7 (55)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which venue hosted a home team with a score of 11.16 (82)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_16\" WHERE \"home_team_score\"='11.16 (82)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_16\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which away team has a team score of 12.11 (83)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_16\" WHERE \"away_team_score\"='12.11 (83)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: Who played the Rams on October 2, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"date\"='october 2, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance of the game on December 11, 2005?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"schedule\" WHERE \"date\"='december 11, 2005';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the result of the game played in front of 65,473?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\"='65,473';"
}
] |
[
{
"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: How large was the crowd at Carlton's home game?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_11\" WHERE \"home_team\"='carlton';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_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: On what date did the away team score 12.9 (81)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_11\" WHERE \"away_team_score\"='12.9 (81)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the score when St Kilda played as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_14\" WHERE \"home_team\"='st kilda';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_14\" (\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 crowd when the VFL played Windy Hill?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_14\" WHERE \"venue\"='windy hill';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was Carlton's score when they were the away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_6\" 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_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the sum of the crowds in the matches where the away team scored 11.8 (74)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_6\" WHERE \"away_team_score\"='11.8 (74)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_6\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team that played at Corio Oval?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_6\" WHERE \"venue\"='corio oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Home team faced the Away team, Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_12\" WHERE \"away_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Which Away team scored 12.17 (89) when the crowd was larger than 17,000?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_12\" WHERE \"crowd\">'17,000' AND \"away_team_score\"='12.17 (89)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the Home team's score when the Away team scored 12.6 (78)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"away_team_score\"='12.6 (78)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the Home team's score when the Venue was mcg?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_12\" WHERE \"venue\"='mcg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"season\" real,\n \"division\" real,\n \"tms\" real,\n \"pos\" real,\n \"fa_cup\" text\n);\n\nQuestion: What is the division in the season more recent than 2012 when the round of 16 was reached in the FA Cup?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"division\") FROM \"records\" WHERE \"fa_cup\"='round of 16' AND \"season\">2012;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"records\" (\n \"season\" real,\n \"division\" real,\n \"tms\" real,\n \"pos\" real,\n \"fa_cup\" text\n);\n\nQuestion: What is the division in the season with 13 tms and pos smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"division\") FROM \"records\" WHERE \"tms\"=13 AND \"pos\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"by_density\" (\n \"rank\" text,\n \"county\" text,\n \"population_2011\" real,\n \"area_km\" real,\n \"density_2011\" real\n);\n\nQuestion: What is the population of the county with an area of 9,378 km\u00b2 and a population density larger than 46.7?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"population_2011\") FROM \"by_density\" WHERE \"area_km\"='9,378' AND \"density_2011\">46.7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Of the games before week 3 which had attendance great than 65,904?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"week\"<3 AND \"attendance\">'65,904';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the first week to have attendance of 65,866?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"week\") FROM \"schedule\" WHERE \"attendance\"='65,866';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"institution\" text,\n \"location\" text,\n \"men_s_nickname\" text,\n \"women_s_nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" text,\n \"left\" text,\n \"current_conference\" text,\n \"classification\" text\n);\n\nQuestion: Where is the Belhaven College SSAC conference location?"
},
{
"role": "assistant",
"content": "SELECT \"location\" FROM \"former_members\" WHERE \"current_conference\"='ssac' AND \"institution\"='belhaven college';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"former_members\" (\n \"institution\" text,\n \"location\" text,\n \"men_s_nickname\" text,\n \"women_s_nickname\" text,\n \"founded\" real,\n \"type\" text,\n \"enrollment\" real,\n \"joined\" text,\n \"left\" text,\n \"current_conference\" text,\n \"classification\" text\n);\n\nQuestion: What American Southwest Conference school was founded in 1883?"
},
{
"role": "assistant",
"content": "SELECT \"institution\" FROM \"former_members\" WHERE \"founded\">1883 AND \"current_conference\"='american southwest';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"attendance_average\" text\n);\n\nQuestion: Which League showed 7,975 for an average attendance?"
},
{
"role": "assistant",
"content": "SELECT \"league\" FROM \"year_by_year\" WHERE \"attendance_average\"='7,975';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"year_by_year\" (\n \"year\" text,\n \"league\" text,\n \"reg_season\" text,\n \"playoffs\" text,\n \"attendance_average\" text\n);\n\nQuestion: What is the average attendance of the team that had a regular season result of 2nd aisa, 24-16?"
},
{
"role": "assistant",
"content": "SELECT \"attendance_average\" FROM \"year_by_year\" WHERE \"reg_season\"='2nd aisa, 24-16';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" text,\n \"group_i\" text,\n \"group_ii\" text,\n \"group_iii\" text,\n \"group_iv\" text,\n \"group_v\" text,\n \"group_vi\" text\n);\n\nQuestion: Who won Group VI, when Group 1 was won by deportivo, group IV by sevilla, and group III by Valencia?"
},
{
"role": "assistant",
"content": "SELECT \"group_vi\" FROM \"champions\" WHERE \"group_i\"='deportivo' AND \"group_iv\"='sevilla' AND \"group_iii\"='valencia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" text,\n \"group_i\" text,\n \"group_ii\" text,\n \"group_iii\" text,\n \"group_iv\" text,\n \"group_v\" text,\n \"group_vi\" text\n);\n\nQuestion: Who won group III when group 1 was of the racing club?"
},
{
"role": "assistant",
"content": "SELECT \"group_iii\" FROM \"champions\" WHERE \"group_i\"='racing club';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"champions\" (\n \"season\" text,\n \"group_i\" text,\n \"group_ii\" text,\n \"group_iii\" text,\n \"group_iv\" text,\n \"group_v\" text,\n \"group_vi\" text\n);\n\nQuestion: What season has Group IV Sevilla, Group VI las palmas, group III barcelona, and group 1 sporting?"
},
{
"role": "assistant",
"content": "SELECT \"season\" FROM \"champions\" WHERE \"group_iv\"='sevilla' AND \"group_vi\"='las palmas' AND \"group_iii\"='barcelona' AND \"group_i\"='sporting';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1971_isle_of_man_production_500_cc_tt_fi\" (\n \"rank\" real,\n \"rider\" text,\n \"team\" text,\n \"speed\" text,\n \"time\" text\n);\n\nQuestion: Which team is John Williams a rider for?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"1971_isle_of_man_production_500_cc_tt_fi\" WHERE \"rider\"='john williams';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: How big was the crowd when Geelong was the home team?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_1\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was the game when the away team scored 11.6 (72)?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_1\" WHERE \"away_team_score\"='11.6 (72)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team when Hawthorn was the home team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_1\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team when the home team scored 9.16 (70)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_1\" WHERE \"home_team_score\"='9.16 (70)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ntua_academic_staff_per_school\" (\n \"lecturers\" real,\n \"associate_professors\" real,\n \"assistant_professors\" real,\n \"professors\" real,\n \"total\" real\n);\n\nQuestion: What is the total in the case where theere are 6 lecturers and fewer than 48 professors?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"total\") FROM \"ntua_academic_staff_per_school\" WHERE \"lecturers\"=6 AND \"professors\"<48;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ntua_academic_staff_per_school\" (\n \"lecturers\" real,\n \"associate_professors\" real,\n \"assistant_professors\" real,\n \"professors\" real,\n \"total\" real\n);\n\nQuestion: What is the total in the case when there are more than 4 associate professors, 5 lecturers and fewer professors than 40?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"total\") FROM \"ntua_academic_staff_per_school\" WHERE \"associate_professors\">4 AND \"lecturers\"=5 AND \"professors\"<40;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ntua_academic_staff_per_school\" (\n \"lecturers\" real,\n \"associate_professors\" real,\n \"assistant_professors\" real,\n \"professors\" real,\n \"total\" real\n);\n\nQuestion: How may lecturers are there in the case when there are more than 8 assistant professors, fewer than 35 associate professors, more than 14 professors and total of more than 81?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lecturers\") FROM \"ntua_academic_staff_per_school\" WHERE \"assistant_professors\">8 AND \"professors\">14 AND \"associate_professors\"<35 AND \"total\">81;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"ntua_academic_staff_per_school\" (\n \"lecturers\" real,\n \"associate_professors\" real,\n \"assistant_professors\" real,\n \"professors\" real,\n \"total\" real\n);\n\nQuestion: What is the maximum number of associate professors when there are more than 5 assistant professors and fewer than 14 professors?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"associate_professors\") FROM \"ntua_academic_staff_per_school\" WHERE \"assistant_professors\">5 AND \"professors\"<14;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"malaysia\" (\n \"network\" text,\n \"origin_of_programming\" text,\n \"language\" text,\n \"genre\" text,\n \"service\" text\n);\n\nQuestion: Which country has the banglavision Network?"
},
{
"role": "assistant",
"content": "SELECT \"origin_of_programming\" FROM \"malaysia\" WHERE \"network\"='banglavision';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"malaysia\" (\n \"network\" text,\n \"origin_of_programming\" text,\n \"language\" text,\n \"genre\" text,\n \"service\" text\n);\n\nQuestion: Which general service in India is a part of the zee variasi network?"
},
{
"role": "assistant",
"content": "SELECT \"service\" FROM \"malaysia\" WHERE \"origin_of_programming\"='india' AND \"genre\"='general' AND \"network\"='zee variasi';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"allowable_tackle_types\" (\n \"sliding_tackle\" text,\n \"spear_tackle\" text,\n \"dump_tackle\" text,\n \"body_tackle\" text,\n \"ankle_tap\" text,\n \"diving_tackle\" text,\n \"bumping_blocking\" text,\n \"shoulder_charge\" text,\n \"steal_intercept_ball\" text,\n \"chicken_wing\" text\n);\n\nQuestion: Which sliding tackle has no dump tackle and a restricted shoulder charge?"
},
{
"role": "assistant",
"content": "SELECT \"sliding_tackle\" FROM \"allowable_tackle_types\" WHERE \"dump_tackle\"='no' AND \"shoulder_charge\"='restricted';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"allowable_tackle_types\" (\n \"sliding_tackle\" text,\n \"spear_tackle\" text,\n \"dump_tackle\" text,\n \"body_tackle\" text,\n \"ankle_tap\" text,\n \"diving_tackle\" text,\n \"bumping_blocking\" text,\n \"shoulder_charge\" text,\n \"steal_intercept_ball\" text,\n \"chicken_wing\" text\n);\n\nQuestion: Which bumping/blocking has a yes for both the ankle tap and steal/intercept ball?"
},
{
"role": "assistant",
"content": "SELECT \"bumping_blocking\" FROM \"allowable_tackle_types\" WHERE \"ankle_tap\"='yes' AND \"steal_intercept_ball\"='yes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"allowable_tackle_types\" (\n \"sliding_tackle\" text,\n \"spear_tackle\" text,\n \"dump_tackle\" text,\n \"body_tackle\" text,\n \"ankle_tap\" text,\n \"diving_tackle\" text,\n \"bumping_blocking\" text,\n \"shoulder_charge\" text,\n \"steal_intercept_ball\" text,\n \"chicken_wing\" text\n);\n\nQuestion: Which body tackle has yes for the diving tackle and the sliding tackle classified as a trip?"
},
{
"role": "assistant",
"content": "SELECT \"body_tackle\" FROM \"allowable_tackle_types\" WHERE \"diving_tackle\"='yes' AND \"sliding_tackle\"='classified as a trip';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"allowable_tackle_types\" (\n \"sliding_tackle\" text,\n \"spear_tackle\" text,\n \"dump_tackle\" text,\n \"body_tackle\" text,\n \"ankle_tap\" text,\n \"diving_tackle\" text,\n \"bumping_blocking\" text,\n \"shoulder_charge\" text,\n \"steal_intercept_ball\" text,\n \"chicken_wing\" text\n);\n\nQuestion: Which Chicken wing has no steal/intercept ball?"
},
{
"role": "assistant",
"content": "SELECT \"chicken_wing\" FROM \"allowable_tackle_types\" WHERE \"steal_intercept_ball\"='no';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"allowable_tackle_types\" (\n \"sliding_tackle\" text,\n \"spear_tackle\" text,\n \"dump_tackle\" text,\n \"body_tackle\" text,\n \"ankle_tap\" text,\n \"diving_tackle\" text,\n \"bumping_blocking\" text,\n \"shoulder_charge\" text,\n \"steal_intercept_ball\" text,\n \"chicken_wing\" text\n);\n\nQuestion: Which steal/intercept ball has no for both the sliding tackle and dump tackle?"
},
{
"role": "assistant",
"content": "SELECT \"steal_intercept_ball\" FROM \"allowable_tackle_types\" WHERE \"sliding_tackle\"='no' AND \"dump_tackle\"='no';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"allowable_tackle_types\" (\n \"sliding_tackle\" text,\n \"spear_tackle\" text,\n \"dump_tackle\" text,\n \"body_tackle\" text,\n \"ankle_tap\" text,\n \"diving_tackle\" text,\n \"bumping_blocking\" text,\n \"shoulder_charge\" text,\n \"steal_intercept_ball\" text,\n \"chicken_wing\" text\n);\n\nQuestion: Which shoulder charge has restricted as the body tackle?"
},
{
"role": "assistant",
"content": "SELECT \"shoulder_charge\" FROM \"allowable_tackle_types\" WHERE \"body_tackle\"='restricted';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"from\" text,\n \"school_country\" text\n);\n\nQuestion: Which player has West Virginia listed as their school/country?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"e\" WHERE \"school_country\"='west virginia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"e\" (\n \"player\" text,\n \"nationality\" text,\n \"position\" text,\n \"from\" text,\n \"school_country\" text\n);\n\nQuestion: Which player played the guard position from 1968?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"e\" WHERE \"position\"='guard' AND \"from\"='1968';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the total crowd size when the away team scores 14.6 (90)?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_2\" WHERE \"away_team_score\"='14.6 (90)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_2\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd size when fitzroy plays at home?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_2\" WHERE \"home_team\"='fitzroy';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"mayors\" (\n \"election\" text,\n \"date_of_election\" text,\n \"candidates\" text,\n \"results\" text,\n \"total_votes\" real\n);\n\nQuestion: What is the result of the election with 3,871 total votes?"
},
{
"role": "assistant",
"content": "SELECT \"results\" FROM \"mayors\" WHERE \"total_votes\">'3,871';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_by_conference\" (\n \"conference\" text,\n \"num_of_bids\" real,\n \"record\" text,\n \"win_pct\" real,\n \"round_of_32\" real,\n \"sweet_sixteen\" real,\n \"elite_eight\" real,\n \"final_four\" real,\n \"championship_game\" real\n);\n\nQuestion: What is the lowest number of bids in the Missouri Valley conference?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"num_of_bids\") FROM \"record_by_conference\" WHERE \"conference\"='missouri valley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_by_game_results\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the attendance on the bye week?"
},
{
"role": "assistant",
"content": "SELECT \"attendance\" FROM \"game_by_game_results\" WHERE \"date\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_by_game_results\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: What was the last week when the team had a bye week?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"game_by_game_results\" WHERE \"result\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Where was the game held where North Melbourne was the away team?"
},
{
"role": "assistant",
"content": "SELECT \"venue\" FROM \"round_9\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who was the away team who scored 9.7 (61)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_9\" WHERE \"away_team_score\"='9.7 (61)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the smallest crowd for a game where the home team scored 11.18 (84)?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_9\" WHERE \"home_team_score\"='11.18 (84)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_9\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the smallest crowd size for a home game for Richmond?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"crowd\") FROM \"round_9\" WHERE \"home_team\"='richmond';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" text\n);\n\nQuestion: When did the 1966 Cleveland Browns play the Green Bay Packers?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"regular_season_schedule\" WHERE \"opponent\"='green bay packers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What was the away team score for the game where the home team scored 11.13 (79)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_8\" WHERE \"home_team_score\"='11.13 (79)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\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 scored 19.15 (129) on 15 June 1959?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_8\" WHERE \"date\"='15 june 1959' AND \"home_team_score\"='19.15 (129)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_8\" (\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 many points did South Melbourne score as the home team?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_8\" WHERE \"home_team\"='south melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_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: What was the home team's score when the away team scored 9.12 (66)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_4\" WHERE \"away_team_score\"='9.12 (66)';"
}
] |
[
{
"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: On what date was the home team Footscray?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_4\" WHERE \"home_team\"='footscray';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_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: What was the average crowd size when the home team scored 9.8 (62)?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_4\" WHERE \"home_team_score\"='9.8 (62)';"
}
] |
[
{
"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: What was the home team when the away team scored 7.16 (58)?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_4\" WHERE \"away_team_score\"='7.16 (58)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\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 amount of goals that have a goal difference or 8 and the losses are smaller than 12?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goals_for\") FROM \"final_table\" WHERE \"goal_difference\"=8 AND \"losses\"<12;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\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: How many goals have a Lokomotiv Plovdiv club and goals against larger than 58?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"goals_for\") FROM \"final_table\" WHERE \"club\"='lokomotiv plovdiv' AND \"goals_against\">58;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\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 goal difference using slavia sofia club?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"goal_difference\") FROM \"final_table\" WHERE \"club\"='slavia sofia';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"final_table\" (\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 played average that has botev plovdiv as the club and wins larger than 11?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"played\") FROM \"final_table\" WHERE \"club\"='botev plovdiv' AND \"wins\">11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"kickoff\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"nfl_com_recap\" text\n);\n\nQuestion: Where did they play on their bye week?"
},
{
"role": "assistant",
"content": "SELECT \"game_site\" FROM \"regular_season\" WHERE \"record\"='bye';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"kickoff\" text,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"nfl_com_recap\" text\n);\n\nQuestion: What is the kickoff that has a NFL.com recap, is played before week 17, and is played at arrowhead stadium?"
},
{
"role": "assistant",
"content": "SELECT \"kickoff\" FROM \"regular_season\" WHERE \"nfl_com_recap\"='recap' AND \"week\"<17 AND \"game_site\"='arrowhead stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: Who is the home team at brunswick street oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team\" FROM \"round_1\" WHERE \"venue\"='brunswick street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the home team's score at brunswick street oval?"
},
{
"role": "assistant",
"content": "SELECT \"home_team_score\" FROM \"round_1\" WHERE \"venue\"='brunswick street oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_1\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away side's score when the home team's score is 15.14 (104)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_1\" WHERE \"home_team_score\"='15.14 (104)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 did the match take place that had an away team score of 12.12 (84)?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"round_10\" WHERE \"away_team_score\"='12.12 (84)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 crowd size of the match where the home team scored 7.7 (49) against Geelong?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"crowd\") FROM \"round_10\" WHERE \"home_team_score\"='7.7 (49)' AND \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_10\" (\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 match had the largest crowd size where the away team was North Melbourne?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_10\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 away team scored 6.12 (48)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"away_team_score\"='6.12 (48)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 North Melbourne's score as an away team?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"away_team\"='north melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 crowd size when the away team scored 10.9 (69)?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"crowd\") FROM \"round_13\" WHERE \"away_team_score\"='10.9 (69)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 against Hawthorn?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_13\" WHERE \"home_team\"='hawthorn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_13\" (\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 that played the home team of Geelong?"
},
{
"role": "assistant",
"content": "SELECT \"away_team\" FROM \"round_13\" WHERE \"home_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What week has an attended smaller than 62,723 on October 22, 1961?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"week\") FROM \"regular_season_schedule\" WHERE \"attendance\"<'62,723' AND \"date\"='october 22, 1961';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season_schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: Which week with Green Bay Packers as an opponent is the highest?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"week\") FROM \"regular_season_schedule\" WHERE \"opponent\"='green bay packers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_caps\" (\n \"player\" text,\n \"span\" text,\n \"start\" real,\n \"tries\" real,\n \"conv\" real,\n \"pens\" real,\n \"drop\" real,\n \"lost\" real,\n \"draw\" real\n);\n\nQuestion: What is the number of starts for the player who lost fewer than 22 and has more than 4 tries?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"start\") FROM \"most_caps\" WHERE \"lost\"<22 AND \"tries\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"most_caps\" (\n \"player\" text,\n \"span\" text,\n \"start\" real,\n \"tries\" real,\n \"conv\" real,\n \"pens\" real,\n \"drop\" real,\n \"lost\" real,\n \"draw\" real\n);\n\nQuestion: What is the total losses for the player with fewer than 51 pens, 3 tries and 45 starts?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"lost\") FROM \"most_caps\" WHERE \"pens\"<51 AND \"tries\"=3 AND \"start\"=45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the average crowd size at glenferrie oval?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"crowd\") FROM \"round_12\" WHERE \"venue\"='glenferrie oval';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team's score when the away team is geelong?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the away team's score when geelong is the away side playing in front of a crowd of larger than 10,500, and the home team scoring 13.10 (88)?"
},
{
"role": "assistant",
"content": "SELECT \"away_team_score\" FROM \"round_12\" WHERE \"crowd\">'10,500' AND \"home_team_score\"='13.10 (88)' AND \"away_team\"='geelong';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"round_12\" (\n \"home_team\" text,\n \"home_team_score\" text,\n \"away_team\" text,\n \"away_team_score\" text,\n \"venue\" text,\n \"crowd\" real,\n \"date\" text\n);\n\nQuestion: What is the largest crowd when melbourne plays at home?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"crowd\") FROM \"round_12\" WHERE \"home_team\"='melbourne';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"record_by_conference\" (\n \"conference\" text,\n \"num_of_bids\" real,\n \"record\" text,\n \"win_pct\" real,\n \"round_of_32\" real,\n \"sweet_sixteen\" text,\n \"elite_eight\" text,\n \"final_four\" text,\n \"championship_game\" text\n);\n\nQuestion: What was the championship game for the Southwest conference?"
},
{
"role": "assistant",
"content": "SELECT \"championship_game\" FROM \"record_by_conference\" WHERE \"conference\"='southwest';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager\" text,\n \"captain\" text,\n \"kit_maker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Which manager has Sol Campbell as captain?"
},
{
"role": "assistant",
"content": "SELECT \"manager\" FROM \"personnel_and_kits\" WHERE \"captain\"='sol campbell';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager\" text,\n \"captain\" text,\n \"kit_maker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: What team does Carlsberg sponsor?"
},
{
"role": "assistant",
"content": "SELECT \"team\" FROM \"personnel_and_kits\" WHERE \"shirt_sponsor\"='carlsberg';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager\" text,\n \"captain\" text,\n \"kit_maker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Who sponsors Middlesbrough?"
},
{
"role": "assistant",
"content": "SELECT \"shirt_sponsor\" FROM \"personnel_and_kits\" WHERE \"team\"='middlesbrough';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"personnel_and_kits\" (\n \"team\" text,\n \"manager\" text,\n \"captain\" text,\n \"kit_maker\" text,\n \"shirt_sponsor\" text\n);\n\nQuestion: Which sponsor has Mark Hughes as manager?"
},
{
"role": "assistant",
"content": "SELECT \"shirt_sponsor\" FROM \"personnel_and_kits\" WHERE \"manager\"='mark hughes';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.