db_id
stringlengths 4
31
| query
stringlengths 18
577
| question
stringlengths 16
224
| query_toks
sequencelengths 4
90
| query_toks_no_value
sequencelengths 4
125
| question_toks
sequencelengths 4
44
|
---|---|---|---|---|---|
epinions_1 | SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > (SELECT avg(rating) FROM review) | Find the titles of items whose rating is higher than the average review rating of all items. | [
"SELECT",
"T1.title",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"WHERE",
"T2.rating",
">",
"(",
"SELECT",
"avg",
"(",
"rating",
")",
"FROM",
"review",
")"
] | [
"select",
"t1",
".",
"title",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"where",
"t2",
".",
"rating",
">",
"(",
"select",
"avg",
"(",
"rating",
")",
"from",
"review",
")"
] | [
"Find",
"the",
"titles",
"of",
"items",
"whose",
"rating",
"is",
"higher",
"than",
"the",
"average",
"review",
"rating",
"of",
"all",
"items",
"."
] |
epinions_1 | SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5 | Find the titles of items that received any rating below 5. | [
"SELECT",
"T1.title",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"WHERE",
"T2.rating",
"<",
"5"
] | [
"select",
"t1",
".",
"title",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"where",
"t2",
".",
"rating",
"<",
"value"
] | [
"Find",
"the",
"titles",
"of",
"items",
"that",
"received",
"any",
"rating",
"below",
"5",
"."
] |
epinions_1 | SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > 8 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating < 5 | Find the titles of items that received both a rating higher than 8 and a rating below 5. | [
"SELECT",
"T1.title",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"WHERE",
"T2.rating",
">",
"8",
"INTERSECT",
"SELECT",
"T1.title",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"WHERE",
"T2.rating",
"<",
"5"
] | [
"select",
"t1",
".",
"title",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"where",
"t2",
".",
"rating",
">",
"value",
"intersect",
"select",
"t1",
".",
"title",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"where",
"t2",
".",
"rating",
"<",
"value"
] | [
"Find",
"the",
"titles",
"of",
"items",
"that",
"received",
"both",
"a",
"rating",
"higher",
"than",
"8",
"and",
"a",
"rating",
"below",
"5",
"."
] |
epinions_1 | SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rank > 3 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id HAVING avg(T2.rating) > 5 | Find the names of items whose rank is higher than 3 and whose average rating is above 5. | [
"SELECT",
"T1.title",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"WHERE",
"T2.rank",
">",
"3",
"INTERSECT",
"SELECT",
"T1.title",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"GROUP",
"BY",
"T2.i_id",
"HAVING",
"avg",
"(",
"T2.rating",
")",
">",
"5"
] | [
"select",
"t1",
".",
"title",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"where",
"t2",
".",
"rank",
">",
"value",
"intersect",
"select",
"t1",
".",
"title",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"group",
"by",
"t2",
".",
"i_id",
"having",
"avg",
"(",
"t2",
".",
"rating",
")",
">",
"value"
] | [
"Find",
"the",
"names",
"of",
"items",
"whose",
"rank",
"is",
"higher",
"than",
"3",
"and",
"whose",
"average",
"rating",
"is",
"above",
"5",
"."
] |
epinions_1 | SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rating) LIMIT 1 | Find the name of the item with the lowest average rating. | [
"SELECT",
"T1.title",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"GROUP",
"BY",
"T2.i_id",
"ORDER",
"BY",
"avg",
"(",
"T2.rating",
")",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"title",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"group",
"by",
"t2",
".",
"i_id",
"order",
"by",
"avg",
"(",
"t2",
".",
"rating",
")",
"limit",
"value"
] | [
"Find",
"the",
"name",
"of",
"the",
"item",
"with",
"the",
"lowest",
"average",
"rating",
"."
] |
epinions_1 | SELECT title FROM item ORDER BY title | List the titles of all items in alphabetic order . | [
"SELECT",
"title",
"FROM",
"item",
"ORDER",
"BY",
"title"
] | [
"select",
"title",
"from",
"item",
"order",
"by",
"title"
] | [
"List",
"the",
"titles",
"of",
"all",
"items",
"in",
"alphabetic",
"order",
"."
] |
epinions_1 | SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY count(*) DESC LIMIT 1 | Find the name of the user who gives the most reviews. | [
"SELECT",
"T1.name",
"FROM",
"useracct",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.u_id",
"=",
"T2.u_id",
"GROUP",
"BY",
"T2.u_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"name",
"from",
"useracct",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"u_id",
"=",
"t2",
".",
"u_id",
"group",
"by",
"t2",
".",
"u_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"Find",
"the",
"name",
"of",
"the",
"user",
"who",
"gives",
"the",
"most",
"reviews",
"."
] |
epinions_1 | SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rating) DESC LIMIT 1 | Find the name and id of the item with the highest average rating. | [
"SELECT",
"T1.title",
",",
"T1.i_id",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"GROUP",
"BY",
"T2.i_id",
"ORDER",
"BY",
"avg",
"(",
"T2.rating",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"title",
",",
"t1",
".",
"i_id",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"group",
"by",
"t2",
".",
"i_id",
"order",
"by",
"avg",
"(",
"t2",
".",
"rating",
")",
"desc",
"limit",
"value"
] | [
"Find",
"the",
"name",
"and",
"id",
"of",
"the",
"item",
"with",
"the",
"highest",
"average",
"rating",
"."
] |
epinions_1 | SELECT T1.title , T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rank) DESC LIMIT 1 | Find the name and id of the good with the highest average rank. | [
"SELECT",
"T1.title",
",",
"T1.i_id",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"GROUP",
"BY",
"T2.i_id",
"ORDER",
"BY",
"avg",
"(",
"T2.rank",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"title",
",",
"t1",
".",
"i_id",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"group",
"by",
"t2",
".",
"i_id",
"order",
"by",
"avg",
"(",
"t2",
".",
"rank",
")",
"desc",
"limit",
"value"
] | [
"Find",
"the",
"name",
"and",
"id",
"of",
"the",
"good",
"with",
"the",
"highest",
"average",
"rank",
"."
] |
epinions_1 | SELECT T1.name , avg(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id | For each user, return the name and the average rating of reviews given by them. | [
"SELECT",
"T1.name",
",",
"avg",
"(",
"T2.rating",
")",
"FROM",
"useracct",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.u_id",
"=",
"T2.u_id",
"GROUP",
"BY",
"T2.u_id"
] | [
"select",
"t1",
".",
"name",
",",
"avg",
"(",
"t2",
".",
"rating",
")",
"from",
"useracct",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"u_id",
"=",
"t2",
".",
"u_id",
"group",
"by",
"t2",
".",
"u_id"
] | [
"For",
"each",
"user",
",",
"return",
"the",
"name",
"and",
"the",
"average",
"rating",
"of",
"reviews",
"given",
"by",
"them",
"."
] |
epinions_1 | SELECT T1.name , count(*) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id | For each user, find their name and the number of reviews written by them. | [
"SELECT",
"T1.name",
",",
"count",
"(",
"*",
")",
"FROM",
"useracct",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.u_id",
"=",
"T2.u_id",
"GROUP",
"BY",
"T2.u_id"
] | [
"select",
"t1",
".",
"name",
",",
"count",
"(",
"*",
")",
"from",
"useracct",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"u_id",
"=",
"t2",
".",
"u_id",
"group",
"by",
"t2",
".",
"u_id"
] | [
"For",
"each",
"user",
",",
"find",
"their",
"name",
"and",
"the",
"number",
"of",
"reviews",
"written",
"by",
"them",
"."
] |
epinions_1 | SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id ORDER BY T2.rating DESC LIMIT 1 | Find the name of the user who gave the highest rating. | [
"SELECT",
"T1.name",
"FROM",
"useracct",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.u_id",
"=",
"T2.u_id",
"ORDER",
"BY",
"T2.rating",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"name",
"from",
"useracct",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"u_id",
"=",
"t2",
".",
"u_id",
"order",
"by",
"t2",
".",
"rating",
"desc",
"limit",
"value"
] | [
"Find",
"the",
"name",
"of",
"the",
"user",
"who",
"gave",
"the",
"highest",
"rating",
"."
] |
epinions_1 | SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY avg(trust) DESC LIMIT 1 | Find the name of the source user with the highest average trust score. | [
"SELECT",
"T1.name",
"FROM",
"useracct",
"AS",
"T1",
"JOIN",
"trust",
"AS",
"T2",
"ON",
"T1.u_id",
"=",
"T2.source_u_id",
"GROUP",
"BY",
"T2.source_u_id",
"ORDER",
"BY",
"avg",
"(",
"trust",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"name",
"from",
"useracct",
"as",
"t1",
"join",
"trust",
"as",
"t2",
"on",
"t1",
".",
"u_id",
"=",
"t2",
".",
"source_u_id",
"group",
"by",
"t2",
".",
"source_u_id",
"order",
"by",
"avg",
"(",
"trust",
")",
"desc",
"limit",
"value"
] | [
"Find",
"the",
"name",
"of",
"the",
"source",
"user",
"with",
"the",
"highest",
"average",
"trust",
"score",
"."
] |
epinions_1 | SELECT T1.name , avg(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id | Find each target user's name and average trust score. | [
"SELECT",
"T1.name",
",",
"avg",
"(",
"trust",
")",
"FROM",
"useracct",
"AS",
"T1",
"JOIN",
"trust",
"AS",
"T2",
"ON",
"T1.u_id",
"=",
"T2.target_u_id",
"GROUP",
"BY",
"T2.target_u_id"
] | [
"select",
"t1",
".",
"name",
",",
"avg",
"(",
"trust",
")",
"from",
"useracct",
"as",
"t1",
"join",
"trust",
"as",
"t2",
"on",
"t1",
".",
"u_id",
"=",
"t2",
".",
"target_u_id",
"group",
"by",
"t2",
".",
"target_u_id"
] | [
"Find",
"each",
"target",
"user",
"'s",
"name",
"and",
"average",
"trust",
"score",
"."
] |
epinions_1 | SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id ORDER BY trust LIMIT 1 | Find the name of the target user with the lowest trust score. | [
"SELECT",
"T1.name",
"FROM",
"useracct",
"AS",
"T1",
"JOIN",
"trust",
"AS",
"T2",
"ON",
"T1.u_id",
"=",
"T2.target_u_id",
"ORDER",
"BY",
"trust",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"name",
"from",
"useracct",
"as",
"t1",
"join",
"trust",
"as",
"t2",
"on",
"t1",
".",
"u_id",
"=",
"t2",
".",
"target_u_id",
"order",
"by",
"trust",
"limit",
"value"
] | [
"Find",
"the",
"name",
"of",
"the",
"target",
"user",
"with",
"the",
"lowest",
"trust",
"score",
"."
] |
epinions_1 | SELECT title FROM item WHERE i_id NOT IN (SELECT i_id FROM review) | Find the names of the items that did not receive any review. | [
"SELECT",
"title",
"FROM",
"item",
"WHERE",
"i_id",
"NOT",
"IN",
"(",
"SELECT",
"i_id",
"FROM",
"review",
")"
] | [
"select",
"title",
"from",
"item",
"where",
"i_id",
"not",
"in",
"(",
"select",
"i_id",
"from",
"review",
")"
] | [
"Find",
"the",
"names",
"of",
"the",
"items",
"that",
"did",
"not",
"receive",
"any",
"review",
"."
] |
epinions_1 | SELECT name FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review) | Find the names of users who did not leave any review. | [
"SELECT",
"name",
"FROM",
"useracct",
"WHERE",
"u_id",
"NOT",
"IN",
"(",
"SELECT",
"u_id",
"FROM",
"review",
")"
] | [
"select",
"name",
"from",
"useracct",
"where",
"u_id",
"not",
"in",
"(",
"select",
"u_id",
"from",
"review",
")"
] | [
"Find",
"the",
"names",
"of",
"users",
"who",
"did",
"not",
"leave",
"any",
"review",
"."
] |
epinions_1 | SELECT count(*) FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review) | Find the number of users who did not write any review. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"useracct",
"WHERE",
"u_id",
"NOT",
"IN",
"(",
"SELECT",
"u_id",
"FROM",
"review",
")"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"useracct",
"where",
"u_id",
"not",
"in",
"(",
"select",
"u_id",
"from",
"review",
")"
] | [
"Find",
"the",
"number",
"of",
"users",
"who",
"did",
"not",
"write",
"any",
"review",
"."
] |
epinions_1 | SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review) | Find the number of items without any review. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"item",
"WHERE",
"i_id",
"NOT",
"IN",
"(",
"SELECT",
"i_id",
"FROM",
"review",
")"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"item",
"where",
"i_id",
"not",
"in",
"(",
"select",
"i_id",
"from",
"review",
")"
] | [
"Find",
"the",
"number",
"of",
"items",
"without",
"any",
"review",
"."
] |
riding_club | SELECT count(*) FROM player | How many players are there? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"player"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"player"
] | [
"How",
"many",
"players",
"are",
"there",
"?"
] |
riding_club | SELECT Player_name FROM player ORDER BY Votes ASC | List the names of players in ascending order of votes. | [
"SELECT",
"Player_name",
"FROM",
"player",
"ORDER",
"BY",
"Votes",
"ASC"
] | [
"select",
"player_name",
"from",
"player",
"order",
"by",
"votes",
"asc"
] | [
"List",
"the",
"names",
"of",
"players",
"in",
"ascending",
"order",
"of",
"votes",
"."
] |
riding_club | SELECT Gender , Occupation FROM player | What are the gender and occupation of players? | [
"SELECT",
"Gender",
",",
"Occupation",
"FROM",
"player"
] | [
"select",
"gender",
",",
"occupation",
"from",
"player"
] | [
"What",
"are",
"the",
"gender",
"and",
"occupation",
"of",
"players",
"?"
] |
riding_club | SELECT Player_name , residence FROM player WHERE Occupation != "Researcher" | List the name and residence for players whose occupation is not "Researcher". | [
"SELECT",
"Player_name",
",",
"residence",
"FROM",
"player",
"WHERE",
"Occupation",
"!",
"=",
"``",
"Researcher",
"''"
] | [
"select",
"player_name",
",",
"residence",
"from",
"player",
"where",
"occupation",
"!",
"=",
"value"
] | [
"List",
"the",
"name",
"and",
"residence",
"for",
"players",
"whose",
"occupation",
"is",
"not",
"``",
"Researcher",
"''",
"."
] |
riding_club | SELECT Sponsor_name FROM player WHERE Residence = "Brandon" OR Residence = "Birtle" | Show the names of sponsors of players whose residence is either "Brandon" or "Birtle". | [
"SELECT",
"Sponsor_name",
"FROM",
"player",
"WHERE",
"Residence",
"=",
"``",
"Brandon",
"''",
"OR",
"Residence",
"=",
"``",
"Birtle",
"''"
] | [
"select",
"sponsor_name",
"from",
"player",
"where",
"residence",
"=",
"value",
"or",
"residence",
"=",
"value"
] | [
"Show",
"the",
"names",
"of",
"sponsors",
"of",
"players",
"whose",
"residence",
"is",
"either",
"``",
"Brandon",
"''",
"or",
"``",
"Birtle",
"''",
"."
] |
riding_club | SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1 | What is the name of the player with the largest number of votes? | [
"SELECT",
"Player_name",
"FROM",
"player",
"ORDER",
"BY",
"Votes",
"DESC",
"LIMIT",
"1"
] | [
"select",
"player_name",
"from",
"player",
"order",
"by",
"votes",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"name",
"of",
"the",
"player",
"with",
"the",
"largest",
"number",
"of",
"votes",
"?"
] |
riding_club | SELECT Occupation , COUNT(*) FROM player GROUP BY Occupation | Show different occupations along with the number of players in each occupation. | [
"SELECT",
"Occupation",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"player",
"GROUP",
"BY",
"Occupation"
] | [
"select",
"occupation",
",",
"count",
"(",
"*",
")",
"from",
"player",
"group",
"by",
"occupation"
] | [
"Show",
"different",
"occupations",
"along",
"with",
"the",
"number",
"of",
"players",
"in",
"each",
"occupation",
"."
] |
riding_club | SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1 | Please show the most common occupation of players. | [
"SELECT",
"Occupation",
"FROM",
"player",
"GROUP",
"BY",
"Occupation",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"occupation",
"from",
"player",
"group",
"by",
"occupation",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"Please",
"show",
"the",
"most",
"common",
"occupation",
"of",
"players",
"."
] |
riding_club | SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*) >= 2 | Show the residences that have at least two players. | [
"SELECT",
"Residence",
"FROM",
"player",
"GROUP",
"BY",
"Residence",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"residence",
"from",
"player",
"group",
"by",
"residence",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"Show",
"the",
"residences",
"that",
"have",
"at",
"least",
"two",
"players",
"."
] |
riding_club | SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID | Show the names of players and names of their coaches. | [
"SELECT",
"T3.Player_name",
",",
"T2.coach_name",
"FROM",
"player_coach",
"AS",
"T1",
"JOIN",
"coach",
"AS",
"T2",
"ON",
"T1.Coach_ID",
"=",
"T2.Coach_ID",
"JOIN",
"player",
"AS",
"T3",
"ON",
"T1.Player_ID",
"=",
"T3.Player_ID"
] | [
"select",
"t3",
".",
"player_name",
",",
"t2",
".",
"coach_name",
"from",
"player_coach",
"as",
"t1",
"join",
"coach",
"as",
"t2",
"on",
"t1",
".",
"coach_id",
"=",
"t2",
".",
"coach_id",
"join",
"player",
"as",
"t3",
"on",
"t1",
".",
"player_id",
"=",
"t3",
".",
"player_id"
] | [
"Show",
"the",
"names",
"of",
"players",
"and",
"names",
"of",
"their",
"coaches",
"."
] |
riding_club | SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1 | Show the names of players coached by the rank 1 coach. | [
"SELECT",
"T3.Player_name",
"FROM",
"player_coach",
"AS",
"T1",
"JOIN",
"coach",
"AS",
"T2",
"ON",
"T1.Coach_ID",
"=",
"T2.Coach_ID",
"JOIN",
"player",
"AS",
"T3",
"ON",
"T1.Player_ID",
"=",
"T3.Player_ID",
"WHERE",
"T2.Rank",
"=",
"1"
] | [
"select",
"t3",
".",
"player_name",
"from",
"player_coach",
"as",
"t1",
"join",
"coach",
"as",
"t2",
"on",
"t1",
".",
"coach_id",
"=",
"t2",
".",
"coach_id",
"join",
"player",
"as",
"t3",
"on",
"t1",
".",
"player_id",
"=",
"t3",
".",
"player_id",
"where",
"t2",
".",
"rank",
"=",
"value"
] | [
"Show",
"the",
"names",
"of",
"players",
"coached",
"by",
"the",
"rank",
"1",
"coach",
"."
] |
riding_club | SELECT T3.Player_name , T3.gender FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T1.Starting_year > 2011 | Show the names and genders of players with a coach starting after 2011. | [
"SELECT",
"T3.Player_name",
",",
"T3.gender",
"FROM",
"player_coach",
"AS",
"T1",
"JOIN",
"coach",
"AS",
"T2",
"ON",
"T1.Coach_ID",
"=",
"T2.Coach_ID",
"JOIN",
"player",
"AS",
"T3",
"ON",
"T1.Player_ID",
"=",
"T3.Player_ID",
"WHERE",
"T1.Starting_year",
">",
"2011"
] | [
"select",
"t3",
".",
"player_name",
",",
"t3",
".",
"gender",
"from",
"player_coach",
"as",
"t1",
"join",
"coach",
"as",
"t2",
"on",
"t1",
".",
"coach_id",
"=",
"t2",
".",
"coach_id",
"join",
"player",
"as",
"t3",
"on",
"t1",
".",
"player_id",
"=",
"t3",
".",
"player_id",
"where",
"t1",
".",
"starting_year",
">",
"value"
] | [
"Show",
"the",
"names",
"and",
"genders",
"of",
"players",
"with",
"a",
"coach",
"starting",
"after",
"2011",
"."
] |
riding_club | SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID ORDER BY T3.Votes DESC | Show the names of players and names of their coaches in descending order of the votes of players. | [
"SELECT",
"T3.Player_name",
",",
"T2.coach_name",
"FROM",
"player_coach",
"AS",
"T1",
"JOIN",
"coach",
"AS",
"T2",
"ON",
"T1.Coach_ID",
"=",
"T2.Coach_ID",
"JOIN",
"player",
"AS",
"T3",
"ON",
"T1.Player_ID",
"=",
"T3.Player_ID",
"ORDER",
"BY",
"T3.Votes",
"DESC"
] | [
"select",
"t3",
".",
"player_name",
",",
"t2",
".",
"coach_name",
"from",
"player_coach",
"as",
"t1",
"join",
"coach",
"as",
"t2",
"on",
"t1",
".",
"coach_id",
"=",
"t2",
".",
"coach_id",
"join",
"player",
"as",
"t3",
"on",
"t1",
".",
"player_id",
"=",
"t3",
".",
"player_id",
"order",
"by",
"t3",
".",
"votes",
"desc"
] | [
"Show",
"the",
"names",
"of",
"players",
"and",
"names",
"of",
"their",
"coaches",
"in",
"descending",
"order",
"of",
"the",
"votes",
"of",
"players",
"."
] |
riding_club | SELECT Player_name FROM player WHERE Player_ID NOT IN (SELECT Player_ID FROM player_coach) | List the names of players that do not have coaches. | [
"SELECT",
"Player_name",
"FROM",
"player",
"WHERE",
"Player_ID",
"NOT",
"IN",
"(",
"SELECT",
"Player_ID",
"FROM",
"player_coach",
")"
] | [
"select",
"player_name",
"from",
"player",
"where",
"player_id",
"not",
"in",
"(",
"select",
"player_id",
"from",
"player_coach",
")"
] | [
"List",
"the",
"names",
"of",
"players",
"that",
"do",
"not",
"have",
"coaches",
"."
] |
riding_club | SELECT Residence FROM player WHERE gender = "M" INTERSECT SELECT Residence FROM player WHERE gender = "F" | Show the residences that have both a player of gender "M" and a player of gender "F". | [
"SELECT",
"Residence",
"FROM",
"player",
"WHERE",
"gender",
"=",
"``",
"M",
"''",
"INTERSECT",
"SELECT",
"Residence",
"FROM",
"player",
"WHERE",
"gender",
"=",
"``",
"F",
"''"
] | [
"select",
"residence",
"from",
"player",
"where",
"gender",
"=",
"value",
"intersect",
"select",
"residence",
"from",
"player",
"where",
"gender",
"=",
"value"
] | [
"Show",
"the",
"residences",
"that",
"have",
"both",
"a",
"player",
"of",
"gender",
"``",
"M",
"''",
"and",
"a",
"player",
"of",
"gender",
"``",
"F",
"''",
"."
] |
riding_club | SELECT T1.club_id , T1.club_name, count(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id | How many coaches does each club has? List the club id, name and the number of coaches. | [
"SELECT",
"T1.club_id",
",",
"T1.club_name",
",",
"count",
"(",
"*",
")",
"FROM",
"club",
"AS",
"T1",
"JOIN",
"coach",
"AS",
"T2",
"ON",
"T1.club_id",
"=",
"T2.club_id",
"GROUP",
"BY",
"T1.club_id"
] | [
"select",
"t1",
".",
"club_id",
",",
"t1",
".",
"club_name",
",",
"count",
"(",
"*",
")",
"from",
"club",
"as",
"t1",
"join",
"coach",
"as",
"t2",
"on",
"t1",
".",
"club_id",
"=",
"t2",
".",
"club_id",
"group",
"by",
"t1",
".",
"club_id"
] | [
"How",
"many",
"coaches",
"does",
"each",
"club",
"has",
"?",
"List",
"the",
"club",
"id",
",",
"name",
"and",
"the",
"number",
"of",
"coaches",
"."
] |
riding_club | SELECT T1.club_id , T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id = T2.club_id GROUP BY T1.club_id ORDER BY count(*) DESC LIMIT 1 | How many gold medals has the club with the most coaches won? | [
"SELECT",
"T1.club_id",
",",
"T1.gold",
"FROM",
"match_result",
"AS",
"T1",
"JOIN",
"coach",
"AS",
"T2",
"ON",
"T1.club_id",
"=",
"T2.club_id",
"GROUP",
"BY",
"T1.club_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"club_id",
",",
"t1",
".",
"gold",
"from",
"match_result",
"as",
"t1",
"join",
"coach",
"as",
"t2",
"on",
"t1",
".",
"club_id",
"=",
"t2",
".",
"club_id",
"group",
"by",
"t1",
".",
"club_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"How",
"many",
"gold",
"medals",
"has",
"the",
"club",
"with",
"the",
"most",
"coaches",
"won",
"?"
] |
gymnast | SELECT count(*) FROM gymnast | How many gymnasts are there? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"gymnast"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"gymnast"
] | [
"How",
"many",
"gymnasts",
"are",
"there",
"?"
] |
gymnast | SELECT count(*) FROM gymnast | Count the number of gymnasts. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"gymnast"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"gymnast"
] | [
"Count",
"the",
"number",
"of",
"gymnasts",
"."
] |
gymnast | SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC | List the total points of gymnasts in descending order. | [
"SELECT",
"Total_Points",
"FROM",
"gymnast",
"ORDER",
"BY",
"Total_Points",
"DESC"
] | [
"select",
"total_points",
"from",
"gymnast",
"order",
"by",
"total_points",
"desc"
] | [
"List",
"the",
"total",
"points",
"of",
"gymnasts",
"in",
"descending",
"order",
"."
] |
gymnast | SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC | What are the total points for all gymnasts, ordered by total points descending? | [
"SELECT",
"Total_Points",
"FROM",
"gymnast",
"ORDER",
"BY",
"Total_Points",
"DESC"
] | [
"select",
"total_points",
"from",
"gymnast",
"order",
"by",
"total_points",
"desc"
] | [
"What",
"are",
"the",
"total",
"points",
"for",
"all",
"gymnasts",
",",
"ordered",
"by",
"total",
"points",
"descending",
"?"
] |
gymnast | SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC | List the total points of gymnasts in descending order of floor exercise points. | [
"SELECT",
"Total_Points",
"FROM",
"gymnast",
"ORDER",
"BY",
"Floor_Exercise_Points",
"DESC"
] | [
"select",
"total_points",
"from",
"gymnast",
"order",
"by",
"floor_exercise_points",
"desc"
] | [
"List",
"the",
"total",
"points",
"of",
"gymnasts",
"in",
"descending",
"order",
"of",
"floor",
"exercise",
"points",
"."
] |
gymnast | SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC | What are the total points of gymnasts, ordered by their floor exercise points descending? | [
"SELECT",
"Total_Points",
"FROM",
"gymnast",
"ORDER",
"BY",
"Floor_Exercise_Points",
"DESC"
] | [
"select",
"total_points",
"from",
"gymnast",
"order",
"by",
"floor_exercise_points",
"desc"
] | [
"What",
"are",
"the",
"total",
"points",
"of",
"gymnasts",
",",
"ordered",
"by",
"their",
"floor",
"exercise",
"points",
"descending",
"?"
] |
gymnast | SELECT avg(Horizontal_Bar_Points) FROM gymnast | What is the average horizontal bar points for all gymnasts? | [
"SELECT",
"avg",
"(",
"Horizontal_Bar_Points",
")",
"FROM",
"gymnast"
] | [
"select",
"avg",
"(",
"horizontal_bar_points",
")",
"from",
"gymnast"
] | [
"What",
"is",
"the",
"average",
"horizontal",
"bar",
"points",
"for",
"all",
"gymnasts",
"?"
] |
gymnast | SELECT avg(Horizontal_Bar_Points) FROM gymnast | Return the average horizontal bar points across all gymnasts. | [
"SELECT",
"avg",
"(",
"Horizontal_Bar_Points",
")",
"FROM",
"gymnast"
] | [
"select",
"avg",
"(",
"horizontal_bar_points",
")",
"from",
"gymnast"
] | [
"Return",
"the",
"average",
"horizontal",
"bar",
"points",
"across",
"all",
"gymnasts",
"."
] |
gymnast | SELECT Name FROM People ORDER BY Name ASC | What are the names of people in ascending alphabetical order? | [
"SELECT",
"Name",
"FROM",
"People",
"ORDER",
"BY",
"Name",
"ASC"
] | [
"select",
"name",
"from",
"people",
"order",
"by",
"name",
"asc"
] | [
"What",
"are",
"the",
"names",
"of",
"people",
"in",
"ascending",
"alphabetical",
"order",
"?"
] |
gymnast | SELECT Name FROM People ORDER BY Name ASC | Return the names of people, ordered alphabetically. | [
"SELECT",
"Name",
"FROM",
"People",
"ORDER",
"BY",
"Name",
"ASC"
] | [
"select",
"name",
"from",
"people",
"order",
"by",
"name",
"asc"
] | [
"Return",
"the",
"names",
"of",
"people",
",",
"ordered",
"alphabetically",
"."
] |
gymnast | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | What are the names of gymnasts? | [
"SELECT",
"T2.Name",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID"
] | [
"select",
"t2",
".",
"name",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id"
] | [
"What",
"are",
"the",
"names",
"of",
"gymnasts",
"?"
] |
gymnast | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | Return the names of the gymnasts. | [
"SELECT",
"T2.Name",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID"
] | [
"select",
"t2",
".",
"name",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id"
] | [
"Return",
"the",
"names",
"of",
"the",
"gymnasts",
"."
] |
gymnast | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown != "Santo Domingo" | What are the names of gymnasts whose hometown is not "Santo Domingo"? | [
"SELECT",
"T2.Name",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"WHERE",
"T2.Hometown",
"!",
"=",
"``",
"Santo",
"Domingo",
"''"
] | [
"select",
"t2",
".",
"name",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"where",
"t2",
".",
"hometown",
"!",
"=",
"value"
] | [
"What",
"are",
"the",
"names",
"of",
"gymnasts",
"whose",
"hometown",
"is",
"not",
"``",
"Santo",
"Domingo",
"''",
"?"
] |
gymnast | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T2.Hometown != "Santo Domingo" | Return the names of gymnasts who did not grow up in Santo Domingo. | [
"SELECT",
"T2.Name",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"WHERE",
"T2.Hometown",
"!",
"=",
"``",
"Santo",
"Domingo",
"''"
] | [
"select",
"t2",
".",
"name",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"where",
"t2",
".",
"hometown",
"!",
"=",
"value"
] | [
"Return",
"the",
"names",
"of",
"gymnasts",
"who",
"did",
"not",
"grow",
"up",
"in",
"Santo",
"Domingo",
"."
] |
gymnast | SELECT Age FROM people ORDER BY Height DESC LIMIT 1 | What is the age of the tallest person? | [
"SELECT",
"Age",
"FROM",
"people",
"ORDER",
"BY",
"Height",
"DESC",
"LIMIT",
"1"
] | [
"select",
"age",
"from",
"people",
"order",
"by",
"height",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"age",
"of",
"the",
"tallest",
"person",
"?"
] |
gymnast | SELECT Age FROM people ORDER BY Height DESC LIMIT 1 | Return the age of the person with the greatest height. | [
"SELECT",
"Age",
"FROM",
"people",
"ORDER",
"BY",
"Height",
"DESC",
"LIMIT",
"1"
] | [
"select",
"age",
"from",
"people",
"order",
"by",
"height",
"desc",
"limit",
"value"
] | [
"Return",
"the",
"age",
"of",
"the",
"person",
"with",
"the",
"greatest",
"height",
"."
] |
gymnast | SELECT Name FROM People ORDER BY Age DESC LIMIT 5 | List the names of the top 5 oldest people. | [
"SELECT",
"Name",
"FROM",
"People",
"ORDER",
"BY",
"Age",
"DESC",
"LIMIT",
"5"
] | [
"select",
"name",
"from",
"people",
"order",
"by",
"age",
"desc",
"limit",
"value"
] | [
"List",
"the",
"names",
"of",
"the",
"top",
"5",
"oldest",
"people",
"."
] |
gymnast | SELECT Name FROM People ORDER BY Age DESC LIMIT 5 | What are the names of the five oldest people? | [
"SELECT",
"Name",
"FROM",
"People",
"ORDER",
"BY",
"Age",
"DESC",
"LIMIT",
"5"
] | [
"select",
"name",
"from",
"people",
"order",
"by",
"age",
"desc",
"limit",
"value"
] | [
"What",
"are",
"the",
"names",
"of",
"the",
"five",
"oldest",
"people",
"?"
] |
gymnast | SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC LIMIT 1 | What is the total point count of the youngest gymnast? | [
"SELECT",
"T1.Total_Points",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"ORDER",
"BY",
"T2.Age",
"ASC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"total_points",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"order",
"by",
"t2",
".",
"age",
"asc",
"limit",
"value"
] | [
"What",
"is",
"the",
"total",
"point",
"count",
"of",
"the",
"youngest",
"gymnast",
"?"
] |
gymnast | SELECT T1.Total_Points FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Age ASC LIMIT 1 | Return the total points of the gymnast with the lowest age. | [
"SELECT",
"T1.Total_Points",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"ORDER",
"BY",
"T2.Age",
"ASC",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"total_points",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"order",
"by",
"t2",
".",
"age",
"asc",
"limit",
"value"
] | [
"Return",
"the",
"total",
"points",
"of",
"the",
"gymnast",
"with",
"the",
"lowest",
"age",
"."
] |
gymnast | SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | What is the average age of all gymnasts? | [
"SELECT",
"avg",
"(",
"T2.Age",
")",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID"
] | [
"select",
"avg",
"(",
"t2",
".",
"age",
")",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id"
] | [
"What",
"is",
"the",
"average",
"age",
"of",
"all",
"gymnasts",
"?"
] |
gymnast | SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | Return the average age across all gymnasts. | [
"SELECT",
"avg",
"(",
"T2.Age",
")",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID"
] | [
"select",
"avg",
"(",
"t2",
".",
"age",
")",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id"
] | [
"Return",
"the",
"average",
"age",
"across",
"all",
"gymnasts",
"."
] |
gymnast | SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5 | What are the distinct hometowns of gymnasts with total points more than 57.5? | [
"SELECT",
"DISTINCT",
"T2.Hometown",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"WHERE",
"T1.Total_Points",
">",
"57.5"
] | [
"select",
"distinct",
"t2",
".",
"hometown",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"where",
"t1",
".",
"total_points",
">",
"value"
] | [
"What",
"are",
"the",
"distinct",
"hometowns",
"of",
"gymnasts",
"with",
"total",
"points",
"more",
"than",
"57.5",
"?"
] |
gymnast | SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID WHERE T1.Total_Points > 57.5 | Give the different hometowns of gymnasts that have a total point score of above 57.5. | [
"SELECT",
"DISTINCT",
"T2.Hometown",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"WHERE",
"T1.Total_Points",
">",
"57.5"
] | [
"select",
"distinct",
"t2",
".",
"hometown",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"where",
"t1",
".",
"total_points",
">",
"value"
] | [
"Give",
"the",
"different",
"hometowns",
"of",
"gymnasts",
"that",
"have",
"a",
"total",
"point",
"score",
"of",
"above",
"57.5",
"."
] |
gymnast | SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown | What are the hometowns of gymnasts and the corresponding number of gymnasts? | [
"SELECT",
"T2.Hometown",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"GROUP",
"BY",
"T2.Hometown"
] | [
"select",
"t2",
".",
"hometown",
",",
"count",
"(",
"*",
")",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"group",
"by",
"t2",
".",
"hometown"
] | [
"What",
"are",
"the",
"hometowns",
"of",
"gymnasts",
"and",
"the",
"corresponding",
"number",
"of",
"gymnasts",
"?"
] |
gymnast | SELECT T2.Hometown , COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown | How many gymnasts are from each hometown? | [
"SELECT",
"T2.Hometown",
",",
"COUNT",
"(",
"*",
")",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"GROUP",
"BY",
"T2.Hometown"
] | [
"select",
"t2",
".",
"hometown",
",",
"count",
"(",
"*",
")",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"group",
"by",
"t2",
".",
"hometown"
] | [
"How",
"many",
"gymnasts",
"are",
"from",
"each",
"hometown",
"?"
] |
gymnast | SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1 | What is the most common hometown of gymnasts? | [
"SELECT",
"T2.Hometown",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"GROUP",
"BY",
"T2.Hometown",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t2",
".",
"hometown",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"group",
"by",
"t2",
".",
"hometown",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"most",
"common",
"hometown",
"of",
"gymnasts",
"?"
] |
gymnast | SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1 | Return the hometown that is most common among gymnasts. | [
"SELECT",
"T2.Hometown",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"GROUP",
"BY",
"T2.Hometown",
"ORDER",
"BY",
"COUNT",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t2",
".",
"hometown",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"group",
"by",
"t2",
".",
"hometown",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] | [
"Return",
"the",
"hometown",
"that",
"is",
"most",
"common",
"among",
"gymnasts",
"."
] |
gymnast | SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2 | What are the hometowns that are shared by at least two gymnasts? | [
"SELECT",
"T2.Hometown",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"GROUP",
"BY",
"T2.Hometown",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"t2",
".",
"hometown",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"group",
"by",
"t2",
".",
"hometown",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"What",
"are",
"the",
"hometowns",
"that",
"are",
"shared",
"by",
"at",
"least",
"two",
"gymnasts",
"?"
] |
gymnast | SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2 | Give the hometowns from which two or more gymnasts are from. | [
"SELECT",
"T2.Hometown",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"GROUP",
"BY",
"T2.Hometown",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"t2",
".",
"hometown",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"group",
"by",
"t2",
".",
"hometown",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"Give",
"the",
"hometowns",
"from",
"which",
"two",
"or",
"more",
"gymnasts",
"are",
"from",
"."
] |
gymnast | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC | List the names of gymnasts in ascending order by their heights. | [
"SELECT",
"T2.Name",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"ORDER",
"BY",
"T2.Height",
"ASC"
] | [
"select",
"t2",
".",
"name",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"order",
"by",
"t2",
".",
"height",
"asc"
] | [
"List",
"the",
"names",
"of",
"gymnasts",
"in",
"ascending",
"order",
"by",
"their",
"heights",
"."
] |
gymnast | SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T2.Height ASC | What are the names of gymnasts, ordered by their heights ascending? | [
"SELECT",
"T2.Name",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"ORDER",
"BY",
"T2.Height",
"ASC"
] | [
"select",
"t2",
".",
"name",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"order",
"by",
"t2",
".",
"height",
"asc"
] | [
"What",
"are",
"the",
"names",
"of",
"gymnasts",
",",
"ordered",
"by",
"their",
"heights",
"ascending",
"?"
] |
gymnast | SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | List the distinct hometowns that are not associated with any gymnast. | [
"SELECT",
"DISTINCT",
"Hometown",
"FROM",
"people",
"EXCEPT",
"SELECT",
"DISTINCT",
"T2.Hometown",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID"
] | [
"select",
"distinct",
"hometown",
"from",
"people",
"except",
"select",
"distinct",
"t2",
".",
"hometown",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id"
] | [
"List",
"the",
"distinct",
"hometowns",
"that",
"are",
"not",
"associated",
"with",
"any",
"gymnast",
"."
] |
gymnast | SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID | From which hometowns did no gymnasts come from? | [
"SELECT",
"DISTINCT",
"Hometown",
"FROM",
"people",
"EXCEPT",
"SELECT",
"DISTINCT",
"T2.Hometown",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID"
] | [
"select",
"distinct",
"hometown",
"from",
"people",
"except",
"select",
"distinct",
"t2",
".",
"hometown",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id"
] | [
"From",
"which",
"hometowns",
"did",
"no",
"gymnasts",
"come",
"from",
"?"
] |
gymnast | SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20 | Show the hometowns shared by people older than 23 and younger than 20. | [
"SELECT",
"Hometown",
"FROM",
"people",
"WHERE",
"Age",
">",
"23",
"INTERSECT",
"SELECT",
"Hometown",
"FROM",
"people",
"WHERE",
"Age",
"<",
"20"
] | [
"select",
"hometown",
"from",
"people",
"where",
"age",
">",
"value",
"intersect",
"select",
"hometown",
"from",
"people",
"where",
"age",
"<",
"value"
] | [
"Show",
"the",
"hometowns",
"shared",
"by",
"people",
"older",
"than",
"23",
"and",
"younger",
"than",
"20",
"."
] |
gymnast | SELECT Hometown FROM people WHERE Age > 23 INTERSECT SELECT Hometown FROM people WHERE Age < 20 | From which hometowns did both people older than 23 and younger than 20 come from? | [
"SELECT",
"Hometown",
"FROM",
"people",
"WHERE",
"Age",
">",
"23",
"INTERSECT",
"SELECT",
"Hometown",
"FROM",
"people",
"WHERE",
"Age",
"<",
"20"
] | [
"select",
"hometown",
"from",
"people",
"where",
"age",
">",
"value",
"intersect",
"select",
"hometown",
"from",
"people",
"where",
"age",
"<",
"value"
] | [
"From",
"which",
"hometowns",
"did",
"both",
"people",
"older",
"than",
"23",
"and",
"younger",
"than",
"20",
"come",
"from",
"?"
] |
gymnast | SELECT count(DISTINCT Hometown) FROM people | How many distinct hometowns did these people have? | [
"SELECT",
"count",
"(",
"DISTINCT",
"Hometown",
")",
"FROM",
"people"
] | [
"select",
"count",
"(",
"distinct",
"hometown",
")",
"from",
"people"
] | [
"How",
"many",
"distinct",
"hometowns",
"did",
"these",
"people",
"have",
"?"
] |
gymnast | SELECT count(DISTINCT Hometown) FROM people | Count the number of different hometowns of these people. | [
"SELECT",
"count",
"(",
"DISTINCT",
"Hometown",
")",
"FROM",
"people"
] | [
"select",
"count",
"(",
"distinct",
"hometown",
")",
"from",
"people"
] | [
"Count",
"the",
"number",
"of",
"different",
"hometowns",
"of",
"these",
"people",
"."
] |
gymnast | SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC | Show the ages of gymnasts in descending order of total points. | [
"SELECT",
"T2.Age",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"ORDER",
"BY",
"T1.Total_Points",
"DESC"
] | [
"select",
"t2",
".",
"age",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"order",
"by",
"t1",
".",
"total_points",
"desc"
] | [
"Show",
"the",
"ages",
"of",
"gymnasts",
"in",
"descending",
"order",
"of",
"total",
"points",
"."
] |
gymnast | SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC | What are the ages of the gymnasts, ordered descending by their total points? | [
"SELECT",
"T2.Age",
"FROM",
"gymnast",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.Gymnast_ID",
"=",
"T2.People_ID",
"ORDER",
"BY",
"T1.Total_Points",
"DESC"
] | [
"select",
"t2",
".",
"age",
"from",
"gymnast",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"gymnast_id",
"=",
"t2",
".",
"people_id",
"order",
"by",
"t1",
".",
"total_points",
"desc"
] | [
"What",
"are",
"the",
"ages",
"of",
"the",
"gymnasts",
",",
"ordered",
"descending",
"by",
"their",
"total",
"points",
"?"
] |
small_bank_1 | SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown' | Find the total savings balance of all accounts except the account with name ‘Brown’. | [
"SELECT",
"sum",
"(",
"T2.balance",
")",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"savings",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T1.name",
"!",
"=",
"'Brown",
"'"
] | [
"select",
"sum",
"(",
"t2",
".",
"balance",
")",
"from",
"accounts",
"as",
"t1",
"join",
"savings",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t1",
".",
"name",
"!",
"=",
"value"
] | [
"Find",
"the",
"total",
"savings",
"balance",
"of",
"all",
"accounts",
"except",
"the",
"account",
"with",
"name",
"‘Brown’",
"."
] |
small_bank_1 | SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T1.name != 'Brown' | What is the total balance of savings accounts not belonging to someone with the name Brown? | [
"SELECT",
"sum",
"(",
"T2.balance",
")",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"savings",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T1.name",
"!",
"=",
"'Brown",
"'"
] | [
"select",
"sum",
"(",
"t2",
".",
"balance",
")",
"from",
"accounts",
"as",
"t1",
"join",
"savings",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t1",
".",
"name",
"!",
"=",
"value"
] | [
"What",
"is",
"the",
"total",
"balance",
"of",
"savings",
"accounts",
"not",
"belonging",
"to",
"someone",
"with",
"the",
"name",
"Brown",
"?"
] |
small_bank_1 | SELECT count(*) FROM accounts | How many accounts are there in total? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"accounts"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"accounts"
] | [
"How",
"many",
"accounts",
"are",
"there",
"in",
"total",
"?"
] |
small_bank_1 | SELECT count(*) FROM accounts | Count the number of accounts. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"accounts"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"accounts"
] | [
"Count",
"the",
"number",
"of",
"accounts",
"."
] |
small_bank_1 | SELECT sum(balance) FROM checking | What is the total checking balance in all accounts? | [
"SELECT",
"sum",
"(",
"balance",
")",
"FROM",
"checking"
] | [
"select",
"sum",
"(",
"balance",
")",
"from",
"checking"
] | [
"What",
"is",
"the",
"total",
"checking",
"balance",
"in",
"all",
"accounts",
"?"
] |
small_bank_1 | SELECT sum(balance) FROM checking | Find the total balance across checking accounts. | [
"SELECT",
"sum",
"(",
"balance",
")",
"FROM",
"checking"
] | [
"select",
"sum",
"(",
"balance",
")",
"from",
"checking"
] | [
"Find",
"the",
"total",
"balance",
"across",
"checking",
"accounts",
"."
] |
small_bank_1 | SELECT avg(balance) FROM checking | Find the average checking balance. | [
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"checking"
] | [
"select",
"avg",
"(",
"balance",
")",
"from",
"checking"
] | [
"Find",
"the",
"average",
"checking",
"balance",
"."
] |
small_bank_1 | SELECT avg(balance) FROM checking | What is the average balance in checking accounts? | [
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"checking"
] | [
"select",
"avg",
"(",
"balance",
")",
"from",
"checking"
] | [
"What",
"is",
"the",
"average",
"balance",
"in",
"checking",
"accounts",
"?"
] |
small_bank_1 | SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings) | How many accounts have a savings balance above the average savings balance? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"savings",
"WHERE",
"balance",
">",
"(",
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"savings",
")"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"savings",
"where",
"balance",
">",
"(",
"select",
"avg",
"(",
"balance",
")",
"from",
"savings",
")"
] | [
"How",
"many",
"accounts",
"have",
"a",
"savings",
"balance",
"above",
"the",
"average",
"savings",
"balance",
"?"
] |
small_bank_1 | SELECT count(*) FROM savings WHERE balance > (SELECT avg(balance) FROM savings) | Find the number of accounts with a savings balance that is higher than the average savings balance. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"savings",
"WHERE",
"balance",
">",
"(",
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"savings",
")"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"savings",
"where",
"balance",
">",
"(",
"select",
"avg",
"(",
"balance",
")",
"from",
"savings",
")"
] | [
"Find",
"the",
"number",
"of",
"accounts",
"with",
"a",
"savings",
"balance",
"that",
"is",
"higher",
"than",
"the",
"average",
"savings",
"balance",
"."
] |
small_bank_1 | SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking) | Find the name and id of accounts whose checking balance is below the maximum checking balance. | [
"SELECT",
"T1.custid",
",",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T2.balance",
"<",
"(",
"SELECT",
"max",
"(",
"balance",
")",
"FROM",
"checking",
")"
] | [
"select",
"t1",
".",
"custid",
",",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t2",
".",
"balance",
"<",
"(",
"select",
"max",
"(",
"balance",
")",
"from",
"checking",
")"
] | [
"Find",
"the",
"name",
"and",
"id",
"of",
"accounts",
"whose",
"checking",
"balance",
"is",
"below",
"the",
"maximum",
"checking",
"balance",
"."
] |
small_bank_1 | SELECT T1.custid , T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking) | What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance? | [
"SELECT",
"T1.custid",
",",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T2.balance",
"<",
"(",
"SELECT",
"max",
"(",
"balance",
")",
"FROM",
"checking",
")"
] | [
"select",
"t1",
".",
"custid",
",",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t2",
".",
"balance",
"<",
"(",
"select",
"max",
"(",
"balance",
")",
"from",
"checking",
")"
] | [
"What",
"are",
"the",
"customer",
"id",
"and",
"name",
"corresponding",
"to",
"accounts",
"with",
"a",
"checking",
"balance",
"less",
"than",
"the",
"largest",
"checking",
"balance",
"?"
] |
small_bank_1 | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%' | What is the checking balance of the account whose owner’s name contains the substring ‘ee’? | [
"SELECT",
"T2.balance",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T1.name",
"LIKE",
"'",
"%",
"ee",
"%",
"'"
] | [
"select",
"t2",
".",
"balance",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t1",
".",
"name",
"like",
"value"
] | [
"What",
"is",
"the",
"checking",
"balance",
"of",
"the",
"account",
"whose",
"owner’s",
"name",
"contains",
"the",
"substring",
"‘ee’",
"?"
] |
small_bank_1 | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%' | Find the balance of the checking account belonging to an owner whose name contains 'ee'. | [
"SELECT",
"T2.balance",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T1.name",
"LIKE",
"'",
"%",
"ee",
"%",
"'"
] | [
"select",
"t2",
".",
"balance",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t1",
".",
"name",
"like",
"value"
] | [
"Find",
"the",
"balance",
"of",
"the",
"checking",
"account",
"belonging",
"to",
"an",
"owner",
"whose",
"name",
"contains",
"'ee",
"'",
"."
] |
small_bank_1 | SELECT T2.balance , T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown' | Find the checking balance and saving balance in the Brown’s account. | [
"SELECT",
"T2.balance",
",",
"T3.balance",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"JOIN",
"savings",
"AS",
"T3",
"ON",
"T1.custid",
"=",
"T3.custid",
"WHERE",
"T1.name",
"=",
"'Brown",
"'"
] | [
"select",
"t2",
".",
"balance",
",",
"t3",
".",
"balance",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"join",
"savings",
"as",
"t3",
"on",
"t1",
".",
"custid",
"=",
"t3",
".",
"custid",
"where",
"t1",
".",
"name",
"=",
"value"
] | [
"Find",
"the",
"checking",
"balance",
"and",
"saving",
"balance",
"in",
"the",
"Brown’s",
"account",
"."
] |
small_bank_1 | SELECT T2.balance , T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid WHERE T1.name = 'Brown' | What are the checking and savings balances in accounts belonging to Brown? | [
"SELECT",
"T2.balance",
",",
"T3.balance",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"JOIN",
"savings",
"AS",
"T3",
"ON",
"T1.custid",
"=",
"T3.custid",
"WHERE",
"T1.name",
"=",
"'Brown",
"'"
] | [
"select",
"t2",
".",
"balance",
",",
"t3",
".",
"balance",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"join",
"savings",
"as",
"t3",
"on",
"t1",
".",
"custid",
"=",
"t3",
".",
"custid",
"where",
"t1",
".",
"name",
"=",
"value"
] | [
"What",
"are",
"the",
"checking",
"and",
"savings",
"balances",
"in",
"accounts",
"belonging",
"to",
"Brown",
"?"
] |
small_bank_1 | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM savings) | Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance. | [
"SELECT",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T2.balance",
">",
"(",
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"checking",
")",
"INTERSECT",
"SELECT",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"savings",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T2.balance",
"<",
"(",
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"savings",
")"
] | [
"select",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t2",
".",
"balance",
">",
"(",
"select",
"avg",
"(",
"balance",
")",
"from",
"checking",
")",
"intersect",
"select",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"savings",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t2",
".",
"balance",
"<",
"(",
"select",
"avg",
"(",
"balance",
")",
"from",
"savings",
")"
] | [
"Find",
"the",
"names",
"of",
"accounts",
"whose",
"checking",
"balance",
"is",
"above",
"the",
"average",
"checking",
"balance",
",",
"but",
"savings",
"balance",
"is",
"below",
"the",
"average",
"savings",
"balance",
"."
] |
small_bank_1 | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM checking) INTERSECT SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM savings) | What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance? | [
"SELECT",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T2.balance",
">",
"(",
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"checking",
")",
"INTERSECT",
"SELECT",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"savings",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T2.balance",
"<",
"(",
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"savings",
")"
] | [
"select",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t2",
".",
"balance",
">",
"(",
"select",
"avg",
"(",
"balance",
")",
"from",
"checking",
")",
"intersect",
"select",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"savings",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t2",
".",
"balance",
"<",
"(",
"select",
"avg",
"(",
"balance",
")",
"from",
"savings",
")"
] | [
"What",
"are",
"the",
"names",
"of",
"accounts",
"with",
"checking",
"balances",
"greater",
"than",
"the",
"average",
"checking",
"balance",
"and",
"savings",
"balances",
"below",
"the",
"average",
"savings",
"balance",
"?"
] |
small_bank_1 | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM savings)) | Find the checking balance of the accounts whose savings balance is higher than the average savings balance. | [
"SELECT",
"T2.balance",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T1.name",
"IN",
"(",
"SELECT",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"savings",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T2.balance",
">",
"(",
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"savings",
")",
")"
] | [
"select",
"t2",
".",
"balance",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t1",
".",
"name",
"in",
"(",
"select",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"savings",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t2",
".",
"balance",
">",
"(",
"select",
"avg",
"(",
"balance",
")",
"from",
"savings",
")",
")"
] | [
"Find",
"the",
"checking",
"balance",
"of",
"the",
"accounts",
"whose",
"savings",
"balance",
"is",
"higher",
"than",
"the",
"average",
"savings",
"balance",
"."
] |
small_bank_1 | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT avg(balance) FROM savings)) | What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance? | [
"SELECT",
"T2.balance",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T1.name",
"IN",
"(",
"SELECT",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"savings",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"WHERE",
"T2.balance",
">",
"(",
"SELECT",
"avg",
"(",
"balance",
")",
"FROM",
"savings",
")",
")"
] | [
"select",
"t2",
".",
"balance",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t1",
".",
"name",
"in",
"(",
"select",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"savings",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"where",
"t2",
".",
"balance",
">",
"(",
"select",
"avg",
"(",
"balance",
")",
"from",
"savings",
")",
")"
] | [
"What",
"are",
"the",
"balances",
"of",
"checking",
"accounts",
"belonging",
"to",
"people",
"with",
"savings",
"balances",
"greater",
"than",
"the",
"average",
"savings",
"balance",
"?"
] |
small_bank_1 | SELECT name FROM accounts ORDER BY name | List all customers’ names in the alphabetical order. | [
"SELECT",
"name",
"FROM",
"accounts",
"ORDER",
"BY",
"name"
] | [
"select",
"name",
"from",
"accounts",
"order",
"by",
"name"
] | [
"List",
"all",
"customers’",
"names",
"in",
"the",
"alphabetical",
"order",
"."
] |
small_bank_1 | SELECT name FROM accounts ORDER BY name | What are the names of all the customers in alphabetical order? | [
"SELECT",
"name",
"FROM",
"accounts",
"ORDER",
"BY",
"name"
] | [
"select",
"name",
"from",
"accounts",
"order",
"by",
"name"
] | [
"What",
"are",
"the",
"names",
"of",
"all",
"the",
"customers",
"in",
"alphabetical",
"order",
"?"
] |
small_bank_1 | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1 | Find the name of account that has the lowest total checking and saving balance. | [
"SELECT",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"JOIN",
"savings",
"AS",
"T3",
"ON",
"T1.custid",
"=",
"T3.custid",
"ORDER",
"BY",
"T2.balance",
"+",
"T3.balance",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"join",
"savings",
"as",
"t3",
"on",
"t1",
".",
"custid",
"=",
"t3",
".",
"custid",
"order",
"by",
"t2",
".",
"balance",
"+",
"t3",
".",
"balance",
"limit",
"value"
] | [
"Find",
"the",
"name",
"of",
"account",
"that",
"has",
"the",
"lowest",
"total",
"checking",
"and",
"saving",
"balance",
"."
] |
small_bank_1 | SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance LIMIT 1 | What is the name corresponding to the accoung with the lowest sum of checking and savings balances? | [
"SELECT",
"T1.name",
"FROM",
"accounts",
"AS",
"T1",
"JOIN",
"checking",
"AS",
"T2",
"ON",
"T1.custid",
"=",
"T2.custid",
"JOIN",
"savings",
"AS",
"T3",
"ON",
"T1.custid",
"=",
"T3.custid",
"ORDER",
"BY",
"T2.balance",
"+",
"T3.balance",
"LIMIT",
"1"
] | [
"select",
"t1",
".",
"name",
"from",
"accounts",
"as",
"t1",
"join",
"checking",
"as",
"t2",
"on",
"t1",
".",
"custid",
"=",
"t2",
".",
"custid",
"join",
"savings",
"as",
"t3",
"on",
"t1",
".",
"custid",
"=",
"t3",
".",
"custid",
"order",
"by",
"t2",
".",
"balance",
"+",
"t3",
".",
"balance",
"limit",
"value"
] | [
"What",
"is",
"the",
"name",
"corresponding",
"to",
"the",
"accoung",
"with",
"the",
"lowest",
"sum",
"of",
"checking",
"and",
"savings",
"balances",
"?"
] |