db_id
stringlengths 4
31
| query
stringlengths 18
577
| question
stringlengths 16
224
| query_toks
listlengths 4
90
| query_toks_no_value
listlengths 4
125
| question_toks
listlengths 4
44
|
---|---|---|---|---|---|
icfp_1
|
SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1
|
Retrieve the country that has published the most papers.
|
[
"SELECT",
"t1.country",
"FROM",
"inst",
"AS",
"t1",
"JOIN",
"authorship",
"AS",
"t2",
"ON",
"t1.instid",
"=",
"t2.instid",
"JOIN",
"papers",
"AS",
"t3",
"ON",
"t2.paperid",
"=",
"t3.paperid",
"GROUP",
"BY",
"t1.country",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"country",
"from",
"inst",
"as",
"t1",
"join",
"authorship",
"as",
"t2",
"on",
"t1",
".",
"instid",
"=",
"t2",
".",
"instid",
"join",
"papers",
"as",
"t3",
"on",
"t2",
".",
"paperid",
"=",
"t3",
".",
"paperid",
"group",
"by",
"t1",
".",
"country",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Retrieve",
"the",
"country",
"that",
"has",
"published",
"the",
"most",
"papers",
"."
] |
icfp_1
|
SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1
|
Find the country that the most papers are affiliated with.
|
[
"SELECT",
"t1.country",
"FROM",
"inst",
"AS",
"t1",
"JOIN",
"authorship",
"AS",
"t2",
"ON",
"t1.instid",
"=",
"t2.instid",
"JOIN",
"papers",
"AS",
"t3",
"ON",
"t2.paperid",
"=",
"t3.paperid",
"GROUP",
"BY",
"t1.country",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"country",
"from",
"inst",
"as",
"t1",
"join",
"authorship",
"as",
"t2",
"on",
"t1",
".",
"instid",
"=",
"t2",
".",
"instid",
"join",
"papers",
"as",
"t3",
"on",
"t2",
".",
"paperid",
"=",
"t3",
".",
"paperid",
"group",
"by",
"t1",
".",
"country",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Find",
"the",
"country",
"that",
"the",
"most",
"papers",
"are",
"affiliated",
"with",
"."
] |
icfp_1
|
SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
|
Find the name of the organization that has published the largest number of papers.
|
[
"SELECT",
"t1.name",
"FROM",
"inst",
"AS",
"t1",
"JOIN",
"authorship",
"AS",
"t2",
"ON",
"t1.instid",
"=",
"t2.instid",
"JOIN",
"papers",
"AS",
"t3",
"ON",
"t2.paperid",
"=",
"t3.paperid",
"GROUP",
"BY",
"t1.name",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"name",
"from",
"inst",
"as",
"t1",
"join",
"authorship",
"as",
"t2",
"on",
"t1",
".",
"instid",
"=",
"t2",
".",
"instid",
"join",
"papers",
"as",
"t3",
"on",
"t2",
".",
"paperid",
"=",
"t3",
".",
"paperid",
"group",
"by",
"t1",
".",
"name",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Find",
"the",
"name",
"of",
"the",
"organization",
"that",
"has",
"published",
"the",
"largest",
"number",
"of",
"papers",
"."
] |
icfp_1
|
SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
|
Which institution has the most papers? Find the name of the institution.
|
[
"SELECT",
"t1.name",
"FROM",
"inst",
"AS",
"t1",
"JOIN",
"authorship",
"AS",
"t2",
"ON",
"t1.instid",
"=",
"t2.instid",
"JOIN",
"papers",
"AS",
"t3",
"ON",
"t2.paperid",
"=",
"t3.paperid",
"GROUP",
"BY",
"t1.name",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"name",
"from",
"inst",
"as",
"t1",
"join",
"authorship",
"as",
"t2",
"on",
"t1",
".",
"instid",
"=",
"t2",
".",
"instid",
"join",
"papers",
"as",
"t3",
"on",
"t2",
".",
"paperid",
"=",
"t3",
".",
"paperid",
"group",
"by",
"t1",
".",
"name",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"institution",
"has",
"the",
"most",
"papers",
"?",
"Find",
"the",
"name",
"of",
"the",
"institution",
"."
] |
icfp_1
|
SELECT title FROM papers WHERE title LIKE "%ML%"
|
Find the titles of the papers that contain the word "ML".
|
[
"SELECT",
"title",
"FROM",
"papers",
"WHERE",
"title",
"LIKE",
"``",
"%",
"ML",
"%",
"''"
] |
[
"select",
"title",
"from",
"papers",
"where",
"title",
"like",
"value"
] |
[
"Find",
"the",
"titles",
"of",
"the",
"papers",
"that",
"contain",
"the",
"word",
"``",
"ML",
"''",
"."
] |
icfp_1
|
SELECT title FROM papers WHERE title LIKE "%ML%"
|
Which papers have the substring "ML" in their titles? Return the titles of the papers.
|
[
"SELECT",
"title",
"FROM",
"papers",
"WHERE",
"title",
"LIKE",
"``",
"%",
"ML",
"%",
"''"
] |
[
"select",
"title",
"from",
"papers",
"where",
"title",
"like",
"value"
] |
[
"Which",
"papers",
"have",
"the",
"substring",
"``",
"ML",
"''",
"in",
"their",
"titles",
"?",
"Return",
"the",
"titles",
"of",
"the",
"papers",
"."
] |
icfp_1
|
SELECT title FROM papers WHERE title LIKE "%Database%"
|
Which paper's title contains the word "Database"?
|
[
"SELECT",
"title",
"FROM",
"papers",
"WHERE",
"title",
"LIKE",
"``",
"%",
"Database",
"%",
"''"
] |
[
"select",
"title",
"from",
"papers",
"where",
"title",
"like",
"value"
] |
[
"Which",
"paper",
"'s",
"title",
"contains",
"the",
"word",
"``",
"Database",
"''",
"?"
] |
icfp_1
|
SELECT title FROM papers WHERE title LIKE "%Database%"
|
Which papers have the substring "Database" in their titles? Show the titles of the papers.
|
[
"SELECT",
"title",
"FROM",
"papers",
"WHERE",
"title",
"LIKE",
"``",
"%",
"Database",
"%",
"''"
] |
[
"select",
"title",
"from",
"papers",
"where",
"title",
"like",
"value"
] |
[
"Which",
"papers",
"have",
"the",
"substring",
"``",
"Database",
"''",
"in",
"their",
"titles",
"?",
"Show",
"the",
"titles",
"of",
"the",
"papers",
"."
] |
icfp_1
|
SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Functional%"
|
Find the first names of all the authors who have written a paper with title containing the word "Functional".
|
[
"SELECT",
"t1.fname",
"FROM",
"authors",
"AS",
"t1",
"JOIN",
"authorship",
"AS",
"t2",
"ON",
"t1.authid",
"=",
"t2.authid",
"JOIN",
"papers",
"AS",
"t3",
"ON",
"t2.paperid",
"=",
"t3.paperid",
"WHERE",
"t3.title",
"LIKE",
"``",
"%",
"Functional",
"%",
"''"
] |
[
"select",
"t1",
".",
"fname",
"from",
"authors",
"as",
"t1",
"join",
"authorship",
"as",
"t2",
"on",
"t1",
".",
"authid",
"=",
"t2",
".",
"authid",
"join",
"papers",
"as",
"t3",
"on",
"t2",
".",
"paperid",
"=",
"t3",
".",
"paperid",
"where",
"t3",
".",
"title",
"like",
"value"
] |
[
"Find",
"the",
"first",
"names",
"of",
"all",
"the",
"authors",
"who",
"have",
"written",
"a",
"paper",
"with",
"title",
"containing",
"the",
"word",
"``",
"Functional",
"''",
"."
] |
icfp_1
|
SELECT t1.fname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Functional%"
|
Who has written a paper that has the word "Functional" in its title? Return the first names of the authors.
|
[
"SELECT",
"t1.fname",
"FROM",
"authors",
"AS",
"t1",
"JOIN",
"authorship",
"AS",
"t2",
"ON",
"t1.authid",
"=",
"t2.authid",
"JOIN",
"papers",
"AS",
"t3",
"ON",
"t2.paperid",
"=",
"t3.paperid",
"WHERE",
"t3.title",
"LIKE",
"``",
"%",
"Functional",
"%",
"''"
] |
[
"select",
"t1",
".",
"fname",
"from",
"authors",
"as",
"t1",
"join",
"authorship",
"as",
"t2",
"on",
"t1",
".",
"authid",
"=",
"t2",
".",
"authid",
"join",
"papers",
"as",
"t3",
"on",
"t2",
".",
"paperid",
"=",
"t3",
".",
"paperid",
"where",
"t3",
".",
"title",
"like",
"value"
] |
[
"Who",
"has",
"written",
"a",
"paper",
"that",
"has",
"the",
"word",
"``",
"Functional",
"''",
"in",
"its",
"title",
"?",
"Return",
"the",
"first",
"names",
"of",
"the",
"authors",
"."
] |
icfp_1
|
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Monadic%"
|
Find the last names of all the authors that have written a paper with title containing the word "Monadic".
|
[
"SELECT",
"t1.lname",
"FROM",
"authors",
"AS",
"t1",
"JOIN",
"authorship",
"AS",
"t2",
"ON",
"t1.authid",
"=",
"t2.authid",
"JOIN",
"papers",
"AS",
"t3",
"ON",
"t2.paperid",
"=",
"t3.paperid",
"WHERE",
"t3.title",
"LIKE",
"``",
"%",
"Monadic",
"%",
"''"
] |
[
"select",
"t1",
".",
"lname",
"from",
"authors",
"as",
"t1",
"join",
"authorship",
"as",
"t2",
"on",
"t1",
".",
"authid",
"=",
"t2",
".",
"authid",
"join",
"papers",
"as",
"t3",
"on",
"t2",
".",
"paperid",
"=",
"t3",
".",
"paperid",
"where",
"t3",
".",
"title",
"like",
"value"
] |
[
"Find",
"the",
"last",
"names",
"of",
"all",
"the",
"authors",
"that",
"have",
"written",
"a",
"paper",
"with",
"title",
"containing",
"the",
"word",
"``",
"Monadic",
"''",
"."
] |
icfp_1
|
SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid WHERE t3.title LIKE "%Monadic%"
|
Which authors have written a paper with title containing the word "Monadic"? Return their last names.
|
[
"SELECT",
"t1.lname",
"FROM",
"authors",
"AS",
"t1",
"JOIN",
"authorship",
"AS",
"t2",
"ON",
"t1.authid",
"=",
"t2.authid",
"JOIN",
"papers",
"AS",
"t3",
"ON",
"t2.paperid",
"=",
"t3.paperid",
"WHERE",
"t3.title",
"LIKE",
"``",
"%",
"Monadic",
"%",
"''"
] |
[
"select",
"t1",
".",
"lname",
"from",
"authors",
"as",
"t1",
"join",
"authorship",
"as",
"t2",
"on",
"t1",
".",
"authid",
"=",
"t2",
".",
"authid",
"join",
"papers",
"as",
"t3",
"on",
"t2",
".",
"paperid",
"=",
"t3",
".",
"paperid",
"where",
"t3",
".",
"title",
"like",
"value"
] |
[
"Which",
"authors",
"have",
"written",
"a",
"paper",
"with",
"title",
"containing",
"the",
"word",
"``",
"Monadic",
"''",
"?",
"Return",
"their",
"last",
"names",
"."
] |
icfp_1
|
SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT max(authorder) FROM authorship)
|
Retrieve the title of the paper that has the largest number of authors.
|
[
"SELECT",
"t2.title",
"FROM",
"authorship",
"AS",
"t1",
"JOIN",
"papers",
"AS",
"t2",
"ON",
"t1.paperid",
"=",
"t2.paperid",
"WHERE",
"t1.authorder",
"=",
"(",
"SELECT",
"max",
"(",
"authorder",
")",
"FROM",
"authorship",
")"
] |
[
"select",
"t2",
".",
"title",
"from",
"authorship",
"as",
"t1",
"join",
"papers",
"as",
"t2",
"on",
"t1",
".",
"paperid",
"=",
"t2",
".",
"paperid",
"where",
"t1",
".",
"authorder",
"=",
"(",
"select",
"max",
"(",
"authorder",
")",
"from",
"authorship",
")"
] |
[
"Retrieve",
"the",
"title",
"of",
"the",
"paper",
"that",
"has",
"the",
"largest",
"number",
"of",
"authors",
"."
] |
icfp_1
|
SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT max(authorder) FROM authorship)
|
Which paper has the most authors? Give me the paper title.
|
[
"SELECT",
"t2.title",
"FROM",
"authorship",
"AS",
"t1",
"JOIN",
"papers",
"AS",
"t2",
"ON",
"t1.paperid",
"=",
"t2.paperid",
"WHERE",
"t1.authorder",
"=",
"(",
"SELECT",
"max",
"(",
"authorder",
")",
"FROM",
"authorship",
")"
] |
[
"select",
"t2",
".",
"title",
"from",
"authorship",
"as",
"t1",
"join",
"papers",
"as",
"t2",
"on",
"t1",
".",
"paperid",
"=",
"t2",
".",
"paperid",
"where",
"t1",
".",
"authorder",
"=",
"(",
"select",
"max",
"(",
"authorder",
")",
"from",
"authorship",
")"
] |
[
"Which",
"paper",
"has",
"the",
"most",
"authors",
"?",
"Give",
"me",
"the",
"paper",
"title",
"."
] |
icfp_1
|
SELECT fname FROM authors WHERE lname = "Ueno"
|
What is the first name of the author with last name "Ueno"?
|
[
"SELECT",
"fname",
"FROM",
"authors",
"WHERE",
"lname",
"=",
"``",
"Ueno",
"''"
] |
[
"select",
"fname",
"from",
"authors",
"where",
"lname",
"=",
"value"
] |
[
"What",
"is",
"the",
"first",
"name",
"of",
"the",
"author",
"with",
"last",
"name",
"``",
"Ueno",
"''",
"?"
] |
icfp_1
|
SELECT fname FROM authors WHERE lname = "Ueno"
|
Which authors have last name "Ueno"? List their first names.
|
[
"SELECT",
"fname",
"FROM",
"authors",
"WHERE",
"lname",
"=",
"``",
"Ueno",
"''"
] |
[
"select",
"fname",
"from",
"authors",
"where",
"lname",
"=",
"value"
] |
[
"Which",
"authors",
"have",
"last",
"name",
"``",
"Ueno",
"''",
"?",
"List",
"their",
"first",
"names",
"."
] |
icfp_1
|
SELECT lname FROM authors WHERE fname = "Amal"
|
Find the last name of the author with first name "Amal".
|
[
"SELECT",
"lname",
"FROM",
"authors",
"WHERE",
"fname",
"=",
"``",
"Amal",
"''"
] |
[
"select",
"lname",
"from",
"authors",
"where",
"fname",
"=",
"value"
] |
[
"Find",
"the",
"last",
"name",
"of",
"the",
"author",
"with",
"first",
"name",
"``",
"Amal",
"''",
"."
] |
icfp_1
|
SELECT lname FROM authors WHERE fname = "Amal"
|
Which authors have first name "Amal"? List their last names.
|
[
"SELECT",
"lname",
"FROM",
"authors",
"WHERE",
"fname",
"=",
"``",
"Amal",
"''"
] |
[
"select",
"lname",
"from",
"authors",
"where",
"fname",
"=",
"value"
] |
[
"Which",
"authors",
"have",
"first",
"name",
"``",
"Amal",
"''",
"?",
"List",
"their",
"last",
"names",
"."
] |
icfp_1
|
SELECT fname FROM authors ORDER BY fname
|
Find the first names of all the authors ordered in alphabetical order.
|
[
"SELECT",
"fname",
"FROM",
"authors",
"ORDER",
"BY",
"fname"
] |
[
"select",
"fname",
"from",
"authors",
"order",
"by",
"fname"
] |
[
"Find",
"the",
"first",
"names",
"of",
"all",
"the",
"authors",
"ordered",
"in",
"alphabetical",
"order",
"."
] |
icfp_1
|
SELECT fname FROM authors ORDER BY fname
|
Sort the first names of all the authors in alphabetical order.
|
[
"SELECT",
"fname",
"FROM",
"authors",
"ORDER",
"BY",
"fname"
] |
[
"select",
"fname",
"from",
"authors",
"order",
"by",
"fname"
] |
[
"Sort",
"the",
"first",
"names",
"of",
"all",
"the",
"authors",
"in",
"alphabetical",
"order",
"."
] |
icfp_1
|
SELECT lname FROM authors ORDER BY lname
|
Retrieve all the last names of authors in alphabetical order.
|
[
"SELECT",
"lname",
"FROM",
"authors",
"ORDER",
"BY",
"lname"
] |
[
"select",
"lname",
"from",
"authors",
"order",
"by",
"lname"
] |
[
"Retrieve",
"all",
"the",
"last",
"names",
"of",
"authors",
"in",
"alphabetical",
"order",
"."
] |
icfp_1
|
SELECT lname FROM authors ORDER BY lname
|
Give me a list of all the last names of authors sorted in alphabetical order
|
[
"SELECT",
"lname",
"FROM",
"authors",
"ORDER",
"BY",
"lname"
] |
[
"select",
"lname",
"from",
"authors",
"order",
"by",
"lname"
] |
[
"Give",
"me",
"a",
"list",
"of",
"all",
"the",
"last",
"names",
"of",
"authors",
"sorted",
"in",
"alphabetical",
"order"
] |
icfp_1
|
SELECT fname , lname FROM authors ORDER BY lname
|
Retrieve all the first and last names of authors in the alphabetical order of last names.
|
[
"SELECT",
"fname",
",",
"lname",
"FROM",
"authors",
"ORDER",
"BY",
"lname"
] |
[
"select",
"fname",
",",
"lname",
"from",
"authors",
"order",
"by",
"lname"
] |
[
"Retrieve",
"all",
"the",
"first",
"and",
"last",
"names",
"of",
"authors",
"in",
"the",
"alphabetical",
"order",
"of",
"last",
"names",
"."
] |
icfp_1
|
SELECT fname , lname FROM authors ORDER BY lname
|
Sort the list of all the first and last names of authors in alphabetical order of the last names.
|
[
"SELECT",
"fname",
",",
"lname",
"FROM",
"authors",
"ORDER",
"BY",
"lname"
] |
[
"select",
"fname",
",",
"lname",
"from",
"authors",
"order",
"by",
"lname"
] |
[
"Sort",
"the",
"list",
"of",
"all",
"the",
"first",
"and",
"last",
"names",
"of",
"authors",
"in",
"alphabetical",
"order",
"of",
"the",
"last",
"names",
"."
] |
sakila_1
|
SELECT count(DISTINCT last_name) FROM actor
|
How many different last names do the actors and actresses have?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"last_name",
")",
"FROM",
"actor"
] |
[
"select",
"count",
"(",
"distinct",
"last_name",
")",
"from",
"actor"
] |
[
"How",
"many",
"different",
"last",
"names",
"do",
"the",
"actors",
"and",
"actresses",
"have",
"?"
] |
sakila_1
|
SELECT count(DISTINCT last_name) FROM actor
|
Count the number of different last names actors have.
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"last_name",
")",
"FROM",
"actor"
] |
[
"select",
"count",
"(",
"distinct",
"last_name",
")",
"from",
"actor"
] |
[
"Count",
"the",
"number",
"of",
"different",
"last",
"names",
"actors",
"have",
"."
] |
sakila_1
|
SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1
|
What is the most popular first name of the actors?
|
[
"SELECT",
"first_name",
"FROM",
"actor",
"GROUP",
"BY",
"first_name",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"first_name",
"from",
"actor",
"group",
"by",
"first_name",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What",
"is",
"the",
"most",
"popular",
"first",
"name",
"of",
"the",
"actors",
"?"
] |
sakila_1
|
SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1
|
Return the most common first name among all actors.
|
[
"SELECT",
"first_name",
"FROM",
"actor",
"GROUP",
"BY",
"first_name",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"first_name",
"from",
"actor",
"group",
"by",
"first_name",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Return",
"the",
"most",
"common",
"first",
"name",
"among",
"all",
"actors",
"."
] |
sakila_1
|
SELECT first_name , last_name FROM actor GROUP BY first_name , last_name ORDER BY count(*) DESC LIMIT 1
|
What is the most popular full name of the actors?
|
[
"SELECT",
"first_name",
",",
"last_name",
"FROM",
"actor",
"GROUP",
"BY",
"first_name",
",",
"last_name",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"first_name",
",",
"last_name",
"from",
"actor",
"group",
"by",
"first_name",
",",
"last_name",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What",
"is",
"the",
"most",
"popular",
"full",
"name",
"of",
"the",
"actors",
"?"
] |
sakila_1
|
SELECT first_name , last_name FROM actor GROUP BY first_name , last_name ORDER BY count(*) DESC LIMIT 1
|
Return the most common full name among all actors.
|
[
"SELECT",
"first_name",
",",
"last_name",
"FROM",
"actor",
"GROUP",
"BY",
"first_name",
",",
"last_name",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"first_name",
",",
"last_name",
"from",
"actor",
"group",
"by",
"first_name",
",",
"last_name",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Return",
"the",
"most",
"common",
"full",
"name",
"among",
"all",
"actors",
"."
] |
sakila_1
|
SELECT district FROM address GROUP BY district HAVING count(*) >= 2
|
Which districts have at least two addresses?
|
[
"SELECT",
"district",
"FROM",
"address",
"GROUP",
"BY",
"district",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2"
] |
[
"select",
"district",
"from",
"address",
"group",
"by",
"district",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] |
[
"Which",
"districts",
"have",
"at",
"least",
"two",
"addresses",
"?"
] |
sakila_1
|
SELECT district FROM address GROUP BY district HAVING count(*) >= 2
|
Give the districts which have two or more addresses.
|
[
"SELECT",
"district",
"FROM",
"address",
"GROUP",
"BY",
"district",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2"
] |
[
"select",
"district",
"from",
"address",
"group",
"by",
"district",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] |
[
"Give",
"the",
"districts",
"which",
"have",
"two",
"or",
"more",
"addresses",
"."
] |
sakila_1
|
SELECT phone , postal_code FROM address WHERE address = '1031 Daugavpils Parkway'
|
What is the phone number and postal code of the address 1031 Daugavpils Parkway?
|
[
"SELECT",
"phone",
",",
"postal_code",
"FROM",
"address",
"WHERE",
"address",
"=",
"'1031",
"Daugavpils",
"Parkway",
"'"
] |
[
"select",
"phone",
",",
"postal_code",
"from",
"address",
"where",
"address",
"=",
"value"
] |
[
"What",
"is",
"the",
"phone",
"number",
"and",
"postal",
"code",
"of",
"the",
"address",
"1031",
"Daugavpils",
"Parkway",
"?"
] |
sakila_1
|
SELECT phone , postal_code FROM address WHERE address = '1031 Daugavpils Parkway'
|
Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.
|
[
"SELECT",
"phone",
",",
"postal_code",
"FROM",
"address",
"WHERE",
"address",
"=",
"'1031",
"Daugavpils",
"Parkway",
"'"
] |
[
"select",
"phone",
",",
"postal_code",
"from",
"address",
"where",
"address",
"=",
"value"
] |
[
"Give",
"the",
"phone",
"and",
"postal",
"code",
"corresponding",
"to",
"the",
"address",
"'1031",
"Daugavpils",
"Parkway",
"'",
"."
] |
sakila_1
|
SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1
|
Which city has the most addresses? List the city name, number of addresses, and city id.
|
[
"SELECT",
"T2.city",
",",
"count",
"(",
"*",
")",
",",
"T1.city_id",
"FROM",
"address",
"AS",
"T1",
"JOIN",
"city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"GROUP",
"BY",
"T1.city_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t2",
".",
"city",
",",
"count",
"(",
"*",
")",
",",
"t1",
".",
"city_id",
"from",
"address",
"as",
"t1",
"join",
"city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"group",
"by",
"t1",
".",
"city_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"city",
"has",
"the",
"most",
"addresses",
"?",
"List",
"the",
"city",
"name",
",",
"number",
"of",
"addresses",
",",
"and",
"city",
"id",
"."
] |
sakila_1
|
SELECT T2.city , count(*) , T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id = T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1
|
What are the city name, id, and number of addresses corresponding to the city with the most addressed?
|
[
"SELECT",
"T2.city",
",",
"count",
"(",
"*",
")",
",",
"T1.city_id",
"FROM",
"address",
"AS",
"T1",
"JOIN",
"city",
"AS",
"T2",
"ON",
"T1.city_id",
"=",
"T2.city_id",
"GROUP",
"BY",
"T1.city_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t2",
".",
"city",
",",
"count",
"(",
"*",
")",
",",
"t1",
".",
"city_id",
"from",
"address",
"as",
"t1",
"join",
"city",
"as",
"t2",
"on",
"t1",
".",
"city_id",
"=",
"t2",
".",
"city_id",
"group",
"by",
"t1",
".",
"city_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What",
"are",
"the",
"city",
"name",
",",
"id",
",",
"and",
"number",
"of",
"addresses",
"corresponding",
"to",
"the",
"city",
"with",
"the",
"most",
"addressed",
"?"
] |
sakila_1
|
SELECT count(*) FROM address WHERE district = 'California'
|
How many addresses are in the district of California?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"address",
"WHERE",
"district",
"=",
"'California",
"'"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"address",
"where",
"district",
"=",
"value"
] |
[
"How",
"many",
"addresses",
"are",
"in",
"the",
"district",
"of",
"California",
"?"
] |
sakila_1
|
SELECT count(*) FROM address WHERE district = 'California'
|
Count the number of addressed in the California district.
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"address",
"WHERE",
"district",
"=",
"'California",
"'"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"address",
"where",
"district",
"=",
"value"
] |
[
"Count",
"the",
"number",
"of",
"addressed",
"in",
"the",
"California",
"district",
"."
] |
sakila_1
|
SELECT title , film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING count(*) < 3
|
Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.
|
[
"SELECT",
"title",
",",
"film_id",
"FROM",
"film",
"WHERE",
"rental_rate",
"=",
"0.99",
"INTERSECT",
"SELECT",
"T1.title",
",",
"T1.film_id",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"inventory",
"AS",
"T2",
"ON",
"T1.film_id",
"=",
"T2.film_id",
"GROUP",
"BY",
"T1.film_id",
"HAVING",
"count",
"(",
"*",
")",
"<",
"3"
] |
[
"select",
"title",
",",
"film_id",
"from",
"film",
"where",
"rental_rate",
"=",
"value",
"intersect",
"select",
"t1",
".",
"title",
",",
"t1",
".",
"film_id",
"from",
"film",
"as",
"t1",
"join",
"inventory",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"group",
"by",
"t1",
".",
"film_id",
"having",
"count",
"(",
"*",
")",
"<",
"value"
] |
[
"Which",
"film",
"is",
"rented",
"at",
"a",
"fee",
"of",
"0.99",
"and",
"has",
"less",
"than",
"3",
"in",
"the",
"inventory",
"?",
"List",
"the",
"film",
"title",
"and",
"id",
"."
] |
sakila_1
|
SELECT title , film_id FROM film WHERE rental_rate = 0.99 INTERSECT SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id HAVING count(*) < 3
|
What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?
|
[
"SELECT",
"title",
",",
"film_id",
"FROM",
"film",
"WHERE",
"rental_rate",
"=",
"0.99",
"INTERSECT",
"SELECT",
"T1.title",
",",
"T1.film_id",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"inventory",
"AS",
"T2",
"ON",
"T1.film_id",
"=",
"T2.film_id",
"GROUP",
"BY",
"T1.film_id",
"HAVING",
"count",
"(",
"*",
")",
"<",
"3"
] |
[
"select",
"title",
",",
"film_id",
"from",
"film",
"where",
"rental_rate",
"=",
"value",
"intersect",
"select",
"t1",
".",
"title",
",",
"t1",
".",
"film_id",
"from",
"film",
"as",
"t1",
"join",
"inventory",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"group",
"by",
"t1",
".",
"film_id",
"having",
"count",
"(",
"*",
")",
"<",
"value"
] |
[
"What",
"are",
"the",
"title",
"and",
"id",
"of",
"the",
"film",
"which",
"has",
"a",
"rental",
"rate",
"of",
"0.99",
"and",
"an",
"inventory",
"of",
"below",
"3",
"?"
] |
sakila_1
|
SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'
|
How many cities are in Australia?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"country",
"AS",
"T2",
"ON",
"T1.country_id",
"=",
"T2.country_id",
"WHERE",
"T2.country",
"=",
"'Australia",
"'"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"city",
"as",
"t1",
"join",
"country",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id",
"where",
"t2",
".",
"country",
"=",
"value"
] |
[
"How",
"many",
"cities",
"are",
"in",
"Australia",
"?"
] |
sakila_1
|
SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id WHERE T2.country = 'Australia'
|
Count the number of cities in Australia.
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"country",
"AS",
"T2",
"ON",
"T1.country_id",
"=",
"T2.country_id",
"WHERE",
"T2.country",
"=",
"'Australia",
"'"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"city",
"as",
"t1",
"join",
"country",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id",
"where",
"t2",
".",
"country",
"=",
"value"
] |
[
"Count",
"the",
"number",
"of",
"cities",
"in",
"Australia",
"."
] |
sakila_1
|
SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING count(*) >= 3
|
Which countries have at least 3 cities?
|
[
"SELECT",
"T2.country",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"country",
"AS",
"T2",
"ON",
"T1.country_id",
"=",
"T2.country_id",
"GROUP",
"BY",
"T2.country_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"3"
] |
[
"select",
"t2",
".",
"country",
"from",
"city",
"as",
"t1",
"join",
"country",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id",
"group",
"by",
"t2",
".",
"country_id",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] |
[
"Which",
"countries",
"have",
"at",
"least",
"3",
"cities",
"?"
] |
sakila_1
|
SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id = T2.country_id GROUP BY T2.country_id HAVING count(*) >= 3
|
What are the countries that contain 3 or more cities?
|
[
"SELECT",
"T2.country",
"FROM",
"city",
"AS",
"T1",
"JOIN",
"country",
"AS",
"T2",
"ON",
"T1.country_id",
"=",
"T2.country_id",
"GROUP",
"BY",
"T2.country_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"3"
] |
[
"select",
"t2",
".",
"country",
"from",
"city",
"as",
"t1",
"join",
"country",
"as",
"t2",
"on",
"t1",
".",
"country_id",
"=",
"t2",
".",
"country_id",
"group",
"by",
"t2",
".",
"country_id",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] |
[
"What",
"are",
"the",
"countries",
"that",
"contain",
"3",
"or",
"more",
"cities",
"?"
] |
sakila_1
|
SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'
|
Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.
|
[
"SELECT",
"payment_date",
"FROM",
"payment",
"WHERE",
"amount",
">",
"10",
"UNION",
"SELECT",
"T1.payment_date",
"FROM",
"payment",
"AS",
"T1",
"JOIN",
"staff",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.first_name",
"=",
"'Elsa",
"'"
] |
[
"select",
"payment_date",
"from",
"payment",
"where",
"amount",
">",
"value",
"union",
"select",
"t1",
".",
"payment_date",
"from",
"payment",
"as",
"t1",
"join",
"staff",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"first_name",
"=",
"value"
] |
[
"Find",
"all",
"the",
"payment",
"dates",
"for",
"the",
"payments",
"with",
"an",
"amount",
"larger",
"than",
"10",
"and",
"the",
"payments",
"handled",
"by",
"a",
"staff",
"person",
"with",
"the",
"first",
"name",
"Elsa",
"."
] |
sakila_1
|
SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa'
|
What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?
|
[
"SELECT",
"payment_date",
"FROM",
"payment",
"WHERE",
"amount",
">",
"10",
"UNION",
"SELECT",
"T1.payment_date",
"FROM",
"payment",
"AS",
"T1",
"JOIN",
"staff",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.first_name",
"=",
"'Elsa",
"'"
] |
[
"select",
"payment_date",
"from",
"payment",
"where",
"amount",
">",
"value",
"union",
"select",
"t1",
".",
"payment_date",
"from",
"payment",
"as",
"t1",
"join",
"staff",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"first_name",
"=",
"value"
] |
[
"What",
"are",
"the",
"payment",
"dates",
"for",
"any",
"payments",
"that",
"have",
"an",
"amount",
"greater",
"than",
"10",
"or",
"were",
"handled",
"by",
"a",
"staff",
"member",
"with",
"the",
"first",
"name",
"Elsa",
"?"
] |
sakila_1
|
SELECT count(*) FROM customer WHERE active = '1'
|
How many customers have an active value of 1?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"customer",
"WHERE",
"active",
"=",
"'1",
"'"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"customer",
"where",
"active",
"=",
"value"
] |
[
"How",
"many",
"customers",
"have",
"an",
"active",
"value",
"of",
"1",
"?"
] |
sakila_1
|
SELECT count(*) FROM customer WHERE active = '1'
|
Count the number of customers who are active.
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"customer",
"WHERE",
"active",
"=",
"'1",
"'"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"customer",
"where",
"active",
"=",
"value"
] |
[
"Count",
"the",
"number",
"of",
"customers",
"who",
"are",
"active",
"."
] |
sakila_1
|
SELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
|
Which film has the highest rental rate? And what is the rate?
|
[
"SELECT",
"title",
",",
"rental_rate",
"FROM",
"film",
"ORDER",
"BY",
"rental_rate",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"title",
",",
"rental_rate",
"from",
"film",
"order",
"by",
"rental_rate",
"desc",
"limit",
"value"
] |
[
"Which",
"film",
"has",
"the",
"highest",
"rental",
"rate",
"?",
"And",
"what",
"is",
"the",
"rate",
"?"
] |
sakila_1
|
SELECT title , rental_rate FROM film ORDER BY rental_rate DESC LIMIT 1
|
What are the title and rental rate of the film with the highest rental rate?
|
[
"SELECT",
"title",
",",
"rental_rate",
"FROM",
"film",
"ORDER",
"BY",
"rental_rate",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"title",
",",
"rental_rate",
"from",
"film",
"order",
"by",
"rental_rate",
"desc",
"limit",
"value"
] |
[
"What",
"are",
"the",
"title",
"and",
"rental",
"rate",
"of",
"the",
"film",
"with",
"the",
"highest",
"rental",
"rate",
"?"
] |
sakila_1
|
SELECT T2.title , T2.film_id , T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1
|
Which film has the most number of actors or actresses? List the film name, film id and description.
|
[
"SELECT",
"T2.title",
",",
"T2.film_id",
",",
"T2.description",
"FROM",
"film_actor",
"AS",
"T1",
"JOIN",
"film",
"AS",
"T2",
"ON",
"T1.film_id",
"=",
"T2.film_id",
"GROUP",
"BY",
"T2.film_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t2",
".",
"title",
",",
"t2",
".",
"film_id",
",",
"t2",
".",
"description",
"from",
"film_actor",
"as",
"t1",
"join",
"film",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"group",
"by",
"t2",
".",
"film_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"film",
"has",
"the",
"most",
"number",
"of",
"actors",
"or",
"actresses",
"?",
"List",
"the",
"film",
"name",
",",
"film",
"id",
"and",
"description",
"."
] |
sakila_1
|
SELECT T2.title , T2.film_id , T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1
|
What are the title, id, and description of the movie with the greatest number of actors?
|
[
"SELECT",
"T2.title",
",",
"T2.film_id",
",",
"T2.description",
"FROM",
"film_actor",
"AS",
"T1",
"JOIN",
"film",
"AS",
"T2",
"ON",
"T1.film_id",
"=",
"T2.film_id",
"GROUP",
"BY",
"T2.film_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t2",
".",
"title",
",",
"t2",
".",
"film_id",
",",
"t2",
".",
"description",
"from",
"film_actor",
"as",
"t1",
"join",
"film",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"group",
"by",
"t2",
".",
"film_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What",
"are",
"the",
"title",
",",
"id",
",",
"and",
"description",
"of",
"the",
"movie",
"with",
"the",
"greatest",
"number",
"of",
"actors",
"?"
] |
sakila_1
|
SELECT T2.first_name , T2.last_name , T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY count(*) DESC LIMIT 1
|
Which film actor (actress) starred the most films? List his or her first name, last name and actor id.
|
[
"SELECT",
"T2.first_name",
",",
"T2.last_name",
",",
"T2.actor_id",
"FROM",
"film_actor",
"AS",
"T1",
"JOIN",
"actor",
"AS",
"T2",
"ON",
"T1.actor_id",
"=",
"T2.actor_id",
"GROUP",
"BY",
"T2.actor_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t2",
".",
"first_name",
",",
"t2",
".",
"last_name",
",",
"t2",
".",
"actor_id",
"from",
"film_actor",
"as",
"t1",
"join",
"actor",
"as",
"t2",
"on",
"t1",
".",
"actor_id",
"=",
"t2",
".",
"actor_id",
"group",
"by",
"t2",
".",
"actor_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"film",
"actor",
"(",
"actress",
")",
"starred",
"the",
"most",
"films",
"?",
"List",
"his",
"or",
"her",
"first",
"name",
",",
"last",
"name",
"and",
"actor",
"id",
"."
] |
sakila_1
|
SELECT T2.first_name , T2.last_name , T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id ORDER BY count(*) DESC LIMIT 1
|
Return the full name and id of the actor or actress who starred in the greatest number of films.
|
[
"SELECT",
"T2.first_name",
",",
"T2.last_name",
",",
"T2.actor_id",
"FROM",
"film_actor",
"AS",
"T1",
"JOIN",
"actor",
"AS",
"T2",
"ON",
"T1.actor_id",
"=",
"T2.actor_id",
"GROUP",
"BY",
"T2.actor_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t2",
".",
"first_name",
",",
"t2",
".",
"last_name",
",",
"t2",
".",
"actor_id",
"from",
"film_actor",
"as",
"t1",
"join",
"actor",
"as",
"t2",
"on",
"t1",
".",
"actor_id",
"=",
"t2",
".",
"actor_id",
"group",
"by",
"t2",
".",
"actor_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Return",
"the",
"full",
"name",
"and",
"id",
"of",
"the",
"actor",
"or",
"actress",
"who",
"starred",
"in",
"the",
"greatest",
"number",
"of",
"films",
"."
] |
sakila_1
|
SELECT T2.first_name , T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING count(*) > 30
|
Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.
|
[
"SELECT",
"T2.first_name",
",",
"T2.last_name",
"FROM",
"film_actor",
"AS",
"T1",
"JOIN",
"actor",
"AS",
"T2",
"ON",
"T1.actor_id",
"=",
"T2.actor_id",
"GROUP",
"BY",
"T2.actor_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"30"
] |
[
"select",
"t2",
".",
"first_name",
",",
"t2",
".",
"last_name",
"from",
"film_actor",
"as",
"t1",
"join",
"actor",
"as",
"t2",
"on",
"t1",
".",
"actor_id",
"=",
"t2",
".",
"actor_id",
"group",
"by",
"t2",
".",
"actor_id",
"having",
"count",
"(",
"*",
")",
">",
"value"
] |
[
"Which",
"film",
"actors",
"(",
"actresses",
")",
"played",
"a",
"role",
"in",
"more",
"than",
"30",
"films",
"?",
"List",
"his",
"or",
"her",
"first",
"name",
"and",
"last",
"name",
"."
] |
sakila_1
|
SELECT T2.first_name , T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.actor_id HAVING count(*) > 30
|
What are the full names of actors who had roles in more than 30 films?
|
[
"SELECT",
"T2.first_name",
",",
"T2.last_name",
"FROM",
"film_actor",
"AS",
"T1",
"JOIN",
"actor",
"AS",
"T2",
"ON",
"T1.actor_id",
"=",
"T2.actor_id",
"GROUP",
"BY",
"T2.actor_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"30"
] |
[
"select",
"t2",
".",
"first_name",
",",
"t2",
".",
"last_name",
"from",
"film_actor",
"as",
"t1",
"join",
"actor",
"as",
"t2",
"on",
"t1",
".",
"actor_id",
"=",
"t2",
".",
"actor_id",
"group",
"by",
"t2",
".",
"actor_id",
"having",
"count",
"(",
"*",
")",
">",
"value"
] |
[
"What",
"are",
"the",
"full",
"names",
"of",
"actors",
"who",
"had",
"roles",
"in",
"more",
"than",
"30",
"films",
"?"
] |
sakila_1
|
SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1
|
Which store owns most items?
|
[
"SELECT",
"store_id",
"FROM",
"inventory",
"GROUP",
"BY",
"store_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"store_id",
"from",
"inventory",
"group",
"by",
"store_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"store",
"owns",
"most",
"items",
"?"
] |
sakila_1
|
SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1
|
What is the id of the store that has the most items in inventory?
|
[
"SELECT",
"store_id",
"FROM",
"inventory",
"GROUP",
"BY",
"store_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"store_id",
"from",
"inventory",
"group",
"by",
"store_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What",
"is",
"the",
"id",
"of",
"the",
"store",
"that",
"has",
"the",
"most",
"items",
"in",
"inventory",
"?"
] |
sakila_1
|
SELECT sum(amount) FROM payment
|
What is the total amount of all payments?
|
[
"SELECT",
"sum",
"(",
"amount",
")",
"FROM",
"payment"
] |
[
"select",
"sum",
"(",
"amount",
")",
"from",
"payment"
] |
[
"What",
"is",
"the",
"total",
"amount",
"of",
"all",
"payments",
"?"
] |
sakila_1
|
SELECT sum(amount) FROM payment
|
Return the sum of all payment amounts.
|
[
"SELECT",
"sum",
"(",
"amount",
")",
"FROM",
"payment"
] |
[
"select",
"sum",
"(",
"amount",
")",
"from",
"payment"
] |
[
"Return",
"the",
"sum",
"of",
"all",
"payment",
"amounts",
"."
] |
sakila_1
|
SELECT T1.first_name , T1.last_name , T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1
|
Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id.
|
[
"SELECT",
"T1.first_name",
",",
"T1.last_name",
",",
"T1.customer_id",
"FROM",
"customer",
"AS",
"T1",
"JOIN",
"payment",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"GROUP",
"BY",
"T1.customer_id",
"ORDER",
"BY",
"sum",
"(",
"amount",
")",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"first_name",
",",
"t1",
".",
"last_name",
",",
"t1",
".",
"customer_id",
"from",
"customer",
"as",
"t1",
"join",
"payment",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"group",
"by",
"t1",
".",
"customer_id",
"order",
"by",
"sum",
"(",
"amount",
")",
"asc",
"limit",
"value"
] |
[
"Which",
"customer",
",",
"who",
"has",
"made",
"at",
"least",
"one",
"payment",
",",
"has",
"spent",
"the",
"least",
"money",
"?",
"List",
"his",
"or",
"her",
"first",
"name",
",",
"last",
"name",
",",
"and",
"the",
"id",
"."
] |
sakila_1
|
SELECT T1.first_name , T1.last_name , T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1
|
What is the full name and id of the customer who has the lowest total amount of payment?
|
[
"SELECT",
"T1.first_name",
",",
"T1.last_name",
",",
"T1.customer_id",
"FROM",
"customer",
"AS",
"T1",
"JOIN",
"payment",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"GROUP",
"BY",
"T1.customer_id",
"ORDER",
"BY",
"sum",
"(",
"amount",
")",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"first_name",
",",
"t1",
".",
"last_name",
",",
"t1",
".",
"customer_id",
"from",
"customer",
"as",
"t1",
"join",
"payment",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"group",
"by",
"t1",
".",
"customer_id",
"order",
"by",
"sum",
"(",
"amount",
")",
"asc",
"limit",
"value"
] |
[
"What",
"is",
"the",
"full",
"name",
"and",
"id",
"of",
"the",
"customer",
"who",
"has",
"the",
"lowest",
"total",
"amount",
"of",
"payment",
"?"
] |
sakila_1
|
SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'
|
What is the genre name of the film HUNGER ROOF?
|
[
"SELECT",
"T1.name",
"FROM",
"category",
"AS",
"T1",
"JOIN",
"film_category",
"AS",
"T2",
"ON",
"T1.category_id",
"=",
"T2.category_id",
"JOIN",
"film",
"AS",
"T3",
"ON",
"T2.film_id",
"=",
"T3.film_id",
"WHERE",
"T3.title",
"=",
"'HUNGER",
"ROOF",
"'"
] |
[
"select",
"t1",
".",
"name",
"from",
"category",
"as",
"t1",
"join",
"film_category",
"as",
"t2",
"on",
"t1",
".",
"category_id",
"=",
"t2",
".",
"category_id",
"join",
"film",
"as",
"t3",
"on",
"t2",
".",
"film_id",
"=",
"t3",
".",
"film_id",
"where",
"t3",
".",
"title",
"=",
"value"
] |
[
"What",
"is",
"the",
"genre",
"name",
"of",
"the",
"film",
"HUNGER",
"ROOF",
"?"
] |
sakila_1
|
SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id = T2.category_id JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'HUNGER ROOF'
|
Return the name of the category to which the film 'HUNGER ROOF' belongs.
|
[
"SELECT",
"T1.name",
"FROM",
"category",
"AS",
"T1",
"JOIN",
"film_category",
"AS",
"T2",
"ON",
"T1.category_id",
"=",
"T2.category_id",
"JOIN",
"film",
"AS",
"T3",
"ON",
"T2.film_id",
"=",
"T3.film_id",
"WHERE",
"T3.title",
"=",
"'HUNGER",
"ROOF",
"'"
] |
[
"select",
"t1",
".",
"name",
"from",
"category",
"as",
"t1",
"join",
"film_category",
"as",
"t2",
"on",
"t1",
".",
"category_id",
"=",
"t2",
".",
"category_id",
"join",
"film",
"as",
"t3",
"on",
"t2",
".",
"film_id",
"=",
"t3",
".",
"film_id",
"where",
"t3",
".",
"title",
"=",
"value"
] |
[
"Return",
"the",
"name",
"of",
"the",
"category",
"to",
"which",
"the",
"film",
"'HUNGER",
"ROOF",
"'",
"belongs",
"."
] |
sakila_1
|
SELECT T2.name , T1.category_id , count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id
|
How many films are there in each category? List the genre name, genre id and the count.
|
[
"SELECT",
"T2.name",
",",
"T1.category_id",
",",
"count",
"(",
"*",
")",
"FROM",
"film_category",
"AS",
"T1",
"JOIN",
"category",
"AS",
"T2",
"ON",
"T1.category_id",
"=",
"T2.category_id",
"GROUP",
"BY",
"T1.category_id"
] |
[
"select",
"t2",
".",
"name",
",",
"t1",
".",
"category_id",
",",
"count",
"(",
"*",
")",
"from",
"film_category",
"as",
"t1",
"join",
"category",
"as",
"t2",
"on",
"t1",
".",
"category_id",
"=",
"t2",
".",
"category_id",
"group",
"by",
"t1",
".",
"category_id"
] |
[
"How",
"many",
"films",
"are",
"there",
"in",
"each",
"category",
"?",
"List",
"the",
"genre",
"name",
",",
"genre",
"id",
"and",
"the",
"count",
"."
] |
sakila_1
|
SELECT T2.name , T1.category_id , count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id
|
What are the names and ids of the different categories, and how many films are in each?
|
[
"SELECT",
"T2.name",
",",
"T1.category_id",
",",
"count",
"(",
"*",
")",
"FROM",
"film_category",
"AS",
"T1",
"JOIN",
"category",
"AS",
"T2",
"ON",
"T1.category_id",
"=",
"T2.category_id",
"GROUP",
"BY",
"T1.category_id"
] |
[
"select",
"t2",
".",
"name",
",",
"t1",
".",
"category_id",
",",
"count",
"(",
"*",
")",
"from",
"film_category",
"as",
"t1",
"join",
"category",
"as",
"t2",
"on",
"t1",
".",
"category_id",
"=",
"t2",
".",
"category_id",
"group",
"by",
"t1",
".",
"category_id"
] |
[
"What",
"are",
"the",
"names",
"and",
"ids",
"of",
"the",
"different",
"categories",
",",
"and",
"how",
"many",
"films",
"are",
"in",
"each",
"?"
] |
sakila_1
|
SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1
|
Which film has the most copies in the inventory? List both title and id.
|
[
"SELECT",
"T1.title",
",",
"T1.film_id",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"inventory",
"AS",
"T2",
"ON",
"T1.film_id",
"=",
"T2.film_id",
"GROUP",
"BY",
"T1.film_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"title",
",",
"t1",
".",
"film_id",
"from",
"film",
"as",
"t1",
"join",
"inventory",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"group",
"by",
"t1",
".",
"film_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"film",
"has",
"the",
"most",
"copies",
"in",
"the",
"inventory",
"?",
"List",
"both",
"title",
"and",
"id",
"."
] |
sakila_1
|
SELECT T1.title , T1.film_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id ORDER BY count(*) DESC LIMIT 1
|
What is the title and id of the film that has the greatest number of copies in inventory?
|
[
"SELECT",
"T1.title",
",",
"T1.film_id",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"inventory",
"AS",
"T2",
"ON",
"T1.film_id",
"=",
"T2.film_id",
"GROUP",
"BY",
"T1.film_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"title",
",",
"t1",
".",
"film_id",
"from",
"film",
"as",
"t1",
"join",
"inventory",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"group",
"by",
"t1",
".",
"film_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What",
"is",
"the",
"title",
"and",
"id",
"of",
"the",
"film",
"that",
"has",
"the",
"greatest",
"number",
"of",
"copies",
"in",
"inventory",
"?"
] |
sakila_1
|
SELECT T1.title , T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY count(*) DESC LIMIT 1
|
What is the film title and inventory id of the item in the inventory which was rented most frequently?
|
[
"SELECT",
"T1.title",
",",
"T2.inventory_id",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"inventory",
"AS",
"T2",
"ON",
"T1.film_id",
"=",
"T2.film_id",
"JOIN",
"rental",
"AS",
"T3",
"ON",
"T2.inventory_id",
"=",
"T3.inventory_id",
"GROUP",
"BY",
"T2.inventory_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"title",
",",
"t2",
".",
"inventory_id",
"from",
"film",
"as",
"t1",
"join",
"inventory",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"join",
"rental",
"as",
"t3",
"on",
"t2",
".",
"inventory_id",
"=",
"t3",
".",
"inventory_id",
"group",
"by",
"t2",
".",
"inventory_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"What",
"is",
"the",
"film",
"title",
"and",
"inventory",
"id",
"of",
"the",
"item",
"in",
"the",
"inventory",
"which",
"was",
"rented",
"most",
"frequently",
"?"
] |
sakila_1
|
SELECT T1.title , T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY count(*) DESC LIMIT 1
|
Return the title and inventory id of the film that is rented most often.
|
[
"SELECT",
"T1.title",
",",
"T2.inventory_id",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"inventory",
"AS",
"T2",
"ON",
"T1.film_id",
"=",
"T2.film_id",
"JOIN",
"rental",
"AS",
"T3",
"ON",
"T2.inventory_id",
"=",
"T3.inventory_id",
"GROUP",
"BY",
"T2.inventory_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"title",
",",
"t2",
".",
"inventory_id",
"from",
"film",
"as",
"t1",
"join",
"inventory",
"as",
"t2",
"on",
"t1",
".",
"film_id",
"=",
"t2",
".",
"film_id",
"join",
"rental",
"as",
"t3",
"on",
"t2",
".",
"inventory_id",
"=",
"t3",
".",
"inventory_id",
"group",
"by",
"t2",
".",
"inventory_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Return",
"the",
"title",
"and",
"inventory",
"id",
"of",
"the",
"film",
"that",
"is",
"rented",
"most",
"often",
"."
] |
sakila_1
|
SELECT count(DISTINCT language_id) FROM film
|
How many languages are in these films?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"language_id",
")",
"FROM",
"film"
] |
[
"select",
"count",
"(",
"distinct",
"language_id",
")",
"from",
"film"
] |
[
"How",
"many",
"languages",
"are",
"in",
"these",
"films",
"?"
] |
sakila_1
|
SELECT count(DISTINCT language_id) FROM film
|
Count the number of different languages in these films.
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"language_id",
")",
"FROM",
"film"
] |
[
"select",
"count",
"(",
"distinct",
"language_id",
")",
"from",
"film"
] |
[
"Count",
"the",
"number",
"of",
"different",
"languages",
"in",
"these",
"films",
"."
] |
sakila_1
|
SELECT title FROM film WHERE rating = 'R'
|
What are all the movies rated as R? List the titles.
|
[
"SELECT",
"title",
"FROM",
"film",
"WHERE",
"rating",
"=",
"'R",
"'"
] |
[
"select",
"title",
"from",
"film",
"where",
"rating",
"=",
"value"
] |
[
"What",
"are",
"all",
"the",
"movies",
"rated",
"as",
"R",
"?",
"List",
"the",
"titles",
"."
] |
sakila_1
|
SELECT title FROM film WHERE rating = 'R'
|
Return the titles of any movies with an R rating.
|
[
"SELECT",
"title",
"FROM",
"film",
"WHERE",
"rating",
"=",
"'R",
"'"
] |
[
"select",
"title",
"from",
"film",
"where",
"rating",
"=",
"value"
] |
[
"Return",
"the",
"titles",
"of",
"any",
"movies",
"with",
"an",
"R",
"rating",
"."
] |
sakila_1
|
SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1
|
Where is store 1 located?
|
[
"SELECT",
"T2.address",
"FROM",
"store",
"AS",
"T1",
"JOIN",
"address",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"WHERE",
"store_id",
"=",
"1"
] |
[
"select",
"t2",
".",
"address",
"from",
"store",
"as",
"t1",
"join",
"address",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"where",
"store_id",
"=",
"value"
] |
[
"Where",
"is",
"store",
"1",
"located",
"?"
] |
sakila_1
|
SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1
|
Return the address of store 1.
|
[
"SELECT",
"T2.address",
"FROM",
"store",
"AS",
"T1",
"JOIN",
"address",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"WHERE",
"store_id",
"=",
"1"
] |
[
"select",
"t2",
".",
"address",
"from",
"store",
"as",
"t1",
"join",
"address",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"where",
"store_id",
"=",
"value"
] |
[
"Return",
"the",
"address",
"of",
"store",
"1",
"."
] |
sakila_1
|
SELECT T1.first_name , T1.last_name , T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1
|
Which staff handled least number of payments? List the full name and the id.
|
[
"SELECT",
"T1.first_name",
",",
"T1.last_name",
",",
"T1.staff_id",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"payment",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"GROUP",
"BY",
"T1.staff_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"first_name",
",",
"t1",
".",
"last_name",
",",
"t1",
".",
"staff_id",
"from",
"staff",
"as",
"t1",
"join",
"payment",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"group",
"by",
"t1",
".",
"staff_id",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
] |
[
"Which",
"staff",
"handled",
"least",
"number",
"of",
"payments",
"?",
"List",
"the",
"full",
"name",
"and",
"the",
"id",
"."
] |
sakila_1
|
SELECT T1.first_name , T1.last_name , T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1
|
Give the full name and staff id of the staff who has handled the fewest payments.
|
[
"SELECT",
"T1.first_name",
",",
"T1.last_name",
",",
"T1.staff_id",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"payment",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"GROUP",
"BY",
"T1.staff_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"first_name",
",",
"t1",
".",
"last_name",
",",
"t1",
".",
"staff_id",
"from",
"staff",
"as",
"t1",
"join",
"payment",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"group",
"by",
"t1",
".",
"staff_id",
"order",
"by",
"count",
"(",
"*",
")",
"asc",
"limit",
"value"
] |
[
"Give",
"the",
"full",
"name",
"and",
"staff",
"id",
"of",
"the",
"staff",
"who",
"has",
"handled",
"the",
"fewest",
"payments",
"."
] |
sakila_1
|
SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'
|
Which language does the film AIRPORT POLLOCK use? List the language name.
|
[
"SELECT",
"T2.name",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"LANGUAGE",
"AS",
"T2",
"ON",
"T1.language_id",
"=",
"T2.language_id",
"WHERE",
"T1.title",
"=",
"'AIRPORT",
"POLLOCK",
"'"
] |
[
"select",
"t2",
".",
"name",
"from",
"film",
"as",
"t1",
"join",
"language",
"as",
"t2",
"on",
"t1",
".",
"language_id",
"=",
"t2",
".",
"language_id",
"where",
"t1",
".",
"title",
"=",
"value"
] |
[
"Which",
"language",
"does",
"the",
"film",
"AIRPORT",
"POLLOCK",
"use",
"?",
"List",
"the",
"language",
"name",
"."
] |
sakila_1
|
SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'
|
What is the name of the language that the film 'AIRPORT POLLOCK' is in?
|
[
"SELECT",
"T2.name",
"FROM",
"film",
"AS",
"T1",
"JOIN",
"LANGUAGE",
"AS",
"T2",
"ON",
"T1.language_id",
"=",
"T2.language_id",
"WHERE",
"T1.title",
"=",
"'AIRPORT",
"POLLOCK",
"'"
] |
[
"select",
"t2",
".",
"name",
"from",
"film",
"as",
"t1",
"join",
"language",
"as",
"t2",
"on",
"t1",
".",
"language_id",
"=",
"t2",
".",
"language_id",
"where",
"t1",
".",
"title",
"=",
"value"
] |
[
"What",
"is",
"the",
"name",
"of",
"the",
"language",
"that",
"the",
"film",
"'AIRPORT",
"POLLOCK",
"'",
"is",
"in",
"?"
] |
sakila_1
|
SELECT count(*) FROM store
|
How many stores are there?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"store"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"store"
] |
[
"How",
"many",
"stores",
"are",
"there",
"?"
] |
sakila_1
|
SELECT count(*) FROM store
|
Count the number of stores.
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"store"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"store"
] |
[
"Count",
"the",
"number",
"of",
"stores",
"."
] |
sakila_1
|
SELECT count(DISTINCT rating) FROM film
|
How many kinds of different ratings are listed?
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"rating",
")",
"FROM",
"film"
] |
[
"select",
"count",
"(",
"distinct",
"rating",
")",
"from",
"film"
] |
[
"How",
"many",
"kinds",
"of",
"different",
"ratings",
"are",
"listed",
"?"
] |
sakila_1
|
SELECT count(DISTINCT rating) FROM film
|
Count the number of different film ratings.
|
[
"SELECT",
"count",
"(",
"DISTINCT",
"rating",
")",
"FROM",
"film"
] |
[
"select",
"count",
"(",
"distinct",
"rating",
")",
"from",
"film"
] |
[
"Count",
"the",
"number",
"of",
"different",
"film",
"ratings",
"."
] |
sakila_1
|
SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
|
Which movies have 'Deleted Scenes' as a substring in the special feature?
|
[
"SELECT",
"title",
"FROM",
"film",
"WHERE",
"special_features",
"LIKE",
"'",
"%",
"Deleted",
"Scenes",
"%",
"'"
] |
[
"select",
"title",
"from",
"film",
"where",
"special_features",
"like",
"value"
] |
[
"Which",
"movies",
"have",
"'Deleted",
"Scenes",
"'",
"as",
"a",
"substring",
"in",
"the",
"special",
"feature",
"?"
] |
sakila_1
|
SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'
|
Return the titles of films that include 'Deleted Scenes' in their special feature section.
|
[
"SELECT",
"title",
"FROM",
"film",
"WHERE",
"special_features",
"LIKE",
"'",
"%",
"Deleted",
"Scenes",
"%",
"'"
] |
[
"select",
"title",
"from",
"film",
"where",
"special_features",
"like",
"value"
] |
[
"Return",
"the",
"titles",
"of",
"films",
"that",
"include",
"'Deleted",
"Scenes",
"'",
"in",
"their",
"special",
"feature",
"section",
"."
] |
sakila_1
|
SELECT count(*) FROM inventory WHERE store_id = 1
|
How many items in inventory does store 1 have?
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"inventory",
"WHERE",
"store_id",
"=",
"1"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"inventory",
"where",
"store_id",
"=",
"value"
] |
[
"How",
"many",
"items",
"in",
"inventory",
"does",
"store",
"1",
"have",
"?"
] |
sakila_1
|
SELECT count(*) FROM inventory WHERE store_id = 1
|
Count the number of items store 1 has in stock.
|
[
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"inventory",
"WHERE",
"store_id",
"=",
"1"
] |
[
"select",
"count",
"(",
"*",
")",
"from",
"inventory",
"where",
"store_id",
"=",
"value"
] |
[
"Count",
"the",
"number",
"of",
"items",
"store",
"1",
"has",
"in",
"stock",
"."
] |
sakila_1
|
SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1
|
When did the first payment happen?
|
[
"SELECT",
"payment_date",
"FROM",
"payment",
"ORDER",
"BY",
"payment_date",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"payment_date",
"from",
"payment",
"order",
"by",
"payment_date",
"asc",
"limit",
"value"
] |
[
"When",
"did",
"the",
"first",
"payment",
"happen",
"?"
] |
sakila_1
|
SELECT payment_date FROM payment ORDER BY payment_date ASC LIMIT 1
|
What was the date of the earliest payment?
|
[
"SELECT",
"payment_date",
"FROM",
"payment",
"ORDER",
"BY",
"payment_date",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"payment_date",
"from",
"payment",
"order",
"by",
"payment_date",
"asc",
"limit",
"value"
] |
[
"What",
"was",
"the",
"date",
"of",
"the",
"earliest",
"payment",
"?"
] |
sakila_1
|
SELECT T2.address , T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'
|
Where does the customer with the first name Linda live? And what is her email?
|
[
"SELECT",
"T2.address",
",",
"T1.email",
"FROM",
"customer",
"AS",
"T1",
"JOIN",
"address",
"AS",
"T2",
"ON",
"T2.address_id",
"=",
"T1.address_id",
"WHERE",
"T1.first_name",
"=",
"'LINDA",
"'"
] |
[
"select",
"t2",
".",
"address",
",",
"t1",
".",
"email",
"from",
"customer",
"as",
"t1",
"join",
"address",
"as",
"t2",
"on",
"t2",
".",
"address_id",
"=",
"t1",
".",
"address_id",
"where",
"t1",
".",
"first_name",
"=",
"value"
] |
[
"Where",
"does",
"the",
"customer",
"with",
"the",
"first",
"name",
"Linda",
"live",
"?",
"And",
"what",
"is",
"her",
"email",
"?"
] |
sakila_1
|
SELECT T2.address , T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'
|
Return the address and email of the customer with the first name Linda.
|
[
"SELECT",
"T2.address",
",",
"T1.email",
"FROM",
"customer",
"AS",
"T1",
"JOIN",
"address",
"AS",
"T2",
"ON",
"T2.address_id",
"=",
"T1.address_id",
"WHERE",
"T1.first_name",
"=",
"'LINDA",
"'"
] |
[
"select",
"t2",
".",
"address",
",",
"t1",
".",
"email",
"from",
"customer",
"as",
"t1",
"join",
"address",
"as",
"t2",
"on",
"t2",
".",
"address_id",
"=",
"t1",
".",
"address_id",
"where",
"t1",
".",
"first_name",
"=",
"value"
] |
[
"Return",
"the",
"address",
"and",
"email",
"of",
"the",
"customer",
"with",
"the",
"first",
"name",
"Linda",
"."
] |
sakila_1
|
SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200
|
Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.
|
[
"SELECT",
"title",
"FROM",
"film",
"WHERE",
"LENGTH",
">",
"100",
"OR",
"rating",
"=",
"'PG",
"'",
"EXCEPT",
"SELECT",
"title",
"FROM",
"film",
"WHERE",
"replacement_cost",
">",
"200"
] |
[
"select",
"title",
"from",
"film",
"where",
"length",
">",
"value",
"or",
"rating",
"=",
"value",
"except",
"select",
"title",
"from",
"film",
"where",
"replacement_cost",
">",
"value"
] |
[
"Find",
"all",
"the",
"films",
"longer",
"than",
"100",
"minutes",
",",
"or",
"rated",
"PG",
",",
"except",
"those",
"who",
"cost",
"more",
"than",
"200",
"for",
"replacement",
".",
"List",
"the",
"titles",
"."
] |
sakila_1
|
SELECT title FROM film WHERE LENGTH > 100 OR rating = 'PG' EXCEPT SELECT title FROM film WHERE replacement_cost > 200
|
What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace?
|
[
"SELECT",
"title",
"FROM",
"film",
"WHERE",
"LENGTH",
">",
"100",
"OR",
"rating",
"=",
"'PG",
"'",
"EXCEPT",
"SELECT",
"title",
"FROM",
"film",
"WHERE",
"replacement_cost",
">",
"200"
] |
[
"select",
"title",
"from",
"film",
"where",
"length",
">",
"value",
"or",
"rating",
"=",
"value",
"except",
"select",
"title",
"from",
"film",
"where",
"replacement_cost",
">",
"value"
] |
[
"What",
"are",
"the",
"titles",
"of",
"films",
"that",
"are",
"either",
"longer",
"than",
"100",
"minutes",
"or",
"rated",
"PG",
"other",
"than",
"those",
"that",
"cost",
"more",
"than",
"200",
"to",
"replace",
"?"
] |
sakila_1
|
SELECT T1.first_name , T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1
|
What is the first name and the last name of the customer who made the earliest rental?
|
[
"SELECT",
"T1.first_name",
",",
"T1.last_name",
"FROM",
"customer",
"AS",
"T1",
"JOIN",
"rental",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"ORDER",
"BY",
"T2.rental_date",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"first_name",
",",
"t1",
".",
"last_name",
"from",
"customer",
"as",
"t1",
"join",
"rental",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"order",
"by",
"t2",
".",
"rental_date",
"asc",
"limit",
"value"
] |
[
"What",
"is",
"the",
"first",
"name",
"and",
"the",
"last",
"name",
"of",
"the",
"customer",
"who",
"made",
"the",
"earliest",
"rental",
"?"
] |
sakila_1
|
SELECT T1.first_name , T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id = T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1
|
Return the full name of the customer who made the first rental.
|
[
"SELECT",
"T1.first_name",
",",
"T1.last_name",
"FROM",
"customer",
"AS",
"T1",
"JOIN",
"rental",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"ORDER",
"BY",
"T2.rental_date",
"ASC",
"LIMIT",
"1"
] |
[
"select",
"t1",
".",
"first_name",
",",
"t1",
".",
"last_name",
"from",
"customer",
"as",
"t1",
"join",
"rental",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"order",
"by",
"t2",
".",
"rental_date",
"asc",
"limit",
"value"
] |
[
"Return",
"the",
"full",
"name",
"of",
"the",
"customer",
"who",
"made",
"the",
"first",
"rental",
"."
] |
sakila_1
|
SELECT DISTINCT T1.first_name , T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'
|
What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?
|
[
"SELECT",
"DISTINCT",
"T1.first_name",
",",
"T1.last_name",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"rental",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"JOIN",
"customer",
"AS",
"T3",
"ON",
"T2.customer_id",
"=",
"T3.customer_id",
"WHERE",
"T3.first_name",
"=",
"'APRIL",
"'",
"AND",
"T3.last_name",
"=",
"'BURNS",
"'"
] |
[
"select",
"distinct",
"t1",
".",
"first_name",
",",
"t1",
".",
"last_name",
"from",
"staff",
"as",
"t1",
"join",
"rental",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"join",
"customer",
"as",
"t3",
"on",
"t2",
".",
"customer_id",
"=",
"t3",
".",
"customer_id",
"where",
"t3",
".",
"first_name",
"=",
"value",
"and",
"t3",
".",
"last_name",
"=",
"value"
] |
[
"What",
"is",
"the",
"full",
"name",
"of",
"the",
"staff",
"member",
"who",
"has",
"rented",
"a",
"film",
"to",
"a",
"customer",
"with",
"the",
"first",
"name",
"April",
"and",
"the",
"last",
"name",
"Burns",
"?"
] |
sakila_1
|
SELECT DISTINCT T1.first_name , T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id = T2.staff_id JOIN customer AS T3 ON T2.customer_id = T3.customer_id WHERE T3.first_name = 'APRIL' AND T3.last_name = 'BURNS'
|
Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental.
|
[
"SELECT",
"DISTINCT",
"T1.first_name",
",",
"T1.last_name",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"rental",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"JOIN",
"customer",
"AS",
"T3",
"ON",
"T2.customer_id",
"=",
"T3.customer_id",
"WHERE",
"T3.first_name",
"=",
"'APRIL",
"'",
"AND",
"T3.last_name",
"=",
"'BURNS",
"'"
] |
[
"select",
"distinct",
"t1",
".",
"first_name",
",",
"t1",
".",
"last_name",
"from",
"staff",
"as",
"t1",
"join",
"rental",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"join",
"customer",
"as",
"t3",
"on",
"t2",
".",
"customer_id",
"=",
"t3",
".",
"customer_id",
"where",
"t3",
".",
"first_name",
"=",
"value",
"and",
"t3",
".",
"last_name",
"=",
"value"
] |
[
"Return",
"the",
"full",
"name",
"of",
"the",
"staff",
"who",
"provided",
"a",
"customer",
"with",
"the",
"first",
"name",
"April",
"and",
"the",
"last",
"name",
"Burns",
"with",
"a",
"film",
"rental",
"."
] |
sakila_1
|
SELECT store_id FROM customer GROUP BY store_id ORDER BY count(*) DESC LIMIT 1
|
Which store has most the customers?
|
[
"SELECT",
"store_id",
"FROM",
"customer",
"GROUP",
"BY",
"store_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"store_id",
"from",
"customer",
"group",
"by",
"store_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Which",
"store",
"has",
"most",
"the",
"customers",
"?"
] |
sakila_1
|
SELECT store_id FROM customer GROUP BY store_id ORDER BY count(*) DESC LIMIT 1
|
Return the id of the store with the most customers.
|
[
"SELECT",
"store_id",
"FROM",
"customer",
"GROUP",
"BY",
"store_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] |
[
"select",
"store_id",
"from",
"customer",
"group",
"by",
"store_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
] |
[
"Return",
"the",
"id",
"of",
"the",
"store",
"with",
"the",
"most",
"customers",
"."
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.