dreamerdeo's picture
Upload folder using huggingface_hub
1faca1c
[
{
"db_id": "baseball_1",
"query": "SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T1.name_full",
",",
"T1.college_id",
"FROM",
"college",
"AS",
"T1",
"JOIN",
"player_college",
"AS",
"T2",
"ON",
"T1.college_id",
"=",
"T2.college_id",
"GROUP",
"BY",
"T1.college_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_full",
",",
"t1",
".",
"college_id",
"from",
"college",
"as",
"t1",
"join",
"player_college",
"as",
"t2",
"on",
"t1",
".",
"college_id",
"=",
"t2",
".",
"college_id",
"group",
"by",
"t1",
".",
"college_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "what is the full name and id of the college with the largest number of baseball players?",
"question_toks": [
"what",
"is",
"the",
"full",
"name",
"and",
"id",
"of",
"the",
"college",
"with",
"the",
"largest",
"number",
"of",
"baseball",
"players",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
277,
false
],
null
],
[
0,
101,
false
],
null
]
],
"table_units": [
[
"table_unit",
21
],
[
"table_unit",
8
]
]
},
"groupBy": [
[
0,
277,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
278,
false
],
null
]
],
[
0,
[
0,
[
0,
277,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name_full , T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id = T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T1.name_full",
",",
"T1.college_id",
"FROM",
"college",
"AS",
"T1",
"JOIN",
"player_college",
"AS",
"T2",
"ON",
"T1.college_id",
"=",
"T2.college_id",
"GROUP",
"BY",
"T1.college_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_full",
",",
"t1",
".",
"college_id",
"from",
"college",
"as",
"t1",
"join",
"player_college",
"as",
"t2",
"on",
"t1",
".",
"college_id",
"=",
"t2",
".",
"college_id",
"group",
"by",
"t1",
".",
"college_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Find the full name and id of the college that has the most baseball players.",
"question_toks": [
"Find",
"the",
"full",
"name",
"and",
"id",
"of",
"the",
"college",
"that",
"has",
"the",
"most",
"baseball",
"players",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
277,
false
],
null
],
[
0,
101,
false
],
null
]
],
"table_units": [
[
"table_unit",
21
],
[
"table_unit",
8
]
]
},
"groupBy": [
[
0,
277,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
278,
false
],
null
]
],
[
0,
[
0,
[
0,
277,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'",
"query_toks": [
"SELECT",
"avg",
"(",
"T1.salary",
")",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'"
],
"query_toks_no_value": [
"select",
"avg",
"(",
"t1",
".",
"salary",
")",
"from",
"salary",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value"
],
"question": "What is average salary of the players in the team named 'Boston Red Stockings' ?",
"question_toks": [
"What",
"is",
"average",
"salary",
"of",
"the",
"players",
"in",
"the",
"team",
"named",
"'Boston",
"Red",
"Stockings",
"'",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
273,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
5,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT avg(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings'",
"query_toks": [
"SELECT",
"avg",
"(",
"T1.salary",
")",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'"
],
"query_toks_no_value": [
"select",
"avg",
"(",
"t1",
".",
"salary",
")",
"from",
"salary",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value"
],
"question": "Compute the average salary of the players in the team called 'Boston Red Stockings'.",
"question_toks": [
"Compute",
"the",
"average",
"salary",
"of",
"the",
"players",
"in",
"the",
"team",
"called",
"'Boston",
"Red",
"Stockings",
"'",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
273,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
5,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT name_first , name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998",
"query_toks": [
"SELECT",
"name_first",
",",
"name_last",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"all_star",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"WHERE",
"YEAR",
"=",
"1998"
],
"query_toks_no_value": [
"select",
"name_first",
",",
"name_last",
"from",
"player",
"as",
"t1",
"join",
"all_star",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"where",
"year",
"=",
"value"
],
"question": "What are first and last names of players participating in all star game in 1998?",
"question_toks": [
"What",
"are",
"first",
"and",
"last",
"names",
"of",
"players",
"participating",
"in",
"all",
"star",
"game",
"in",
"1998",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
1,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
0
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
2,
false
],
null
],
1998.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT name_first , name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id WHERE YEAR = 1998",
"query_toks": [
"SELECT",
"name_first",
",",
"name_last",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"all_star",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"WHERE",
"YEAR",
"=",
"1998"
],
"query_toks_no_value": [
"select",
"name_first",
",",
"name_last",
"from",
"player",
"as",
"t1",
"join",
"all_star",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"where",
"year",
"=",
"value"
],
"question": "List the first and last name for players who participated in all star game in 1998.",
"question_toks": [
"List",
"the",
"first",
"and",
"last",
"name",
"for",
"players",
"who",
"participated",
"in",
"all",
"star",
"game",
"in",
"1998",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
1,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
0
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
2,
false
],
null
],
1998.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name_first , T1.name_last , T1.player_id , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T1.name_first",
",",
"T1.name_last",
",",
"T1.player_id",
",",
"count",
"(",
"*",
")",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"all_star",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"GROUP",
"BY",
"T1.player_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
",",
"t1",
".",
"player_id",
",",
"count",
"(",
"*",
")",
"from",
"player",
"as",
"t1",
"join",
"all_star",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"group",
"by",
"t1",
".",
"player_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "What are the first name, last name and id of the player with the most all star game experiences? Also list the count.",
"question_toks": [
"What",
"are",
"the",
"first",
"name",
",",
"last",
"name",
"and",
"id",
"of",
"the",
"player",
"with",
"the",
"most",
"all",
"star",
"game",
"experiences",
"?",
"Also",
"list",
"the",
"count",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
1,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
0
]
]
},
"groupBy": [
[
0,
182,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
],
[
0,
[
0,
[
0,
182,
false
],
null
]
],
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name_first , T1.name_last , T1.player_id , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T1.name_first",
",",
"T1.name_last",
",",
"T1.player_id",
",",
"count",
"(",
"*",
")",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"all_star",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"GROUP",
"BY",
"T1.player_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
",",
"t1",
".",
"player_id",
",",
"count",
"(",
"*",
")",
"from",
"player",
"as",
"t1",
"join",
"all_star",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"group",
"by",
"t1",
".",
"player_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Which player has the most all star game experiences? Give me the first name, last name and id of the player, as well as the number of times the player participated in all star game.",
"question_toks": [
"Which",
"player",
"has",
"the",
"most",
"all",
"star",
"game",
"experiences",
"?",
"Give",
"me",
"the",
"first",
"name",
",",
"last",
"name",
"and",
"id",
"of",
"the",
"player",
",",
"as",
"well",
"as",
"the",
"number",
"of",
"times",
"the",
"player",
"participated",
"in",
"all",
"star",
"game",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
1,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
0
]
]
},
"groupBy": [
[
0,
182,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
],
[
0,
[
0,
[
0,
182,
false
],
null
]
],
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid;",
"query_toks": [
"SELECT",
"yearid",
",",
"count",
"(",
"*",
")",
"FROM",
"hall_of_fame",
"GROUP",
"BY",
"yearid",
";"
],
"query_toks_no_value": [
"select",
"yearid",
",",
"count",
"(",
"*",
")",
"from",
"hall_of_fame",
"group",
"by",
"yearid"
],
"question": "How many players enter hall of fame each year?",
"question_toks": [
"How",
"many",
"players",
"enter",
"hall",
"of",
"fame",
"each",
"year",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
12
]
]
},
"groupBy": [
[
0,
145,
false
]
],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
145,
false
],
null
]
],
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid;",
"query_toks": [
"SELECT",
"yearid",
",",
"count",
"(",
"*",
")",
"FROM",
"hall_of_fame",
"GROUP",
"BY",
"yearid",
";"
],
"query_toks_no_value": [
"select",
"yearid",
",",
"count",
"(",
"*",
")",
"from",
"hall_of_fame",
"group",
"by",
"yearid"
],
"question": "Count the number of players who enter hall of fame for each year.",
"question_toks": [
"Count",
"the",
"number",
"of",
"players",
"who",
"enter",
"hall",
"of",
"fame",
"for",
"each",
"year",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
12
]
]
},
"groupBy": [
[
0,
145,
false
]
],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
145,
false
],
null
]
],
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT YEAR , avg(attendance) FROM home_game GROUP BY YEAR;",
"query_toks": [
"SELECT",
"YEAR",
",",
"avg",
"(",
"attendance",
")",
"FROM",
"home_game",
"GROUP",
"BY",
"YEAR",
";"
],
"query_toks_no_value": [
"select",
"year",
",",
"avg",
"(",
"attendance",
")",
"from",
"home_game",
"group",
"by",
"year"
],
"question": "What is the average number of attendance at home games for each year?",
"question_toks": [
"What",
"is",
"the",
"average",
"number",
"of",
"attendance",
"at",
"home",
"games",
"for",
"each",
"year",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
13
]
]
},
"groupBy": [
[
0,
153,
false
]
],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
153,
false
],
null
]
],
[
5,
[
0,
[
0,
161,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT YEAR , avg(attendance) FROM home_game GROUP BY YEAR;",
"query_toks": [
"SELECT",
"YEAR",
",",
"avg",
"(",
"attendance",
")",
"FROM",
"home_game",
"GROUP",
"BY",
"YEAR",
";"
],
"query_toks_no_value": [
"select",
"year",
",",
"avg",
"(",
"attendance",
")",
"from",
"home_game",
"group",
"by",
"year"
],
"question": "For each year, return the year and the average number of attendance at home games.",
"question_toks": [
"For",
"each",
"year",
",",
"return",
"the",
"year",
"and",
"the",
"average",
"number",
"of",
"attendance",
"at",
"home",
"games",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
13
]
]
},
"groupBy": [
[
0,
153,
false
]
],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
153,
false
],
null
]
],
[
5,
[
0,
[
0,
161,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.team_id , T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T2.team_id",
",",
"T2.rank",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id",
"WHERE",
"T1.year",
"=",
"2014",
"GROUP",
"BY",
"T1.team_id",
"ORDER",
"BY",
"avg",
"(",
"T1.attendance",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t2",
".",
"team_id",
",",
"t2",
".",
"rank",
"from",
"home_game",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id",
"where",
"t1",
".",
"year",
"=",
"value",
"group",
"by",
"t1",
".",
"team_id",
"order",
"by",
"avg",
"(",
"t1",
".",
"attendance",
")",
"desc",
"limit",
"value"
],
"question": "In 2014, what are the id and rank of the team that has the largest average number of attendance?",
"question_toks": [
"In",
"2014",
",",
"what",
"are",
"the",
"id",
"and",
"rank",
"of",
"the",
"team",
"that",
"has",
"the",
"largest",
"average",
"number",
"of",
"attendance",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
155,
false
],
null
],
[
0,
293,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
23
]
]
},
"groupBy": [
[
0,
155,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
5,
161,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
293,
false
],
null
]
],
[
0,
[
0,
[
0,
296,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
2014.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.team_id , T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id WHERE T1.year = 2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T2.team_id",
",",
"T2.rank",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id",
"WHERE",
"T1.year",
"=",
"2014",
"GROUP",
"BY",
"T1.team_id",
"ORDER",
"BY",
"avg",
"(",
"T1.attendance",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t2",
".",
"team_id",
",",
"t2",
".",
"rank",
"from",
"home_game",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id",
"where",
"t1",
".",
"year",
"=",
"value",
"group",
"by",
"t1",
".",
"team_id",
"order",
"by",
"avg",
"(",
"t1",
".",
"attendance",
")",
"desc",
"limit",
"value"
],
"question": "Find the id and rank of the team that has the highest average attendance rate in 2014.",
"question_toks": [
"Find",
"the",
"id",
"and",
"rank",
"of",
"the",
"team",
"that",
"has",
"the",
"highest",
"average",
"attendance",
"rate",
"in",
"2014",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
155,
false
],
null
],
[
0,
293,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
23
]
]
},
"groupBy": [
[
0,
155,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
5,
161,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
293,
false
],
null
]
],
[
0,
[
0,
[
0,
296,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
2014.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T1.name_first",
",",
"T1.name_last",
",",
"T2.player_id",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"manager_award",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"GROUP",
"BY",
"T2.player_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
",",
"t2",
".",
"player_id",
"from",
"player",
"as",
"t1",
"join",
"manager_award",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"group",
"by",
"t2",
".",
"player_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "What are the manager's first name, last name and id who won the most manager award?",
"question_toks": [
"What",
"are",
"the",
"manager",
"'s",
"first",
"name",
",",
"last",
"name",
"and",
"id",
"who",
"won",
"the",
"most",
"manager",
"award",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
30,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
2
]
]
},
"groupBy": [
[
0,
30,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
],
[
0,
[
0,
[
0,
30,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T1.name_first",
",",
"T1.name_last",
",",
"T2.player_id",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"manager_award",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"GROUP",
"BY",
"T2.player_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
",",
"t2",
".",
"player_id",
"from",
"player",
"as",
"t1",
"join",
"manager_award",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"group",
"by",
"t2",
".",
"player_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Which manager won the most manager award? Give me the manager's first name, last name and id.",
"question_toks": [
"Which",
"manager",
"won",
"the",
"most",
"manager",
"award",
"?",
"Give",
"me",
"the",
"manager",
"'s",
"first",
"name",
",",
"last",
"name",
"and",
"id",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
30,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
2
]
]
},
"groupBy": [
[
0,
30,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
],
[
0,
[
0,
[
0,
30,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM park WHERE state = 'NY';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"park",
"WHERE",
"state",
"=",
"'NY",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"park",
"where",
"state",
"=",
"value"
],
"question": "How many parks are there in the state of NY?",
"question_toks": [
"How",
"many",
"parks",
"are",
"there",
"in",
"the",
"state",
"of",
"NY",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
210,
false
],
null
],
"\"NY\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM park WHERE state = 'NY';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"park",
"WHERE",
"state",
"=",
"'NY",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"park",
"where",
"state",
"=",
"value"
],
"question": "Show me the number of parks the state of NY has.",
"question_toks": [
"Show",
"me",
"the",
"number",
"of",
"parks",
"the",
"state",
"of",
"NY",
"has",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
210,
false
],
null
],
"\"NY\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;",
"query_toks": [
"SELECT",
"T1.name_first",
",",
"T1.name_last",
",",
"T1.player_id",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"player_award",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"GROUP",
"BY",
"T1.player_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"3",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
",",
"t1",
".",
"player_id",
"from",
"player",
"as",
"t1",
"join",
"player_award",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"group",
"by",
"t1",
".",
"player_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Which 3 players won the most player awards? List their full name and id.",
"question_toks": [
"Which",
"3",
"players",
"won",
"the",
"most",
"player",
"awards",
"?",
"List",
"their",
"full",
"name",
"and",
"id",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
36,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
3
]
]
},
"groupBy": [
[
0,
182,
false
]
],
"having": [],
"intersect": null,
"limit": 3,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
],
[
0,
[
0,
[
0,
182,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name_first , T1.name_last , T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;",
"query_toks": [
"SELECT",
"T1.name_first",
",",
"T1.name_last",
",",
"T1.player_id",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"player_award",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"GROUP",
"BY",
"T1.player_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"3",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
",",
"t1",
".",
"player_id",
"from",
"player",
"as",
"t1",
"join",
"player_award",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"group",
"by",
"t1",
".",
"player_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Find the first name, last name and id for the top three players won the most player awards.",
"question_toks": [
"Find",
"the",
"first",
"name",
",",
"last",
"name",
"and",
"id",
"for",
"the",
"top",
"three",
"players",
"won",
"the",
"most",
"player",
"awards",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
36,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
3
]
]
},
"groupBy": [
[
0,
182,
false
]
],
"having": [],
"intersect": null,
"limit": 3,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
],
[
0,
[
0,
[
0,
182,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) ASC LIMIT 3;",
"query_toks": [
"SELECT",
"birth_country",
"FROM",
"player",
"GROUP",
"BY",
"birth_country",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"3",
";"
],
"query_toks_no_value": [
"select",
"birth_country",
"from",
"player",
"group",
"by",
"birth_country",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
],
"question": "List three countries which are the origins of the least players.",
"question_toks": [
"List",
"three",
"countries",
"which",
"are",
"the",
"origins",
"of",
"the",
"least",
"players",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
]
]
},
"groupBy": [
[
0,
186,
false
]
],
"having": [],
"intersect": null,
"limit": 3,
"orderBy": [
"asc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
186,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT birth_country FROM player GROUP BY birth_country ORDER BY count(*) ASC LIMIT 3;",
"query_toks": [
"SELECT",
"birth_country",
"FROM",
"player",
"GROUP",
"BY",
"birth_country",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"3",
";"
],
"query_toks_no_value": [
"select",
"birth_country",
"from",
"player",
"group",
"by",
"birth_country",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
],
"question": "What are the three countries that the least players are from?",
"question_toks": [
"What",
"are",
"the",
"three",
"countries",
"that",
"the",
"least",
"players",
"are",
"from",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
]
]
},
"groupBy": [
[
0,
186,
false
]
],
"having": [],
"intersect": null,
"limit": 3,
"orderBy": [
"asc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
186,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT name_first , name_last FROM player WHERE death_year = '';",
"query_toks": [
"SELECT",
"name_first",
",",
"name_last",
"FROM",
"player",
"WHERE",
"death_year",
"=",
"''",
";"
],
"query_toks_no_value": [
"select",
"name_first",
",",
"name_last",
"from",
"player",
"where",
"death_year",
"=",
"value"
],
"question": "Find all the players' first name and last name who have empty death record.",
"question_toks": [
"Find",
"all",
"the",
"players",
"'",
"first",
"name",
"and",
"last",
"name",
"who",
"have",
"empty",
"death",
"record",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
189,
false
],
null
],
"\"\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT name_first , name_last FROM player WHERE death_year = '';",
"query_toks": [
"SELECT",
"name_first",
",",
"name_last",
"FROM",
"player",
"WHERE",
"death_year",
"=",
"''",
";"
],
"query_toks_no_value": [
"select",
"name_first",
",",
"name_last",
"from",
"player",
"where",
"death_year",
"=",
"value"
],
"question": "What are the first name and last name of the players whose death record is empty?",
"question_toks": [
"What",
"are",
"the",
"first",
"name",
"and",
"last",
"name",
"of",
"the",
"players",
"whose",
"death",
"record",
"is",
"empty",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
189,
false
],
null
],
"\"\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"player",
"WHERE",
"birth_country",
"=",
"'USA",
"'",
"AND",
"bats",
"=",
"'R",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"player",
"where",
"birth_country",
"=",
"value",
"and",
"bats",
"=",
"value"
],
"question": "How many players born in USA are right-handed batters? That is, have the batter value 'R'.",
"question_toks": [
"How",
"many",
"players",
"born",
"in",
"USA",
"are",
"right-handed",
"batters",
"?",
"That",
"is",
",",
"have",
"the",
"batter",
"value",
"'R",
"'",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
186,
false
],
null
],
"\"USA\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
200,
false
],
null
],
"\"R\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats = 'R';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"player",
"WHERE",
"birth_country",
"=",
"'USA",
"'",
"AND",
"bats",
"=",
"'R",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"player",
"where",
"birth_country",
"=",
"value",
"and",
"bats",
"=",
"value"
],
"question": "Count the number of players who were born in USA and have bats information 'R'.",
"question_toks": [
"Count",
"the",
"number",
"of",
"players",
"who",
"were",
"born",
"in",
"USA",
"and",
"have",
"bats",
"information",
"'R",
"'",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
186,
false
],
null
],
"\"USA\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
200,
false
],
null
],
"\"R\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';",
"query_toks": [
"SELECT",
"avg",
"(",
"T1.height",
")",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"player_college",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"JOIN",
"college",
"AS",
"T3",
"ON",
"T3.college_id",
"=",
"T2.college_id",
"WHERE",
"T3.name_full",
"=",
"'Yale",
"University",
"'",
";"
],
"query_toks_no_value": [
"select",
"avg",
"(",
"t1",
".",
"height",
")",
"from",
"player",
"as",
"t1",
"join",
"player_college",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"join",
"college",
"as",
"t3",
"on",
"t3",
".",
"college_id",
"=",
"t2",
".",
"college_id",
"where",
"t3",
".",
"name_full",
"=",
"value"
],
"question": "What is the average height of the players from the college named 'Yale University'?",
"question_toks": [
"What",
"is",
"the",
"average",
"height",
"of",
"the",
"players",
"from",
"the",
"college",
"named",
"'Yale",
"University",
"'",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
100,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
277,
false
],
null
],
[
0,
101,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
8
],
[
"table_unit",
21
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
5,
[
0,
[
0,
199,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
278,
false
],
null
],
"\"Yale University\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University';",
"query_toks": [
"SELECT",
"avg",
"(",
"T1.height",
")",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"player_college",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"JOIN",
"college",
"AS",
"T3",
"ON",
"T3.college_id",
"=",
"T2.college_id",
"WHERE",
"T3.name_full",
"=",
"'Yale",
"University",
"'",
";"
],
"query_toks_no_value": [
"select",
"avg",
"(",
"t1",
".",
"height",
")",
"from",
"player",
"as",
"t1",
"join",
"player_college",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"join",
"college",
"as",
"t3",
"on",
"t3",
".",
"college_id",
"=",
"t2",
".",
"college_id",
"where",
"t3",
".",
"name_full",
"=",
"value"
],
"question": "Find the average height of the players who belong to the college called 'Yale University'.",
"question_toks": [
"Find",
"the",
"average",
"height",
"of",
"the",
"players",
"who",
"belong",
"to",
"the",
"college",
"called",
"'Yale",
"University",
"'",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
182,
false
],
null
],
[
0,
100,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
277,
false
],
null
],
[
0,
101,
false
],
null
]
],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
8
],
[
"table_unit",
21
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
5,
[
0,
[
0,
199,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
278,
false
],
null
],
"\"Yale University\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;",
"query_toks": [
"SELECT",
"T1.name",
",",
"T1.team_id",
",",
"max",
"(",
"T2.salary",
")",
"FROM",
"team",
"AS",
"T1",
"JOIN",
"salary",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id",
"GROUP",
"BY",
"T1.team_id",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name",
",",
"t1",
".",
"team_id",
",",
"max",
"(",
"t2",
".",
"salary",
")",
"from",
"team",
"as",
"t1",
"join",
"salary",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id",
"group",
"by",
"t1",
".",
"team_id"
],
"question": "What is the highest salary among each team? List the team name, id and maximum salary.",
"question_toks": [
"What",
"is",
"the",
"highest",
"salary",
"among",
"each",
"team",
"?",
"List",
"the",
"team",
"name",
",",
"id",
"and",
"maximum",
"salary",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
293,
false
],
null
],
[
0,
273,
false
],
null
]
],
"table_units": [
[
"table_unit",
23
],
[
"table_unit",
20
]
]
},
"groupBy": [
[
0,
293,
false
]
],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
331,
false
],
null
]
],
[
0,
[
0,
[
0,
293,
false
],
null
]
],
[
1,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name , T1.team_id , max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id;",
"query_toks": [
"SELECT",
"T1.name",
",",
"T1.team_id",
",",
"max",
"(",
"T2.salary",
")",
"FROM",
"team",
"AS",
"T1",
"JOIN",
"salary",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id",
"GROUP",
"BY",
"T1.team_id",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name",
",",
"t1",
".",
"team_id",
",",
"max",
"(",
"t2",
".",
"salary",
")",
"from",
"team",
"as",
"t1",
"join",
"salary",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id",
"group",
"by",
"t1",
".",
"team_id"
],
"question": "For each team, return the team name, id and the maximum salary among the team.",
"question_toks": [
"For",
"each",
"team",
",",
"return",
"the",
"team",
"name",
",",
"id",
"and",
"the",
"maximum",
"salary",
"among",
"the",
"team",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
293,
false
],
null
],
[
0,
273,
false
],
null
]
],
"table_units": [
[
"table_unit",
23
],
[
"table_unit",
20
]
]
},
"groupBy": [
[
0,
293,
false
]
],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
331,
false
],
null
]
],
[
0,
[
0,
[
0,
293,
false
],
null
]
],
[
1,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary) ASC LIMIT 1;",
"query_toks": [
"SELECT",
"T1.name",
",",
"T1.team_id",
"FROM",
"team",
"AS",
"T1",
"JOIN",
"salary",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id",
"GROUP",
"BY",
"T1.team_id",
"ORDER",
"BY",
"avg",
"(",
"T2.salary",
")",
"ASC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name",
",",
"t1",
".",
"team_id",
"from",
"team",
"as",
"t1",
"join",
"salary",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id",
"group",
"by",
"t1",
".",
"team_id",
"order",
"by",
"avg",
"(",
"t2",
".",
"salary",
")",
"asc",
"limit",
"value"
],
"question": "What are the name and id of the team offering the lowest average salary?",
"question_toks": [
"What",
"are",
"the",
"name",
"and",
"id",
"of",
"the",
"team",
"offering",
"the",
"lowest",
"average",
"salary",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
293,
false
],
null
],
[
0,
273,
false
],
null
]
],
"table_units": [
[
"table_unit",
23
],
[
"table_unit",
20
]
]
},
"groupBy": [
[
0,
293,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"asc",
[
[
0,
[
5,
276,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
331,
false
],
null
]
],
[
0,
[
0,
[
0,
293,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name , T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY avg(T2.salary) ASC LIMIT 1;",
"query_toks": [
"SELECT",
"T1.name",
",",
"T1.team_id",
"FROM",
"team",
"AS",
"T1",
"JOIN",
"salary",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id",
"GROUP",
"BY",
"T1.team_id",
"ORDER",
"BY",
"avg",
"(",
"T2.salary",
")",
"ASC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name",
",",
"t1",
".",
"team_id",
"from",
"team",
"as",
"t1",
"join",
"salary",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id",
"group",
"by",
"t1",
".",
"team_id",
"order",
"by",
"avg",
"(",
"t2",
".",
"salary",
")",
"asc",
"limit",
"value"
],
"question": "Which team offers the lowest average salary? Give me the name and id of the team.",
"question_toks": [
"Which",
"team",
"offers",
"the",
"lowest",
"average",
"salary",
"?",
"Give",
"me",
"the",
"name",
"and",
"id",
"of",
"the",
"team",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
293,
false
],
null
],
[
0,
273,
false
],
null
]
],
"table_units": [
[
"table_unit",
23
],
[
"table_unit",
20
]
]
},
"groupBy": [
[
0,
293,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"asc",
[
[
0,
[
5,
276,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
331,
false
],
null
]
],
[
0,
[
0,
[
0,
293,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961",
"query_toks": [
"SELECT",
"T1.name_first",
",",
"T1.name_last",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"player_award",
"AS",
"T2",
"WHERE",
"T2.year",
"=",
"1960",
"INTERSECT",
"SELECT",
"T1.name_first",
",",
"T1.name_last",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"player_award",
"AS",
"T2",
"WHERE",
"T2.year",
"=",
"1961"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
"from",
"player",
"as",
"t1",
"join",
"player_award",
"as",
"t2",
"where",
"t2",
".",
"year",
"=",
"value",
"intersect",
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
"from",
"player",
"as",
"t1",
"join",
"player_award",
"as",
"t2",
"where",
"t2",
".",
"year",
"=",
"value"
],
"question": "Find the players' first name and last name who won award both in 1960 and in 1961.",
"question_toks": [
"Find",
"the",
"players",
"'",
"first",
"name",
"and",
"last",
"name",
"who",
"won",
"award",
"both",
"in",
"1960",
"and",
"in",
"1961",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
3
]
]
},
"groupBy": [],
"having": [],
"intersect": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
3
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
38,
false
],
null
],
1961.0,
null
]
]
},
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
38,
false
],
null
],
1960.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1960 INTERSECT SELECT T1.name_first , T1.name_last FROM player AS T1 JOIN player_award AS T2 WHERE T2.year = 1961",
"query_toks": [
"SELECT",
"T1.name_first",
",",
"T1.name_last",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"player_award",
"AS",
"T2",
"WHERE",
"T2.year",
"=",
"1960",
"INTERSECT",
"SELECT",
"T1.name_first",
",",
"T1.name_last",
"FROM",
"player",
"AS",
"T1",
"JOIN",
"player_award",
"AS",
"T2",
"WHERE",
"T2.year",
"=",
"1961"
],
"query_toks_no_value": [
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
"from",
"player",
"as",
"t1",
"join",
"player_award",
"as",
"t2",
"where",
"t2",
".",
"year",
"=",
"value",
"intersect",
"select",
"t1",
".",
"name_first",
",",
"t1",
".",
"name_last",
"from",
"player",
"as",
"t1",
"join",
"player_award",
"as",
"t2",
"where",
"t2",
".",
"year",
"=",
"value"
],
"question": "Which players won awards in both 1960 and 1961? Return their first names and last names.",
"question_toks": [
"Which",
"players",
"won",
"awards",
"in",
"both",
"1960",
"and",
"1961",
"?",
"Return",
"their",
"first",
"names",
"and",
"last",
"names",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
3
]
]
},
"groupBy": [],
"having": [],
"intersect": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
],
[
"table_unit",
3
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
38,
false
],
null
],
1961.0,
null
]
]
},
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
38,
false
],
null
],
1960.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75",
"query_toks": [
"SELECT",
"name_first",
",",
"name_last",
"FROM",
"player",
"WHERE",
"weight",
">",
"220",
"OR",
"height",
"<",
"75"
],
"query_toks_no_value": [
"select",
"name_first",
",",
"name_last",
"from",
"player",
"where",
"weight",
">",
"value",
"or",
"height",
"<",
"value"
],
"question": "List players' first name and last name who have weight greater than 220 or height shorter than 75.",
"question_toks": [
"List",
"players",
"'",
"first",
"name",
"and",
"last",
"name",
"who",
"have",
"weight",
"greater",
"than",
"220",
"or",
"height",
"shorter",
"than",
"75",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
3,
[
0,
[
0,
198,
false
],
null
],
220.0,
null
],
"or",
[
false,
4,
[
0,
[
0,
199,
false
],
null
],
75.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT name_first , name_last FROM player WHERE weight > 220 OR height < 75",
"query_toks": [
"SELECT",
"name_first",
",",
"name_last",
"FROM",
"player",
"WHERE",
"weight",
">",
"220",
"OR",
"height",
"<",
"75"
],
"query_toks_no_value": [
"select",
"name_first",
",",
"name_last",
"from",
"player",
"where",
"weight",
">",
"value",
"or",
"height",
"<",
"value"
],
"question": "What are the first name and last name of the players who have weight above 220 or height below 75?",
"question_toks": [
"What",
"are",
"the",
"first",
"name",
"and",
"last",
"name",
"of",
"the",
"players",
"who",
"have",
"weight",
"above",
"220",
"or",
"height",
"below",
"75",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
16
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
3,
[
0,
[
0,
198,
false
],
null
],
220.0,
null
],
"or",
[
false,
4,
[
0,
[
0,
199,
false
],
null
],
75.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';",
"query_toks": [
"SELECT",
"max",
"(",
"T1.wins",
")",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_winner",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
";"
],
"query_toks_no_value": [
"select",
"max",
"(",
"t1",
".",
"wins",
")",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_winner",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value"
],
"question": "List the maximum scores of the team Boston Red Stockings when the team won in postseason?",
"question_toks": [
"List",
"the",
"maximum",
"scores",
"of",
"the",
"team",
"Boston",
"Red",
"Stockings",
"when",
"the",
"team",
"won",
"in",
"postseason",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
284,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
1,
[
0,
[
0,
288,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT max(T1.wins) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings';",
"query_toks": [
"SELECT",
"max",
"(",
"T1.wins",
")",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_winner",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
";"
],
"query_toks_no_value": [
"select",
"max",
"(",
"t1",
".",
"wins",
")",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_winner",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value"
],
"question": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?",
"question_toks": [
"What",
"are",
"the",
"maximum",
"scores",
"the",
"team",
"Boston",
"Red",
"Stockings",
"got",
"when",
"the",
"team",
"won",
"in",
"postseason",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
284,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
1,
[
0,
[
0,
288,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_loser",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"=",
"2009",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_loser",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"=",
"value"
],
"question": "How many times did Boston Red Stockings lose in 2009 postseason?",
"question_toks": [
"How",
"many",
"times",
"did",
"Boston",
"Red",
"Stockings",
"lose",
"in",
"2009",
"postseason",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
286,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
282,
false
],
null
],
2009.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2009;",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_loser",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"=",
"2009",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_loser",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"=",
"value"
],
"question": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.",
"question_toks": [
"Count",
"the",
"number",
"of",
"times",
"the",
"team",
"``",
"Boston",
"Red",
"Stockings",
"''",
"lost",
"in",
"2009",
"postseason",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
286,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
282,
false
],
null
],
2009.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T2.name",
",",
"T1.team_id_winner",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_winner",
"=",
"T2.team_id_br",
"WHERE",
"T1.year",
"=",
"2008",
"GROUP",
"BY",
"T1.team_id_winner",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t2",
".",
"name",
",",
"t1",
".",
"team_id_winner",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_winner",
"=",
"t2",
".",
"team_id_br",
"where",
"t1",
".",
"year",
"=",
"value",
"group",
"by",
"t1",
".",
"team_id_winner",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "What are the name and id of the team with the most victories in 2008 postseason?",
"question_toks": [
"What",
"are",
"the",
"name",
"and",
"id",
"of",
"the",
"team",
"with",
"the",
"most",
"victories",
"in",
"2008",
"postseason",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
284,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [
[
0,
284,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
331,
false
],
null
]
],
[
0,
[
0,
[
0,
284,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
282,
false
],
null
],
2008.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.name , T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T1.year = 2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T2.name",
",",
"T1.team_id_winner",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_winner",
"=",
"T2.team_id_br",
"WHERE",
"T1.year",
"=",
"2008",
"GROUP",
"BY",
"T1.team_id_winner",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t2",
".",
"name",
",",
"t1",
".",
"team_id_winner",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_winner",
"=",
"t2",
".",
"team_id_br",
"where",
"t1",
".",
"year",
"=",
"value",
"group",
"by",
"t1",
".",
"team_id_winner",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Find the name and id of the team that won the most times in 2008 postseason.",
"question_toks": [
"Find",
"the",
"name",
"and",
"id",
"of",
"the",
"team",
"that",
"won",
"the",
"most",
"times",
"in",
"2008",
"postseason",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
284,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [
[
0,
284,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
331,
false
],
null
]
],
[
0,
[
0,
[
0,
284,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
282,
false
],
null
],
2008.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
",",
"T1.year",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_winner",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"GROUP",
"BY",
"T1.year"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
",",
"t1",
".",
"year",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_winner",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"group",
"by",
"t1",
".",
"year"
],
"question": "What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?",
"question_toks": [
"What",
"is",
"the",
"number",
"of",
"wins",
"the",
"team",
"Boston",
"Red",
"Stockings",
"got",
"in",
"the",
"postseasons",
"each",
"year",
"in",
"history",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
284,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [
[
0,
282,
false
]
],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
],
[
0,
[
0,
[
0,
282,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) , T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
",",
"T1.year",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_winner",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"GROUP",
"BY",
"T1.year"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
",",
"t1",
".",
"year",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_winner",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"group",
"by",
"t1",
".",
"year"
],
"question": "For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.",
"question_toks": [
"For",
"each",
"year",
",",
"return",
"the",
"year",
"and",
"the",
"number",
"of",
"times",
"the",
"team",
"Boston",
"Red",
"Stockings",
"won",
"in",
"the",
"postseasons",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
284,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [
[
0,
282,
false
]
],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
],
[
0,
[
0,
[
0,
282,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM ( SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' );",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"(",
"SELECT",
"*",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_winner",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"UNION",
"SELECT",
"*",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_loser",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
")",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"(",
"select",
"*",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_winner",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"union",
"select",
"*",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_loser",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
")"
],
"question": "What is the total number of postseason games that team Boston Red Stockings participated in?",
"question_toks": [
"What",
"is",
"the",
"total",
"number",
"of",
"postseason",
"games",
"that",
"team",
"Boston",
"Red",
"Stockings",
"participated",
"in",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"sql",
{
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
284,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
286,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
},
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
}
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM ( SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' );",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"(",
"SELECT",
"*",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_winner",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"UNION",
"SELECT",
"*",
"FROM",
"postseason",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id_loser",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
")",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"(",
"select",
"*",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_winner",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"union",
"select",
"*",
"from",
"postseason",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id_loser",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
")"
],
"question": "How many times in total did the team Boston Red Stockings participate in postseason games?",
"question_toks": [
"How",
"many",
"times",
"in",
"total",
"did",
"the",
"team",
"Boston",
"Red",
"Stockings",
"participate",
"in",
"postseason",
"games",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"sql",
{
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
284,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
286,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
22
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
},
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
]
]
}
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"postseason",
"WHERE",
"YEAR",
"=",
"1885",
"AND",
"ties",
"=",
"1",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"postseason",
"where",
"year",
"=",
"value",
"and",
"ties",
"=",
"value"
],
"question": "How many games in 1885 postseason resulted in ties (that is, the value of \"ties\" is '1')?",
"question_toks": [
"How",
"many",
"games",
"in",
"1885",
"postseason",
"resulted",
"in",
"ties",
"(",
"that",
"is",
",",
"the",
"value",
"of",
"``",
"ties",
"''",
"is",
"'1",
"'",
")",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
22
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
282,
false
],
null
],
1885.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
290,
false
],
null
],
1.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM postseason WHERE YEAR = 1885 AND ties = 1;",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"postseason",
"WHERE",
"YEAR",
"=",
"1885",
"AND",
"ties",
"=",
"1",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"postseason",
"where",
"year",
"=",
"value",
"and",
"ties",
"=",
"value"
],
"question": "Find the number of tied games (the value of \"ties\" is '1') in 1885 postseason.",
"question_toks": [
"Find",
"the",
"number",
"of",
"tied",
"games",
"(",
"the",
"value",
"of",
"``",
"ties",
"''",
"is",
"'1",
"'",
")",
"in",
"1885",
"postseason",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
22
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
282,
false
],
null
],
1885.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
290,
false
],
null
],
1.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010",
"query_toks": [
"SELECT",
"sum",
"(",
"T1.salary",
")",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"=",
"2010"
],
"query_toks_no_value": [
"select",
"sum",
"(",
"t1",
".",
"salary",
")",
"from",
"salary",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"=",
"value"
],
"question": "What is the total salary paid by team Boston Red Stockings in 2010?",
"question_toks": [
"What",
"is",
"the",
"total",
"salary",
"paid",
"by",
"team",
"Boston",
"Red",
"Stockings",
"in",
"2010",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
273,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
4,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2010.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2010",
"query_toks": [
"SELECT",
"sum",
"(",
"T1.salary",
")",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"=",
"2010"
],
"query_toks_no_value": [
"select",
"sum",
"(",
"t1",
".",
"salary",
")",
"from",
"salary",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"=",
"value"
],
"question": "What is the total salary expenses of team Boston Red Stockings in 2010?",
"question_toks": [
"What",
"is",
"the",
"total",
"salary",
"expenses",
"of",
"team",
"Boston",
"Red",
"Stockings",
"in",
"2010",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
273,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
4,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2010.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"=",
"2000"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"salary",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"=",
"value"
],
"question": "How many players were in the team Boston Red Stockings in 2000?",
"question_toks": [
"How",
"many",
"players",
"were",
"in",
"the",
"team",
"Boston",
"Red",
"Stockings",
"in",
"2000",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
273,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2000.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"=",
"2000"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"salary",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"=",
"value"
],
"question": "How many players did Boston Red Stockings have in 2000?",
"question_toks": [
"How",
"many",
"players",
"did",
"Boston",
"Red",
"Stockings",
"have",
"in",
"2000",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
273,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2000.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3;",
"query_toks": [
"SELECT",
"salary",
"FROM",
"salary",
"WHERE",
"YEAR",
"=",
"2001",
"ORDER",
"BY",
"salary",
"DESC",
"LIMIT",
"3",
";"
],
"query_toks_no_value": [
"select",
"salary",
"from",
"salary",
"where",
"year",
"=",
"value",
"order",
"by",
"salary",
"desc",
"limit",
"value"
],
"question": "List the 3 highest salaries of the players in 2001?",
"question_toks": [
"List",
"the",
"3",
"highest",
"salaries",
"of",
"the",
"players",
"in",
"2001",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
20
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": 3,
"orderBy": [
"desc",
[
[
0,
[
0,
276,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2001.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT salary FROM salary WHERE YEAR = 2001 ORDER BY salary DESC LIMIT 3;",
"query_toks": [
"SELECT",
"salary",
"FROM",
"salary",
"WHERE",
"YEAR",
"=",
"2001",
"ORDER",
"BY",
"salary",
"DESC",
"LIMIT",
"3",
";"
],
"query_toks_no_value": [
"select",
"salary",
"from",
"salary",
"where",
"year",
"=",
"value",
"order",
"by",
"salary",
"desc",
"limit",
"value"
],
"question": "How much salary did the top 3 well-paid players get in 2001?",
"question_toks": [
"How",
"much",
"salary",
"did",
"the",
"top",
"3",
"well-paid",
"players",
"get",
"in",
"2001",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
20
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": 3,
"orderBy": [
"desc",
[
[
0,
[
0,
276,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2001.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001",
"query_toks": [
"SELECT",
"salary",
"FROM",
"salary",
"WHERE",
"YEAR",
"=",
"2010",
"UNION",
"SELECT",
"salary",
"FROM",
"salary",
"WHERE",
"YEAR",
"=",
"2001"
],
"query_toks_no_value": [
"select",
"salary",
"from",
"salary",
"where",
"year",
"=",
"value",
"union",
"select",
"salary",
"from",
"salary",
"where",
"year",
"=",
"value"
],
"question": "What were all the salary values of players in 2010 and 2001?",
"question_toks": [
"What",
"were",
"all",
"the",
"salary",
"values",
"of",
"players",
"in",
"2010",
"and",
"2001",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
20
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
20
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2001.0,
null
]
]
},
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2010.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT salary FROM salary WHERE YEAR = 2010 UNION SELECT salary FROM salary WHERE YEAR = 2001",
"query_toks": [
"SELECT",
"salary",
"FROM",
"salary",
"WHERE",
"YEAR",
"=",
"2010",
"UNION",
"SELECT",
"salary",
"FROM",
"salary",
"WHERE",
"YEAR",
"=",
"2001"
],
"query_toks_no_value": [
"select",
"salary",
"from",
"salary",
"where",
"year",
"=",
"value",
"union",
"select",
"salary",
"from",
"salary",
"where",
"year",
"=",
"value"
],
"question": "List all the salary values players received in 2010 and 2001.",
"question_toks": [
"List",
"all",
"the",
"salary",
"values",
"players",
"received",
"in",
"2010",
"and",
"2001",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
20
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
20
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2001.0,
null
]
]
},
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2010.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1;",
"query_toks": [
"SELECT",
"yearid",
"FROM",
"hall_of_fame",
"GROUP",
"BY",
"yearid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"yearid",
"from",
"hall_of_fame",
"group",
"by",
"yearid",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
],
"question": "In which year did the least people enter hall of fame?",
"question_toks": [
"In",
"which",
"year",
"did",
"the",
"least",
"people",
"enter",
"hall",
"of",
"fame",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
12
]
]
},
"groupBy": [
[
0,
145,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"asc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
145,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count(*) ASC LIMIT 1;",
"query_toks": [
"SELECT",
"yearid",
"FROM",
"hall_of_fame",
"GROUP",
"BY",
"yearid",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"yearid",
"from",
"hall_of_fame",
"group",
"by",
"yearid",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
],
"question": "Find the year in which the least people enter hall of fame.",
"question_toks": [
"Find",
"the",
"year",
"in",
"which",
"the",
"least",
"people",
"enter",
"hall",
"of",
"fame",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
12
]
]
},
"groupBy": [
[
0,
145,
false
]
],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"asc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
145,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM park WHERE city = 'Atlanta';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"park",
"WHERE",
"city",
"=",
"'Atlanta",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"park",
"where",
"city",
"=",
"value"
],
"question": "How many parks are there in Atlanta city?",
"question_toks": [
"How",
"many",
"parks",
"are",
"there",
"in",
"Atlanta",
"city",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
209,
false
],
null
],
"\"Atlanta\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM park WHERE city = 'Atlanta';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"park",
"WHERE",
"city",
"=",
"'Atlanta",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"park",
"where",
"city",
"=",
"value"
],
"question": "How many parks does Atlanta city have?",
"question_toks": [
"How",
"many",
"parks",
"does",
"Atlanta",
"city",
"have",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
209,
false
],
null
],
"\"Atlanta\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"park",
"AS",
"T2",
"ON",
"T1.park_id",
"=",
"T2.park_id",
"WHERE",
"T1.year",
"=",
"1907",
"AND",
"T2.park_name",
"=",
"'Columbia",
"Park",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"home_game",
"as",
"t1",
"join",
"park",
"as",
"t2",
"on",
"t1",
".",
"park_id",
"=",
"t2",
".",
"park_id",
"where",
"t1",
".",
"year",
"=",
"value",
"and",
"t2",
".",
"park_name",
"=",
"value"
],
"question": "How many games were played in park \"Columbia Park\" in 1907?",
"question_toks": [
"How",
"many",
"games",
"were",
"played",
"in",
"park",
"``",
"Columbia",
"Park",
"''",
"in",
"1907",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
156,
false
],
null
],
[
0,
206,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
1907.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
207,
false
],
null
],
"\"Columbia Park\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"park",
"AS",
"T2",
"ON",
"T1.park_id",
"=",
"T2.park_id",
"WHERE",
"T1.year",
"=",
"1907",
"AND",
"T2.park_name",
"=",
"'Columbia",
"Park",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"home_game",
"as",
"t1",
"join",
"park",
"as",
"t2",
"on",
"t1",
".",
"park_id",
"=",
"t2",
".",
"park_id",
"where",
"t1",
".",
"year",
"=",
"value",
"and",
"t2",
".",
"park_name",
"=",
"value"
],
"question": "Count the number of games taken place in park \"Columbia Park\" in 1907.",
"question_toks": [
"Count",
"the",
"number",
"of",
"games",
"taken",
"place",
"in",
"park",
"``",
"Columbia",
"Park",
"''",
"in",
"1907",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
156,
false
],
null
],
[
0,
206,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
1907.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
207,
false
],
null
],
"\"Columbia Park\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"park",
"AS",
"T2",
"ON",
"T1.park_id",
"=",
"T2.park_id",
"WHERE",
"T1.year",
"=",
"2000",
"AND",
"T2.city",
"=",
"'Atlanta",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"home_game",
"as",
"t1",
"join",
"park",
"as",
"t2",
"on",
"t1",
".",
"park_id",
"=",
"t2",
".",
"park_id",
"where",
"t1",
".",
"year",
"=",
"value",
"and",
"t2",
".",
"city",
"=",
"value"
],
"question": "How many games were played in city Atlanta in 2000?",
"question_toks": [
"How",
"many",
"games",
"were",
"played",
"in",
"city",
"Atlanta",
"in",
"2000",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
156,
false
],
null
],
[
0,
206,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
2000.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
209,
false
],
null
],
"\"Atlanta\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2000 AND T2.city = 'Atlanta';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"park",
"AS",
"T2",
"ON",
"T1.park_id",
"=",
"T2.park_id",
"WHERE",
"T1.year",
"=",
"2000",
"AND",
"T2.city",
"=",
"'Atlanta",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"home_game",
"as",
"t1",
"join",
"park",
"as",
"t2",
"on",
"t1",
".",
"park_id",
"=",
"t2",
".",
"park_id",
"where",
"t1",
".",
"year",
"=",
"value",
"and",
"t2",
".",
"city",
"=",
"value"
],
"question": "Find the number of games taken place in city Atlanta in 2000.",
"question_toks": [
"Find",
"the",
"number",
"of",
"games",
"taken",
"place",
"in",
"city",
"Atlanta",
"in",
"2000",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
156,
false
],
null
],
[
0,
206,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
2000.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
209,
false
],
null
],
"\"Atlanta\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;",
"query_toks": [
"SELECT",
"sum",
"(",
"T1.attendance",
")",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"BETWEEN",
"2000",
"AND",
"2010",
";"
],
"query_toks_no_value": [
"select",
"sum",
"(",
"t1",
".",
"attendance",
")",
"from",
"home_game",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"between",
"value",
"and",
"value"
],
"question": "What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?",
"question_toks": [
"What",
"is",
"the",
"total",
"home",
"game",
"attendance",
"of",
"team",
"Boston",
"Red",
"Stockings",
"from",
"2000",
"to",
"2010",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
155,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
4,
[
0,
[
0,
161,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
1,
[
0,
[
0,
153,
false
],
null
],
2000.0,
2010.0
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;",
"query_toks": [
"SELECT",
"sum",
"(",
"T1.attendance",
")",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"BETWEEN",
"2000",
"AND",
"2010",
";"
],
"query_toks_no_value": [
"select",
"sum",
"(",
"t1",
".",
"attendance",
")",
"from",
"home_game",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"between",
"value",
"and",
"value"
],
"question": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?",
"question_toks": [
"How",
"many",
"games",
"in",
"total",
"did",
"team",
"Boston",
"Red",
"Stockings",
"attend",
"from",
"2000",
"to",
"2010",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
155,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
4,
[
0,
[
0,
161,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
1,
[
0,
[
0,
153,
false
],
null
],
2000.0,
2010.0
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;",
"query_toks": [
"SELECT",
"sum",
"(",
"T1.salary",
")",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"player",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"WHERE",
"T2.name_first",
"=",
"'Len",
"'",
"AND",
"T2.name_last",
"=",
"'Barker",
"'",
"AND",
"T1.year",
"BETWEEN",
"1985",
"AND",
"1990",
";"
],
"query_toks_no_value": [
"select",
"sum",
"(",
"t1",
".",
"salary",
")",
"from",
"salary",
"as",
"t1",
"join",
"player",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"where",
"t2",
".",
"name_first",
"=",
"value",
"and",
"t2",
".",
"name_last",
"=",
"value",
"and",
"t1",
".",
"year",
"between",
"value",
"and",
"value"
],
"question": "How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?",
"question_toks": [
"How",
"much",
"did",
"the",
"the",
"player",
"with",
"first",
"name",
"Len",
"and",
"last",
"name",
"Barker",
"earn",
"between",
"1985",
"to",
"1990",
"in",
"total",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
275,
false
],
null
],
[
0,
182,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
16
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
4,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
195,
false
],
null
],
"\"Len\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
196,
false
],
null
],
"\"Barker\"",
null
],
"and",
[
false,
1,
[
0,
[
0,
272,
false
],
null
],
1985.0,
1990.0
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first = 'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;",
"query_toks": [
"SELECT",
"sum",
"(",
"T1.salary",
")",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"player",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"WHERE",
"T2.name_first",
"=",
"'Len",
"'",
"AND",
"T2.name_last",
"=",
"'Barker",
"'",
"AND",
"T1.year",
"BETWEEN",
"1985",
"AND",
"1990",
";"
],
"query_toks_no_value": [
"select",
"sum",
"(",
"t1",
".",
"salary",
")",
"from",
"salary",
"as",
"t1",
"join",
"player",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"where",
"t2",
".",
"name_first",
"=",
"value",
"and",
"t2",
".",
"name_last",
"=",
"value",
"and",
"t1",
".",
"year",
"between",
"value",
"and",
"value"
],
"question": "Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.",
"question_toks": [
"Compute",
"the",
"total",
"salary",
"that",
"the",
"player",
"with",
"first",
"name",
"Len",
"and",
"last",
"name",
"Barker",
"received",
"between",
"1985",
"to",
"1990",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
275,
false
],
null
],
[
0,
182,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
16
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
4,
[
0,
[
0,
276,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
195,
false
],
null
],
"\"Len\"",
null
],
"and",
[
false,
2,
[
0,
[
0,
196,
false
],
null
],
"\"Barker\"",
null
],
"and",
[
false,
1,
[
0,
[
0,
272,
false
],
null
],
1985.0,
1990.0
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'",
"query_toks": [
"SELECT",
"T2.name_first",
",",
"T2.name_last",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"player",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"JOIN",
"team",
"AS",
"T3",
"ON",
"T3.team_id_br",
"=",
"T1.team_id",
"WHERE",
"T1.year",
"=",
"2005",
"AND",
"T3.name",
"=",
"'Washington",
"Nationals",
"'",
"INTERSECT",
"SELECT",
"T2.name_first",
",",
"T2.name_last",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"player",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"JOIN",
"team",
"AS",
"T3",
"ON",
"T3.team_id_br",
"=",
"T1.team_id",
"WHERE",
"T1.year",
"=",
"2007",
"AND",
"T3.name",
"=",
"'Washington",
"Nationals",
"'"
],
"query_toks_no_value": [
"select",
"t2",
".",
"name_first",
",",
"t2",
".",
"name_last",
"from",
"salary",
"as",
"t1",
"join",
"player",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"join",
"team",
"as",
"t3",
"on",
"t3",
".",
"team_id_br",
"=",
"t1",
".",
"team_id",
"where",
"t1",
".",
"year",
"=",
"value",
"and",
"t3",
".",
"name",
"=",
"value",
"intersect",
"select",
"t2",
".",
"name_first",
",",
"t2",
".",
"name_last",
"from",
"salary",
"as",
"t1",
"join",
"player",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"join",
"team",
"as",
"t3",
"on",
"t3",
".",
"team_id_br",
"=",
"t1",
".",
"team_id",
"where",
"t1",
".",
"year",
"=",
"value",
"and",
"t3",
".",
"name",
"=",
"value"
],
"question": "List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.",
"question_toks": [
"List",
"players",
"'",
"first",
"name",
"and",
"last",
"name",
"who",
"received",
"salary",
"from",
"team",
"Washington",
"Nationals",
"in",
"both",
"2005",
"and",
"2007",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
275,
false
],
null
],
[
0,
182,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
336,
false
],
null
],
[
0,
273,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
16
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
275,
false
],
null
],
[
0,
182,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
336,
false
],
null
],
[
0,
273,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
16
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2007.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Washington Nationals\"",
null
]
]
},
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2005.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Washington Nationals\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'",
"query_toks": [
"SELECT",
"T2.name_first",
",",
"T2.name_last",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"player",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"JOIN",
"team",
"AS",
"T3",
"ON",
"T3.team_id_br",
"=",
"T1.team_id",
"WHERE",
"T1.year",
"=",
"2005",
"AND",
"T3.name",
"=",
"'Washington",
"Nationals",
"'",
"INTERSECT",
"SELECT",
"T2.name_first",
",",
"T2.name_last",
"FROM",
"salary",
"AS",
"T1",
"JOIN",
"player",
"AS",
"T2",
"ON",
"T1.player_id",
"=",
"T2.player_id",
"JOIN",
"team",
"AS",
"T3",
"ON",
"T3.team_id_br",
"=",
"T1.team_id",
"WHERE",
"T1.year",
"=",
"2007",
"AND",
"T3.name",
"=",
"'Washington",
"Nationals",
"'"
],
"query_toks_no_value": [
"select",
"t2",
".",
"name_first",
",",
"t2",
".",
"name_last",
"from",
"salary",
"as",
"t1",
"join",
"player",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"join",
"team",
"as",
"t3",
"on",
"t3",
".",
"team_id_br",
"=",
"t1",
".",
"team_id",
"where",
"t1",
".",
"year",
"=",
"value",
"and",
"t3",
".",
"name",
"=",
"value",
"intersect",
"select",
"t2",
".",
"name_first",
",",
"t2",
".",
"name_last",
"from",
"salary",
"as",
"t1",
"join",
"player",
"as",
"t2",
"on",
"t1",
".",
"player_id",
"=",
"t2",
".",
"player_id",
"join",
"team",
"as",
"t3",
"on",
"t3",
".",
"team_id_br",
"=",
"t1",
".",
"team_id",
"where",
"t1",
".",
"year",
"=",
"value",
"and",
"t3",
".",
"name",
"=",
"value"
],
"question": "What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?",
"question_toks": [
"What",
"are",
"the",
"first",
"name",
"and",
"last",
"name",
"of",
"the",
"players",
"who",
"were",
"paid",
"salary",
"by",
"team",
"Washington",
"Nationals",
"in",
"both",
"2005",
"and",
"2007",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
275,
false
],
null
],
[
0,
182,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
336,
false
],
null
],
[
0,
273,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
16
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
275,
false
],
null
],
[
0,
182,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
336,
false
],
null
],
[
0,
273,
false
],
null
]
],
"table_units": [
[
"table_unit",
20
],
[
"table_unit",
16
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2007.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Washington Nationals\"",
null
]
]
},
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
195,
false
],
null
]
],
[
0,
[
0,
[
0,
196,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
272,
false
],
null
],
2005.0,
null
],
"and",
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Washington Nationals\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;",
"query_toks": [
"SELECT",
"sum",
"(",
"T1.games",
")",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"BETWEEN",
"1990",
"AND",
"2000",
";"
],
"query_toks_no_value": [
"select",
"sum",
"(",
"t1",
".",
"games",
")",
"from",
"home_game",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"between",
"value",
"and",
"value"
],
"question": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?",
"question_toks": [
"How",
"many",
"home",
"games",
"did",
"the",
"team",
"Boston",
"Red",
"Stockings",
"play",
"from",
"1990",
"to",
"2000",
"in",
"total",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
155,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
4,
[
0,
[
0,
159,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
1,
[
0,
[
0,
153,
false
],
null
],
1990.0,
2000.0
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT sum(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000;",
"query_toks": [
"SELECT",
"sum",
"(",
"T1.games",
")",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T2.name",
"=",
"'Boston",
"Red",
"Stockings",
"'",
"AND",
"T1.year",
"BETWEEN",
"1990",
"AND",
"2000",
";"
],
"query_toks_no_value": [
"select",
"sum",
"(",
"t1",
".",
"games",
")",
"from",
"home_game",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t2",
".",
"name",
"=",
"value",
"and",
"t1",
".",
"year",
"between",
"value",
"and",
"value"
],
"question": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.",
"question_toks": [
"Count",
"the",
"total",
"number",
"of",
"games",
"the",
"team",
"Boston",
"Red",
"Stockings",
"attended",
"from",
"1990",
"to",
"2000",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
155,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
4,
[
0,
[
0,
159,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
331,
false
],
null
],
"\"Boston Red Stockings\"",
null
],
"and",
[
false,
1,
[
0,
[
0,
153,
false
],
null
],
1990.0,
2000.0
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;",
"query_toks": [
"SELECT",
"T2.name",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T1.year",
"=",
"1980",
"ORDER",
"BY",
"T1.attendance",
"ASC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t2",
".",
"name",
"from",
"home_game",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t1",
".",
"year",
"=",
"value",
"order",
"by",
"t1",
".",
"attendance",
"asc",
"limit",
"value"
],
"question": "Which team had the least number of attendances in home games in 1980?",
"question_toks": [
"Which",
"team",
"had",
"the",
"least",
"number",
"of",
"attendances",
"in",
"home",
"games",
"in",
"1980",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
155,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"asc",
[
[
0,
[
0,
161,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
331,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
1980.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;",
"query_toks": [
"SELECT",
"T2.name",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"team",
"AS",
"T2",
"ON",
"T1.team_id",
"=",
"T2.team_id_br",
"WHERE",
"T1.year",
"=",
"1980",
"ORDER",
"BY",
"T1.attendance",
"ASC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t2",
".",
"name",
"from",
"home_game",
"as",
"t1",
"join",
"team",
"as",
"t2",
"on",
"t1",
".",
"team_id",
"=",
"t2",
".",
"team_id_br",
"where",
"t1",
".",
"year",
"=",
"value",
"order",
"by",
"t1",
".",
"attendance",
"asc",
"limit",
"value"
],
"question": "Find the team that attended the least number of home games in 1980.",
"question_toks": [
"Find",
"the",
"team",
"that",
"attended",
"the",
"least",
"number",
"of",
"home",
"games",
"in",
"1980",
"."
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
155,
false
],
null
],
[
0,
336,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
23
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"asc",
[
[
0,
[
0,
161,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
331,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
1980.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT state FROM park GROUP BY state HAVING count(*) > 2;",
"query_toks": [
"SELECT",
"state",
"FROM",
"park",
"GROUP",
"BY",
"state",
"HAVING",
"count",
"(",
"*",
")",
">",
"2",
";"
],
"query_toks_no_value": [
"select",
"state",
"from",
"park",
"group",
"by",
"state",
"having",
"count",
"(",
"*",
")",
">",
"value"
],
"question": "List the names of states that have more than 2 parks.",
"question_toks": [
"List",
"the",
"names",
"of",
"states",
"that",
"have",
"more",
"than",
"2",
"parks",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
17
]
]
},
"groupBy": [
[
0,
210,
false
]
],
"having": [
[
false,
3,
[
0,
[
3,
0,
false
],
null
],
2.0,
null
]
],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
210,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT state FROM park GROUP BY state HAVING count(*) > 2;",
"query_toks": [
"SELECT",
"state",
"FROM",
"park",
"GROUP",
"BY",
"state",
"HAVING",
"count",
"(",
"*",
")",
">",
"2",
";"
],
"query_toks_no_value": [
"select",
"state",
"from",
"park",
"group",
"by",
"state",
"having",
"count",
"(",
"*",
")",
">",
"value"
],
"question": "Which states have more than 2 parks?",
"question_toks": [
"Which",
"states",
"have",
"more",
"than",
"2",
"parks",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
17
]
]
},
"groupBy": [
[
0,
210,
false
]
],
"having": [
[
false,
3,
[
0,
[
3,
0,
false
],
null
],
2.0,
null
]
],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
210,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM team_franchise WHERE active = 'Y';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"team_franchise",
"WHERE",
"active",
"=",
"'Y",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"team_franchise",
"where",
"active",
"=",
"value"
],
"question": "How many team franchises are active, with active value 'Y'?",
"question_toks": [
"How",
"many",
"team",
"franchises",
"are",
"active",
",",
"with",
"active",
"value",
"'Y",
"'",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
24
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
341,
false
],
null
],
"\"Y\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT count(*) FROM team_franchise WHERE active = 'Y';",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"team_franchise",
"WHERE",
"active",
"=",
"'Y",
"'",
";"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"team_franchise",
"where",
"active",
"=",
"value"
],
"question": "Find the number of team franchises that are active (have 'Y' as \"active\" information).",
"question_toks": [
"Find",
"the",
"number",
"of",
"team",
"franchises",
"that",
"are",
"active",
"(",
"have",
"'Y",
"'",
"as",
"``",
"active",
"''",
"information",
")",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
24
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
341,
false
],
null
],
"\"Y\"",
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4;",
"query_toks": [
"SELECT",
"city",
"FROM",
"park",
"GROUP",
"BY",
"city",
"HAVING",
"count",
"(",
"*",
")",
"BETWEEN",
"2",
"AND",
"4",
";"
],
"query_toks_no_value": [
"select",
"city",
"from",
"park",
"group",
"by",
"city",
"having",
"count",
"(",
"*",
")",
"between",
"value",
"and",
"value"
],
"question": "Which cities have 2 to 4 parks?",
"question_toks": [
"Which",
"cities",
"have",
"2",
"to",
"4",
"parks",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
17
]
]
},
"groupBy": [
[
0,
209,
false
]
],
"having": [
[
false,
1,
[
0,
[
3,
0,
false
],
null
],
2.0,
4.0
]
],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
209,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT city FROM park GROUP BY city HAVING count(*) BETWEEN 2 AND 4;",
"query_toks": [
"SELECT",
"city",
"FROM",
"park",
"GROUP",
"BY",
"city",
"HAVING",
"count",
"(",
"*",
")",
"BETWEEN",
"2",
"AND",
"4",
";"
],
"query_toks_no_value": [
"select",
"city",
"from",
"park",
"group",
"by",
"city",
"having",
"count",
"(",
"*",
")",
"between",
"value",
"and",
"value"
],
"question": "Find all the cities that have 2 to 4 parks.",
"question_toks": [
"Find",
"all",
"the",
"cities",
"that",
"have",
"2",
"to",
"4",
"parks",
"."
],
"sql": {
"except": null,
"from": {
"conds": [],
"table_units": [
[
"table_unit",
17
]
]
},
"groupBy": [
[
0,
209,
false
]
],
"having": [
[
false,
1,
[
0,
[
3,
0,
false
],
null
],
2.0,
4.0
]
],
"intersect": null,
"limit": null,
"orderBy": [],
"select": [
false,
[
[
0,
[
0,
[
0,
209,
false
],
null
]
]
]
],
"union": null,
"where": []
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T2.park_name",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"park",
"AS",
"T2",
"ON",
"T1.park_id",
"=",
"T2.park_id",
"WHERE",
"T1.year",
"=",
"2008",
"ORDER",
"BY",
"T1.attendance",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t2",
".",
"park_name",
"from",
"home_game",
"as",
"t1",
"join",
"park",
"as",
"t2",
"on",
"t1",
".",
"park_id",
"=",
"t2",
".",
"park_id",
"where",
"t1",
".",
"year",
"=",
"value",
"order",
"by",
"t1",
".",
"attendance",
"desc",
"limit",
"value"
],
"question": "Which park had most attendances in 2008?",
"question_toks": [
"Which",
"park",
"had",
"most",
"attendances",
"in",
"2008",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
156,
false
],
null
],
[
0,
206,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
0,
161,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
207,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
2008.0,
null
]
]
}
},
{
"db_id": "baseball_1",
"query": "SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;",
"query_toks": [
"SELECT",
"T2.park_name",
"FROM",
"home_game",
"AS",
"T1",
"JOIN",
"park",
"AS",
"T2",
"ON",
"T1.park_id",
"=",
"T2.park_id",
"WHERE",
"T1.year",
"=",
"2008",
"ORDER",
"BY",
"T1.attendance",
"DESC",
"LIMIT",
"1",
";"
],
"query_toks_no_value": [
"select",
"t2",
".",
"park_name",
"from",
"home_game",
"as",
"t1",
"join",
"park",
"as",
"t2",
"on",
"t1",
".",
"park_id",
"=",
"t2",
".",
"park_id",
"where",
"t1",
".",
"year",
"=",
"value",
"order",
"by",
"t1",
".",
"attendance",
"desc",
"limit",
"value"
],
"question": "Which park did the most people attend in 2008?",
"question_toks": [
"Which",
"park",
"did",
"the",
"most",
"people",
"attend",
"in",
"2008",
"?"
],
"sql": {
"except": null,
"from": {
"conds": [
[
false,
2,
[
0,
[
0,
156,
false
],
null
],
[
0,
206,
false
],
null
]
],
"table_units": [
[
"table_unit",
13
],
[
"table_unit",
17
]
]
},
"groupBy": [],
"having": [],
"intersect": null,
"limit": 1,
"orderBy": [
"desc",
[
[
0,
[
0,
161,
false
],
null
]
]
],
"select": [
false,
[
[
0,
[
0,
[
0,
207,
false
],
null
]
]
]
],
"union": null,
"where": [
[
false,
2,
[
0,
[
0,
153,
false
],
null
],
2008.0,
null
]
]
}
}
]