db_id stringclasses 140
values | 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 | question_toks_masked listlengths 4 44 | query_toks_masked listlengths 4 125 |
|---|---|---|---|---|---|---|---|
customers_and_invoices | SELECT invoice_number , count(*) FROM Financial_transactions GROUP BY invoice_number | How many transactions correspond to each invoice number? | [
"SELECT",
"invoice_number",
",",
"count",
"(",
"*",
")",
"FROM",
"Financial_transactions",
"GROUP",
"BY",
"invoice_number"
] | [
"select",
"invoice_number",
",",
"count",
"(",
"*",
")",
"from",
"financial_transactions",
"group",
"by",
"invoice_number"
] | [
"How",
"many",
"transactions",
"correspond",
"to",
"each",
"invoice",
"number",
"?"
] | [
"How",
"many",
"<mask>",
"correspond",
"to",
"each",
"<mask>",
"<mask>",
"?"
] | [
"select",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT T2.invoice_number , T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1 | What is the invoice number and invoice date for the invoice with most number of transactions? | [
"SELECT",
"T2.invoice_number",
",",
"T2.invoice_date",
"FROM",
"Financial_transactions",
"AS",
"T1",
"JOIN",
"Invoices",
"AS",
"T2",
"ON",
"T1.invoice_number",
"=",
"T2.invoice_number",
"GROUP",
"BY",
"T1.invoice_number",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC... | [
"select",
"t2",
".",
"invoice_number",
",",
"t2",
".",
"invoice_date",
"from",
"financial_transactions",
"as",
"t1",
"join",
"invoices",
"as",
"t2",
"on",
"t1",
".",
"invoice_number",
"=",
"t2",
".",
"invoice_number",
"group",
"by",
"t1",
".",
"invoice_number"... | [
"What",
"is",
"the",
"invoice",
"number",
"and",
"invoice",
"date",
"for",
"the",
"invoice",
"with",
"most",
"number",
"of",
"transactions",
"?"
] | [
"What",
"is",
"the",
"<mask>",
"<mask>",
"and",
"<mask>",
"<mask>",
"for",
"the",
"<mask>",
"with",
"most",
"<mask>",
"of",
"<mask>",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>",
"order",
"by",
"coun... |
customers_and_invoices | SELECT T2.invoice_number , T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1 | What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions? | [
"SELECT",
"T2.invoice_number",
",",
"T2.invoice_date",
"FROM",
"Financial_transactions",
"AS",
"T1",
"JOIN",
"Invoices",
"AS",
"T2",
"ON",
"T1.invoice_number",
"=",
"T2.invoice_number",
"GROUP",
"BY",
"T1.invoice_number",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC... | [
"select",
"t2",
".",
"invoice_number",
",",
"t2",
".",
"invoice_date",
"from",
"financial_transactions",
"as",
"t1",
"join",
"invoices",
"as",
"t2",
"on",
"t1",
".",
"invoice_number",
"=",
"t2",
".",
"invoice_number",
"group",
"by",
"t1",
".",
"invoice_number"... | [
"What",
"is",
"the",
"invoice",
"number",
"and",
"invoice",
"date",
"corresponding",
"to",
"the",
"invoice",
"with",
"the",
"greatest",
"number",
"of",
"transactions",
"?"
] | [
"What",
"is",
"the",
"<mask>",
"<mask>",
"and",
"<mask>",
"<mask>",
"corresponding",
"to",
"the",
"<mask>",
"with",
"the",
"greatest",
"<mask>",
"of",
"<mask>",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>",
"order",
"by",
"coun... |
customers_and_invoices | SELECT count(*) FROM Invoices | How many invoices do we have? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Invoices"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"invoices"
] | [
"How",
"many",
"invoices",
"do",
"we",
"have",
"?"
] | [
"How",
"many",
"<mask>",
"do",
"we",
"have",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>"
] |
customers_and_invoices | SELECT count(*) FROM Invoices | Count the number of invoices. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Invoices"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"invoices"
] | [
"Count",
"the",
"number",
"of",
"invoices",
"."
] | [
"Count",
"the",
"<mask>",
"of",
"<mask>",
"."
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>"
] |
customers_and_invoices | SELECT T1.invoice_date , T1.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id | Show invoice dates and order id and details for all invoices. | [
"SELECT",
"T1.invoice_date",
",",
"T1.order_id",
",",
"T2.order_details",
"FROM",
"Invoices",
"AS",
"T1",
"JOIN",
"Orders",
"AS",
"T2",
"ON",
"T1.order_id",
"=",
"T2.order_id"
] | [
"select",
"t1",
".",
"invoice_date",
",",
"t1",
".",
"order_id",
",",
"t2",
".",
"order_details",
"from",
"invoices",
"as",
"t1",
"join",
"orders",
"as",
"t2",
"on",
"t1",
".",
"order_id",
"=",
"t2",
".",
"order_id"
] | [
"Show",
"invoice",
"dates",
"and",
"order",
"id",
"and",
"details",
"for",
"all",
"invoices",
"."
] | [
"Show",
"<mask>",
"<mask>",
"and",
"<mask>",
"id",
"and",
"details",
"for",
"all",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>"
] |
customers_and_invoices | SELECT T1.invoice_date , T1.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id | What are the invoice dates, order ids, and order details for all invoices? | [
"SELECT",
"T1.invoice_date",
",",
"T1.order_id",
",",
"T2.order_details",
"FROM",
"Invoices",
"AS",
"T1",
"JOIN",
"Orders",
"AS",
"T2",
"ON",
"T1.order_id",
"=",
"T2.order_id"
] | [
"select",
"t1",
".",
"invoice_date",
",",
"t1",
".",
"order_id",
",",
"t2",
".",
"order_details",
"from",
"invoices",
"as",
"t1",
"join",
"orders",
"as",
"t2",
"on",
"t1",
".",
"order_id",
"=",
"t2",
".",
"order_id"
] | [
"What",
"are",
"the",
"invoice",
"dates",
",",
"order",
"ids",
",",
"and",
"order",
"details",
"for",
"all",
"invoices",
"?"
] | [
"What",
"are",
"the",
"<mask>",
"<mask>",
",",
"<mask>",
"ids",
",",
"and",
"<mask>",
"details",
"for",
"all",
"<mask>",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>"
] |
customers_and_invoices | SELECT order_id , count(*) FROM Invoices GROUP BY order_id | Show the order ids and the number of invoices for each order. | [
"SELECT",
"order_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Invoices",
"GROUP",
"BY",
"order_id"
] | [
"select",
"order_id",
",",
"count",
"(",
"*",
")",
"from",
"invoices",
"group",
"by",
"order_id"
] | [
"Show",
"the",
"order",
"ids",
"and",
"the",
"number",
"of",
"invoices",
"for",
"each",
"order",
"."
] | [
"Show",
"the",
"<mask>",
"ids",
"and",
"the",
"<mask>",
"of",
"<mask>",
"for",
"each",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT order_id , count(*) FROM Invoices GROUP BY order_id | How many invoices correspond to each order id? | [
"SELECT",
"order_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Invoices",
"GROUP",
"BY",
"order_id"
] | [
"select",
"order_id",
",",
"count",
"(",
"*",
")",
"from",
"invoices",
"group",
"by",
"order_id"
] | [
"How",
"many",
"invoices",
"correspond",
"to",
"each",
"order",
"id",
"?"
] | [
"How",
"many",
"<mask>",
"correspond",
"to",
"each",
"<mask>",
"id",
"?"
] | [
"select",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT T2.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING count(*) > 2 | What is the order id and order details for the order more than two invoices. | [
"SELECT",
"T2.order_id",
",",
"T2.order_details",
"FROM",
"Invoices",
"AS",
"T1",
"JOIN",
"Orders",
"AS",
"T2",
"ON",
"T1.order_id",
"=",
"T2.order_id",
"GROUP",
"BY",
"T2.order_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"2"
] | [
"select",
"t2",
".",
"order_id",
",",
"t2",
".",
"order_details",
"from",
"invoices",
"as",
"t1",
"join",
"orders",
"as",
"t2",
"on",
"t1",
".",
"order_id",
"=",
"t2",
".",
"order_id",
"group",
"by",
"t2",
".",
"order_id",
"having",
"count",
"(",
"*",
... | [
"What",
"is",
"the",
"order",
"id",
"and",
"order",
"details",
"for",
"the",
"order",
"more",
"than",
"two",
"invoices",
"."
] | [
"What",
"is",
"the",
"<mask>",
"id",
"and",
"<mask>",
"details",
"for",
"the",
"<mask>",
"more",
"than",
"two",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>",
"<mask>",
"count",
"... |
customers_and_invoices | SELECT T2.order_id , T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id = T2.order_id GROUP BY T2.order_id HAVING count(*) > 2 | Return the order ids and details for orderes with two or more invoices. | [
"SELECT",
"T2.order_id",
",",
"T2.order_details",
"FROM",
"Invoices",
"AS",
"T1",
"JOIN",
"Orders",
"AS",
"T2",
"ON",
"T1.order_id",
"=",
"T2.order_id",
"GROUP",
"BY",
"T2.order_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"2"
] | [
"select",
"t2",
".",
"order_id",
",",
"t2",
".",
"order_details",
"from",
"invoices",
"as",
"t1",
"join",
"orders",
"as",
"t2",
"on",
"t1",
".",
"order_id",
"=",
"t2",
".",
"order_id",
"group",
"by",
"t2",
".",
"order_id",
"having",
"count",
"(",
"*",
... | [
"Return",
"the",
"order",
"ids",
"and",
"details",
"for",
"orderes",
"with",
"two",
"or",
"more",
"invoices",
"."
] | [
"Return",
"the",
"<mask>",
"ids",
"and",
"details",
"for",
"orderes",
"with",
"two",
"or",
"more",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>",
"<mask>",
"count",
"... |
customers_and_invoices | SELECT T2.customer_last_name , T1.customer_id , T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1 | What is the customer last name, id and phone number with most number of orders? | [
"SELECT",
"T2.customer_last_name",
",",
"T1.customer_id",
",",
"T2.phone_number",
"FROM",
"Orders",
"AS",
"T1",
"JOIN",
"Customers",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"GROUP",
"BY",
"T1.customer_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
... | [
"select",
"t2",
".",
"customer_last_name",
",",
"t1",
".",
"customer_id",
",",
"t2",
".",
"phone_number",
"from",
"orders",
"as",
"t1",
"join",
"customers",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"group",
"by",
"t1",
"... | [
"What",
"is",
"the",
"customer",
"last",
"name",
",",
"id",
"and",
"phone",
"number",
"with",
"most",
"number",
"of",
"orders",
"?"
] | [
"What",
"is",
"the",
"<mask>",
"<mask>",
"<mask>",
",",
"id",
"and",
"<mask>",
"<mask>",
"with",
"most",
"<mask>",
"of",
"<mask>",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
... |
customers_and_invoices | SELECT T2.customer_last_name , T1.customer_id , T2.phone_number FROM Orders AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1 | Return the last name, id and phone number of the customer who has made the greatest number of orders. | [
"SELECT",
"T2.customer_last_name",
",",
"T1.customer_id",
",",
"T2.phone_number",
"FROM",
"Orders",
"AS",
"T1",
"JOIN",
"Customers",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"GROUP",
"BY",
"T1.customer_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
... | [
"select",
"t2",
".",
"customer_last_name",
",",
"t1",
".",
"customer_id",
",",
"t2",
".",
"phone_number",
"from",
"orders",
"as",
"t1",
"join",
"customers",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"group",
"by",
"t1",
"... | [
"Return",
"the",
"last",
"name",
",",
"id",
"and",
"phone",
"number",
"of",
"the",
"customer",
"who",
"has",
"made",
"the",
"greatest",
"number",
"of",
"orders",
"."
] | [
"Return",
"the",
"<mask>",
"<mask>",
",",
"id",
"and",
"<mask>",
"<mask>",
"of",
"the",
"<mask>",
"who",
"has",
"made",
"the",
"greatest",
"<mask>",
"of",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
... |
customers_and_invoices | SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id | Show all product names without an order. | [
"SELECT",
"product_name",
"FROM",
"Products",
"EXCEPT",
"SELECT",
"T1.product_name",
"FROM",
"Products",
"AS",
"T1",
"JOIN",
"Order_items",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id"
] | [
"select",
"product_name",
"from",
"products",
"except",
"select",
"t1",
".",
"product_name",
"from",
"products",
"as",
"t1",
"join",
"order_items",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id"
] | [
"Show",
"all",
"product",
"names",
"without",
"an",
"order",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"without",
"an",
"<mask>",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"except",
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>"
] |
customers_and_invoices | SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id = T2.product_id | What are the names of products that have never been ordered? | [
"SELECT",
"product_name",
"FROM",
"Products",
"EXCEPT",
"SELECT",
"T1.product_name",
"FROM",
"Products",
"AS",
"T1",
"JOIN",
"Order_items",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id"
] | [
"select",
"product_name",
"from",
"products",
"except",
"select",
"t1",
".",
"product_name",
"from",
"products",
"as",
"t1",
"join",
"order_items",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id"
] | [
"What",
"are",
"the",
"names",
"of",
"products",
"that",
"have",
"never",
"been",
"ordered",
"?"
] | [
"What",
"are",
"the",
"<mask>",
"of",
"<mask>",
"that",
"have",
"never",
"been",
"<mask>",
"?"
] | [
"select",
"<mask>",
"from",
"<mask>",
"except",
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>"
] |
customers_and_invoices | SELECT T2.product_name , sum(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name | Show all product names and the total quantity ordered for each product name. | [
"SELECT",
"T2.product_name",
",",
"sum",
"(",
"T1.product_quantity",
")",
"FROM",
"Order_items",
"AS",
"T1",
"JOIN",
"Products",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id",
"GROUP",
"BY",
"T2.product_name"
] | [
"select",
"t2",
".",
"product_name",
",",
"sum",
"(",
"t1",
".",
"product_quantity",
")",
"from",
"order_items",
"as",
"t1",
"join",
"products",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id",
"group",
"by",
"t2",
".",
"product_n... | [
"Show",
"all",
"product",
"names",
"and",
"the",
"total",
"quantity",
"ordered",
"for",
"each",
"product",
"name",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"and",
"the",
"<mask>",
"<mask>",
"<mask>",
"for",
"each",
"<mask>",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"sum",
"(",
"<mask>",
".",
"<mask>",
")",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>"
] |
customers_and_invoices | SELECT T2.product_name , sum(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name | What are the different product names, and what is the sum of quantity ordered for each product? | [
"SELECT",
"T2.product_name",
",",
"sum",
"(",
"T1.product_quantity",
")",
"FROM",
"Order_items",
"AS",
"T1",
"JOIN",
"Products",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id",
"GROUP",
"BY",
"T2.product_name"
] | [
"select",
"t2",
".",
"product_name",
",",
"sum",
"(",
"t1",
".",
"product_quantity",
")",
"from",
"order_items",
"as",
"t1",
"join",
"products",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id",
"group",
"by",
"t2",
".",
"product_n... | [
"What",
"are",
"the",
"different",
"product",
"names",
",",
"and",
"what",
"is",
"the",
"sum",
"of",
"quantity",
"ordered",
"for",
"each",
"product",
"?"
] | [
"What",
"are",
"the",
"different",
"<mask>",
"<mask>",
",",
"and",
"what",
"is",
"the",
"sum",
"of",
"<mask>",
"<mask>",
"for",
"each",
"<mask>",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"sum",
"(",
"<mask>",
".",
"<mask>",
")",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>"
] |
customers_and_invoices | SELECT order_id , count(*) FROM Order_items GROUP BY order_id | Show the order ids and the number of items in each order. | [
"SELECT",
"order_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Order_items",
"GROUP",
"BY",
"order_id"
] | [
"select",
"order_id",
",",
"count",
"(",
"*",
")",
"from",
"order_items",
"group",
"by",
"order_id"
] | [
"Show",
"the",
"order",
"ids",
"and",
"the",
"number",
"of",
"items",
"in",
"each",
"order",
"."
] | [
"Show",
"the",
"<mask>",
"ids",
"and",
"the",
"<mask>",
"of",
"<mask>",
"in",
"each",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT order_id , count(*) FROM Order_items GROUP BY order_id | How many order items correspond to each order id? | [
"SELECT",
"order_id",
",",
"count",
"(",
"*",
")",
"FROM",
"Order_items",
"GROUP",
"BY",
"order_id"
] | [
"select",
"order_id",
",",
"count",
"(",
"*",
")",
"from",
"order_items",
"group",
"by",
"order_id"
] | [
"How",
"many",
"order",
"items",
"correspond",
"to",
"each",
"order",
"id",
"?"
] | [
"How",
"many",
"<mask>",
"<mask>",
"correspond",
"to",
"each",
"<mask>",
"id",
"?"
] | [
"select",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT product_id , count(DISTINCT order_id) FROM Order_items GROUP BY product_id | Show the product ids and the number of unique orders containing each product. | [
"SELECT",
"product_id",
",",
"count",
"(",
"DISTINCT",
"order_id",
")",
"FROM",
"Order_items",
"GROUP",
"BY",
"product_id"
] | [
"select",
"product_id",
",",
"count",
"(",
"distinct",
"order_id",
")",
"from",
"order_items",
"group",
"by",
"product_id"
] | [
"Show",
"the",
"product",
"ids",
"and",
"the",
"number",
"of",
"unique",
"orders",
"containing",
"each",
"product",
"."
] | [
"Show",
"the",
"<mask>",
"ids",
"and",
"the",
"<mask>",
"of",
"unique",
"<mask>",
"containing",
"each",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"count",
"(",
"distinct",
"<mask>",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT product_id , count(DISTINCT order_id) FROM Order_items GROUP BY product_id | How many distinct order ids correspond to each product? | [
"SELECT",
"product_id",
",",
"count",
"(",
"DISTINCT",
"order_id",
")",
"FROM",
"Order_items",
"GROUP",
"BY",
"product_id"
] | [
"select",
"product_id",
",",
"count",
"(",
"distinct",
"order_id",
")",
"from",
"order_items",
"group",
"by",
"product_id"
] | [
"How",
"many",
"distinct",
"order",
"ids",
"correspond",
"to",
"each",
"product",
"?"
] | [
"How",
"many",
"distinct",
"<mask>",
"ids",
"correspond",
"to",
"each",
"<mask>",
"?"
] | [
"select",
"<mask>",
",",
"count",
"(",
"distinct",
"<mask>",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT T2.product_name , count(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name | Show all product names and the number of customers having an order on each product. | [
"SELECT",
"T2.product_name",
",",
"count",
"(",
"*",
")",
"FROM",
"Order_items",
"AS",
"T1",
"JOIN",
"Products",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id",
"JOIN",
"Orders",
"AS",
"T3",
"ON",
"T3.order_id",
"=",
"T1.order_id",
"GROUP",
"BY",
"T... | [
"select",
"t2",
".",
"product_name",
",",
"count",
"(",
"*",
")",
"from",
"order_items",
"as",
"t1",
"join",
"products",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id",
"join",
"orders",
"as",
"t3",
"on",
"t3",
".",
"order_id",... | [
"Show",
"all",
"product",
"names",
"and",
"the",
"number",
"of",
"customers",
"having",
"an",
"order",
"on",
"each",
"product",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"and",
"the",
"<mask>",
"of",
"<mask>",
"having",
"an",
"<mask>",
"on",
"each",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<ma... |
customers_and_invoices | SELECT T2.product_name , count(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id JOIN Orders AS T3 ON T3.order_id = T1.order_id GROUP BY T2.product_name | What are teh names of the different products, as well as the number of customers who have ordered each product. | [
"SELECT",
"T2.product_name",
",",
"count",
"(",
"*",
")",
"FROM",
"Order_items",
"AS",
"T1",
"JOIN",
"Products",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id",
"JOIN",
"Orders",
"AS",
"T3",
"ON",
"T3.order_id",
"=",
"T1.order_id",
"GROUP",
"BY",
"T... | [
"select",
"t2",
".",
"product_name",
",",
"count",
"(",
"*",
")",
"from",
"order_items",
"as",
"t1",
"join",
"products",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id",
"join",
"orders",
"as",
"t3",
"on",
"t3",
".",
"order_id",... | [
"What",
"are",
"teh",
"names",
"of",
"the",
"different",
"products",
",",
"as",
"well",
"as",
"the",
"number",
"of",
"customers",
"who",
"have",
"ordered",
"each",
"product",
"."
] | [
"What",
"are",
"teh",
"<mask>",
"of",
"the",
"different",
"<mask>",
",",
"as",
"well",
"as",
"the",
"<mask>",
"of",
"<mask>",
"who",
"have",
"<mask>",
"each",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<ma... |
customers_and_invoices | SELECT order_id , count(DISTINCT product_id) FROM Order_items GROUP BY order_id | Show order ids and the number of products in each order. | [
"SELECT",
"order_id",
",",
"count",
"(",
"DISTINCT",
"product_id",
")",
"FROM",
"Order_items",
"GROUP",
"BY",
"order_id"
] | [
"select",
"order_id",
",",
"count",
"(",
"distinct",
"product_id",
")",
"from",
"order_items",
"group",
"by",
"order_id"
] | [
"Show",
"order",
"ids",
"and",
"the",
"number",
"of",
"products",
"in",
"each",
"order",
"."
] | [
"Show",
"<mask>",
"ids",
"and",
"the",
"<mask>",
"of",
"<mask>",
"in",
"each",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"count",
"(",
"distinct",
"<mask>",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT order_id , count(DISTINCT product_id) FROM Order_items GROUP BY order_id | How many different products correspond to each order id? | [
"SELECT",
"order_id",
",",
"count",
"(",
"DISTINCT",
"product_id",
")",
"FROM",
"Order_items",
"GROUP",
"BY",
"order_id"
] | [
"select",
"order_id",
",",
"count",
"(",
"distinct",
"product_id",
")",
"from",
"order_items",
"group",
"by",
"order_id"
] | [
"How",
"many",
"different",
"products",
"correspond",
"to",
"each",
"order",
"id",
"?"
] | [
"How",
"many",
"different",
"<mask>",
"correspond",
"to",
"each",
"<mask>",
"id",
"?"
] | [
"select",
"<mask>",
",",
"count",
"(",
"distinct",
"<mask>",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT order_id , sum(product_quantity) FROM Order_items GROUP BY order_id | Show order ids and the total quantity in each order. | [
"SELECT",
"order_id",
",",
"sum",
"(",
"product_quantity",
")",
"FROM",
"Order_items",
"GROUP",
"BY",
"order_id"
] | [
"select",
"order_id",
",",
"sum",
"(",
"product_quantity",
")",
"from",
"order_items",
"group",
"by",
"order_id"
] | [
"Show",
"order",
"ids",
"and",
"the",
"total",
"quantity",
"in",
"each",
"order",
"."
] | [
"Show",
"<mask>",
"ids",
"and",
"the",
"<mask>",
"<mask>",
"in",
"each",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"sum",
"(",
"<mask>",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT order_id , sum(product_quantity) FROM Order_items GROUP BY order_id | Give the order ids for all orders, as well as the total product quantity in each. | [
"SELECT",
"order_id",
",",
"sum",
"(",
"product_quantity",
")",
"FROM",
"Order_items",
"GROUP",
"BY",
"order_id"
] | [
"select",
"order_id",
",",
"sum",
"(",
"product_quantity",
")",
"from",
"order_items",
"group",
"by",
"order_id"
] | [
"Give",
"the",
"order",
"ids",
"for",
"all",
"orders",
",",
"as",
"well",
"as",
"the",
"total",
"product",
"quantity",
"in",
"each",
"."
] | [
"Give",
"the",
"<mask>",
"ids",
"for",
"all",
"<mask>",
",",
"as",
"well",
"as",
"the",
"<mask>",
"<mask>",
"<mask>",
"in",
"each",
"."
] | [
"select",
"<mask>",
",",
"sum",
"(",
"<mask>",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
customers_and_invoices | SELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items ) | How many products were not included in any order? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"products",
"WHERE",
"product_id",
"NOT",
"IN",
"(",
"SELECT",
"product_id",
"FROM",
"Order_items",
")"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"products",
"where",
"product_id",
"not",
"in",
"(",
"select",
"product_id",
"from",
"order_items",
")"
] | [
"How",
"many",
"products",
"were",
"not",
"included",
"in",
"any",
"order",
"?"
] | [
"How",
"many",
"<mask>",
"were",
"not",
"included",
"in",
"any",
"<mask>",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
"not",
"in",
"(",
"select",
"<mask>",
"from",
"<mask>",
")"
] |
customers_and_invoices | SELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items ) | Count the number of products that were never ordered. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"products",
"WHERE",
"product_id",
"NOT",
"IN",
"(",
"SELECT",
"product_id",
"FROM",
"Order_items",
")"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"products",
"where",
"product_id",
"not",
"in",
"(",
"select",
"product_id",
"from",
"order_items",
")"
] | [
"Count",
"the",
"number",
"of",
"products",
"that",
"were",
"never",
"ordered",
"."
] | [
"Count",
"the",
"<mask>",
"of",
"<mask>",
"that",
"were",
"never",
"<mask>",
"."
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
"not",
"in",
"(",
"select",
"<mask>",
"from",
"<mask>",
")"
] |
wedding | SELECT count(*) FROM Church WHERE Open_Date < 1850 | How many churches opened before 1850 are there? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"Church",
"WHERE",
"Open_Date",
"<",
"1850"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"church",
"where",
"open_date",
"<",
"value"
] | [
"How",
"many",
"churches",
"opened",
"before",
"1850",
"are",
"there",
"?"
] | [
"How",
"many",
"<mask>",
"<mask>",
"before",
"<unk>",
"are",
"there",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
"<",
"<unk>"
] |
wedding | SELECT name , open_date , organized_by FROM Church | Show the name, open date, and organizer for all churches. | [
"SELECT",
"name",
",",
"open_date",
",",
"organized_by",
"FROM",
"Church"
] | [
"select",
"name",
",",
"open_date",
",",
"organized_by",
"from",
"church"
] | [
"Show",
"the",
"name",
",",
"open",
"date",
",",
"and",
"organizer",
"for",
"all",
"churches",
"."
] | [
"Show",
"the",
"<mask>",
",",
"<mask>",
"<mask>",
",",
"and",
"organizer",
"for",
"all",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"<mask>",
",",
"<mask>",
"from",
"<mask>"
] |
wedding | SELECT name FROM church ORDER BY open_date DESC | List all church names in descending order of opening date. | [
"SELECT",
"name",
"FROM",
"church",
"ORDER",
"BY",
"open_date",
"DESC"
] | [
"select",
"name",
"from",
"church",
"order",
"by",
"open_date",
"desc"
] | [
"List",
"all",
"church",
"names",
"in",
"descending",
"order",
"of",
"opening",
"date",
"."
] | [
"List",
"all",
"<mask>",
"<mask>",
"in",
"descending",
"order",
"of",
"<mask>",
"<mask>",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"order",
"by",
"<mask>",
"desc"
] |
wedding | SELECT open_date FROM church GROUP BY open_date HAVING count(*) >= 2 | Show the opening year in whcih at least two churches opened. | [
"SELECT",
"open_date",
"FROM",
"church",
"GROUP",
"BY",
"open_date",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"open_date",
"from",
"church",
"group",
"by",
"open_date",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"Show",
"the",
"opening",
"year",
"in",
"whcih",
"at",
"least",
"two",
"churches",
"opened",
"."
] | [
"Show",
"the",
"<mask>",
"<mask>",
"in",
"whcih",
"at",
"least",
"two",
"<mask>",
"<mask>",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"group",
"by",
"<mask>",
"<mask>",
"count",
"(",
"*",
")",
">",
"=",
"<unk>"
] |
wedding | SELECT organized_by , name FROM church WHERE open_date BETWEEN 1830 AND 1840 | Show the organizer and name for churches that opened between 1830 and 1840. | [
"SELECT",
"organized_by",
",",
"name",
"FROM",
"church",
"WHERE",
"open_date",
"BETWEEN",
"1830",
"AND",
"1840"
] | [
"select",
"organized_by",
",",
"name",
"from",
"church",
"where",
"open_date",
"between",
"value",
"and",
"value"
] | [
"Show",
"the",
"organizer",
"and",
"name",
"for",
"churches",
"that",
"opened",
"between",
"1830",
"and",
"1840",
"."
] | [
"Show",
"the",
"organizer",
"and",
"<mask>",
"for",
"<mask>",
"that",
"<mask>",
"between",
"<unk>",
"and",
"<unk>",
"."
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"between",
"<unk>",
"and",
"<unk>"
] |
wedding | SELECT open_date , count(*) FROM church GROUP BY open_date | Show all opening years and the number of churches that opened in that year. | [
"SELECT",
"open_date",
",",
"count",
"(",
"*",
")",
"FROM",
"church",
"GROUP",
"BY",
"open_date"
] | [
"select",
"open_date",
",",
"count",
"(",
"*",
")",
"from",
"church",
"group",
"by",
"open_date"
] | [
"Show",
"all",
"opening",
"years",
"and",
"the",
"number",
"of",
"churches",
"that",
"opened",
"in",
"that",
"year",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"and",
"the",
"number",
"of",
"<mask>",
"that",
"<mask>",
"in",
"that",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
wedding | SELECT name , open_date FROM church ORDER BY open_date DESC LIMIT 3 | Show the name and opening year for three churches that opened most recently. | [
"SELECT",
"name",
",",
"open_date",
"FROM",
"church",
"ORDER",
"BY",
"open_date",
"DESC",
"LIMIT",
"3"
] | [
"select",
"name",
",",
"open_date",
"from",
"church",
"order",
"by",
"open_date",
"desc",
"limit",
"value"
] | [
"Show",
"the",
"name",
"and",
"opening",
"year",
"for",
"three",
"churches",
"that",
"opened",
"most",
"recently",
"."
] | [
"Show",
"the",
"<mask>",
"and",
"<mask>",
"<mask>",
"for",
"three",
"<mask>",
"that",
"<mask>",
"most",
"recently",
"."
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"order",
"by",
"<mask>",
"desc",
"limit",
"<unk>"
] |
wedding | SELECT count(*) FROM people WHERE is_male = 'F' AND age > 30 | How many female people are older than 30 in our record? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"people",
"WHERE",
"is_male",
"=",
"'F",
"'",
"AND",
"age",
">",
"30"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"people",
"where",
"is_male",
"=",
"value",
"and",
"age",
">",
"value"
] | [
"How",
"many",
"female",
"people",
"are",
"older",
"than",
"30",
"in",
"our",
"record",
"?"
] | [
"How",
"many",
"<mask>",
"<mask>",
"are",
"older",
"than",
"<unk>",
"in",
"our",
"record",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
"=",
"<unk>",
"and",
"<mask>",
">",
"<unk>"
] |
wedding | SELECT country FROM people WHERE age < 25 INTERSECT SELECT country FROM people WHERE age > 30 | Show the country where people older than 30 and younger than 25 are from. | [
"SELECT",
"country",
"FROM",
"people",
"WHERE",
"age",
"<",
"25",
"INTERSECT",
"SELECT",
"country",
"FROM",
"people",
"WHERE",
"age",
">",
"30"
] | [
"select",
"country",
"from",
"people",
"where",
"age",
"<",
"value",
"intersect",
"select",
"country",
"from",
"people",
"where",
"age",
">",
"value"
] | [
"Show",
"the",
"country",
"where",
"people",
"older",
"than",
"30",
"and",
"younger",
"than",
"25",
"are",
"from",
"."
] | [
"Show",
"the",
"<mask>",
"where",
"<mask>",
"older",
"than",
"<unk>",
"and",
"younger",
"than",
"<unk>",
"are",
"from",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"<",
"<unk>",
"intersect",
"select",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
">",
"<unk>"
] |
wedding | SELECT min(age) , max(age) , avg(age) FROM people | Show the minimum, maximum, and average age for all people. | [
"SELECT",
"min",
"(",
"age",
")",
",",
"max",
"(",
"age",
")",
",",
"avg",
"(",
"age",
")",
"FROM",
"people"
] | [
"select",
"min",
"(",
"age",
")",
",",
"max",
"(",
"age",
")",
",",
"avg",
"(",
"age",
")",
"from",
"people"
] | [
"Show",
"the",
"minimum",
",",
"maximum",
",",
"and",
"average",
"age",
"for",
"all",
"people",
"."
] | [
"Show",
"the",
"minimum",
",",
"maximum",
",",
"and",
"average",
"<mask>",
"for",
"all",
"<mask>",
"."
] | [
"select",
"min",
"(",
"<mask>",
")",
",",
"max",
"(",
"<mask>",
")",
",",
"avg",
"(",
"<mask>",
")",
"from",
"<mask>"
] |
wedding | SELECT name , country FROM people WHERE age < (SELECT avg(age) FROM people) | Show the name and country for all people whose age is smaller than the average. | [
"SELECT",
"name",
",",
"country",
"FROM",
"people",
"WHERE",
"age",
"<",
"(",
"SELECT",
"avg",
"(",
"age",
")",
"FROM",
"people",
")"
] | [
"select",
"name",
",",
"country",
"from",
"people",
"where",
"age",
"<",
"(",
"select",
"avg",
"(",
"age",
")",
"from",
"people",
")"
] | [
"Show",
"the",
"name",
"and",
"country",
"for",
"all",
"people",
"whose",
"age",
"is",
"smaller",
"than",
"the",
"average",
"."
] | [
"Show",
"the",
"<mask>",
"and",
"<mask>",
"for",
"all",
"<mask>",
"whose",
"<mask>",
"is",
"smaller",
"than",
"the",
"average",
"."
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"<",
"(",
"select",
"avg",
"(",
"<mask>",
")",
"from",
"<mask>",
")"
] |
wedding | SELECT T2.name , T3.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id WHERE T1.year > 2014 | Show the pair of male and female names in all weddings after year 2014 | [
"SELECT",
"T2.name",
",",
"T3.name",
"FROM",
"wedding",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.male_id",
"=",
"T2.people_id",
"JOIN",
"people",
"AS",
"T3",
"ON",
"T1.female_id",
"=",
"T3.people_id",
"WHERE",
"T1.year",
">",
"2014"
] | [
"select",
"t2",
".",
"name",
",",
"t3",
".",
"name",
"from",
"wedding",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"male_id",
"=",
"t2",
".",
"people_id",
"join",
"people",
"as",
"t3",
"on",
"t1",
".",
"female_id",
"=",
"t3",
".",
... | [
"Show",
"the",
"pair",
"of",
"male",
"and",
"female",
"names",
"in",
"all",
"weddings",
"after",
"year",
"2014"
] | [
"Show",
"the",
"pair",
"of",
"<mask>",
"and",
"<mask>",
"<mask>",
"in",
"all",
"<mask>",
"after",
"<mask>",
"<unk>"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mas... |
wedding | SELECT name , age FROM people WHERE is_male = 'T' AND people_id NOT IN (SELECT male_id FROM wedding) | Show the name and age for all male people who don't have a wedding. | [
"SELECT",
"name",
",",
"age",
"FROM",
"people",
"WHERE",
"is_male",
"=",
"'T",
"'",
"AND",
"people_id",
"NOT",
"IN",
"(",
"SELECT",
"male_id",
"FROM",
"wedding",
")"
] | [
"select",
"name",
",",
"age",
"from",
"people",
"where",
"is_male",
"=",
"value",
"and",
"people_id",
"not",
"in",
"(",
"select",
"male_id",
"from",
"wedding",
")"
] | [
"Show",
"the",
"name",
"and",
"age",
"for",
"all",
"male",
"people",
"who",
"do",
"n't",
"have",
"a",
"wedding",
"."
] | [
"Show",
"the",
"<mask>",
"and",
"<mask>",
"for",
"all",
"<mask>",
"<mask>",
"who",
"do",
"n't",
"have",
"a",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"=",
"<unk>",
"and",
"<mask>",
"not",
"in",
"(",
"select",
"<mask>",
"from",
"<mask>",
")"
] |
wedding | SELECT name FROM church EXCEPT SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id WHERE T2.year = 2015 | Show all church names except for those that had a wedding in year 2015. | [
"SELECT",
"name",
"FROM",
"church",
"EXCEPT",
"SELECT",
"T1.name",
"FROM",
"church",
"AS",
"T1",
"JOIN",
"wedding",
"AS",
"T2",
"ON",
"T1.church_id",
"=",
"T2.church_id",
"WHERE",
"T2.year",
"=",
"2015"
] | [
"select",
"name",
"from",
"church",
"except",
"select",
"t1",
".",
"name",
"from",
"church",
"as",
"t1",
"join",
"wedding",
"as",
"t2",
"on",
"t1",
".",
"church_id",
"=",
"t2",
".",
"church_id",
"where",
"t2",
".",
"year",
"=",
"value"
] | [
"Show",
"all",
"church",
"names",
"except",
"for",
"those",
"that",
"had",
"a",
"wedding",
"in",
"year",
"2015",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"except",
"for",
"those",
"that",
"had",
"a",
"<mask>",
"in",
"<mask>",
"<unk>",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"except",
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
"=",
"<unk... |
wedding | SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id GROUP BY T1.church_id HAVING count(*) >= 2 | Show all church names that have hosted least two weddings. | [
"SELECT",
"T1.name",
"FROM",
"church",
"AS",
"T1",
"JOIN",
"wedding",
"AS",
"T2",
"ON",
"T1.church_id",
"=",
"T2.church_id",
"GROUP",
"BY",
"T1.church_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"=",
"2"
] | [
"select",
"t1",
".",
"name",
"from",
"church",
"as",
"t1",
"join",
"wedding",
"as",
"t2",
"on",
"t1",
".",
"church_id",
"=",
"t2",
".",
"church_id",
"group",
"by",
"t1",
".",
"church_id",
"having",
"count",
"(",
"*",
")",
">",
"=",
"value"
] | [
"Show",
"all",
"church",
"names",
"that",
"have",
"hosted",
"least",
"two",
"weddings",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"that",
"have",
"hosted",
"least",
"two",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>",
"<mask>",
"count",
"(",
"*",
")",
">",
"=",
"<un... |
wedding | SELECT T2.name FROM wedding AS T1 JOIN people AS T2 ON T1.female_id = T2.people_id WHERE T1.year = 2016 AND T2.is_male = 'F' AND T2.country = 'Canada' | Show the names for all females from Canada having a wedding in year 2016. | [
"SELECT",
"T2.name",
"FROM",
"wedding",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.female_id",
"=",
"T2.people_id",
"WHERE",
"T1.year",
"=",
"2016",
"AND",
"T2.is_male",
"=",
"'F",
"'",
"AND",
"T2.country",
"=",
"'Canada",
"'"
] | [
"select",
"t2",
".",
"name",
"from",
"wedding",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"female_id",
"=",
"t2",
".",
"people_id",
"where",
"t1",
".",
"year",
"=",
"value",
"and",
"t2",
".",
"is_male",
"=",
"value",
"and",
"t2",
"... | [
"Show",
"the",
"names",
"for",
"all",
"females",
"from",
"Canada",
"having",
"a",
"wedding",
"in",
"year",
"2016",
"."
] | [
"Show",
"the",
"<mask>",
"for",
"all",
"<mask>",
"from",
"Canada",
"having",
"a",
"<mask>",
"in",
"<mask>",
"<unk>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
"=",
"<unk>",
"and",
"<mask>",
".",
"<mask>",
"=",
"<unk... |
wedding | SELECT count(*) FROM wedding WHERE YEAR = 2016 | How many weddings are there in year 2016? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"wedding",
"WHERE",
"YEAR",
"=",
"2016"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"wedding",
"where",
"year",
"=",
"value"
] | [
"How",
"many",
"weddings",
"are",
"there",
"in",
"year",
"2016",
"?"
] | [
"How",
"many",
"<mask>",
"are",
"there",
"in",
"<mask>",
"<unk>",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
"=",
"<unk>"
] |
wedding | SELECT T4.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id JOIN church AS T4 ON T4.church_id = T1.church_id WHERE T2.age > 30 OR T3.age > 30 | Show the church names for the weddings of all people older than 30. | [
"SELECT",
"T4.name",
"FROM",
"wedding",
"AS",
"T1",
"JOIN",
"people",
"AS",
"T2",
"ON",
"T1.male_id",
"=",
"T2.people_id",
"JOIN",
"people",
"AS",
"T3",
"ON",
"T1.female_id",
"=",
"T3.people_id",
"JOIN",
"church",
"AS",
"T4",
"ON",
"T4.church_id",
"=",
"T1.c... | [
"select",
"t4",
".",
"name",
"from",
"wedding",
"as",
"t1",
"join",
"people",
"as",
"t2",
"on",
"t1",
".",
"male_id",
"=",
"t2",
".",
"people_id",
"join",
"people",
"as",
"t3",
"on",
"t1",
".",
"female_id",
"=",
"t3",
".",
"people_id",
"join",
"churc... | [
"Show",
"the",
"church",
"names",
"for",
"the",
"weddings",
"of",
"all",
"people",
"older",
"than",
"30",
"."
] | [
"Show",
"the",
"<mask>",
"<mask>",
"for",
"the",
"<mask>",
"of",
"all",
"<mask>",
"older",
"than",
"<unk>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mas... |
wedding | SELECT country , count(*) FROM people GROUP BY country | Show all countries and the number of people from each country. | [
"SELECT",
"country",
",",
"count",
"(",
"*",
")",
"FROM",
"people",
"GROUP",
"BY",
"country"
] | [
"select",
"country",
",",
"count",
"(",
"*",
")",
"from",
"people",
"group",
"by",
"country"
] | [
"Show",
"all",
"countries",
"and",
"the",
"number",
"of",
"people",
"from",
"each",
"country",
"."
] | [
"Show",
"all",
"<mask>",
"and",
"the",
"number",
"of",
"<mask>",
"from",
"each",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"group",
"by",
"<mask>"
] |
wedding | SELECT COUNT (DISTINCT church_id) FROM wedding WHERE YEAR = 2016 | How many churches have a wedding in year 2016? | [
"SELECT",
"COUNT",
"(",
"DISTINCT",
"church_id",
")",
"FROM",
"wedding",
"WHERE",
"YEAR",
"=",
"2016"
] | [
"select",
"count",
"(",
"distinct",
"church_id",
")",
"from",
"wedding",
"where",
"year",
"=",
"value"
] | [
"How",
"many",
"churches",
"have",
"a",
"wedding",
"in",
"year",
"2016",
"?"
] | [
"How",
"many",
"<mask>",
"have",
"a",
"<mask>",
"in",
"<mask>",
"<unk>",
"?"
] | [
"select",
"count",
"(",
"distinct",
"<mask>",
")",
"from",
"<mask>",
"where",
"<mask>",
"=",
"<unk>"
] |
theme_gallery | SELECT count(*) FROM artist | How many artists do we have? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"artist"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"artist"
] | [
"How",
"many",
"artists",
"do",
"we",
"have",
"?"
] | [
"How",
"many",
"<mask>",
"do",
"we",
"have",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>"
] |
theme_gallery | SELECT count(*) FROM artist | Count the number of artists. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"artist"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"artist"
] | [
"Count",
"the",
"number",
"of",
"artists",
"."
] | [
"Count",
"the",
"number",
"of",
"<mask>",
"."
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>"
] |
theme_gallery | SELECT name , age , country FROM artist ORDER BY Year_Join | Show all artist name, age, and country ordered by the yeared they joined. | [
"SELECT",
"name",
",",
"age",
",",
"country",
"FROM",
"artist",
"ORDER",
"BY",
"Year_Join"
] | [
"select",
"name",
",",
"age",
",",
"country",
"from",
"artist",
"order",
"by",
"year_join"
] | [
"Show",
"all",
"artist",
"name",
",",
"age",
",",
"and",
"country",
"ordered",
"by",
"the",
"yeared",
"they",
"joined",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
",",
"<mask>",
",",
"and",
"<mask>",
"ordered",
"by",
"the",
"yeared",
"they",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"order",
"by",
"<mask>"
] |
theme_gallery | SELECT name , age , country FROM artist ORDER BY Year_Join | What are the names, ages, and countries of artists, sorted by the year they joined? | [
"SELECT",
"name",
",",
"age",
",",
"country",
"FROM",
"artist",
"ORDER",
"BY",
"Year_Join"
] | [
"select",
"name",
",",
"age",
",",
"country",
"from",
"artist",
"order",
"by",
"year_join"
] | [
"What",
"are",
"the",
"names",
",",
"ages",
",",
"and",
"countries",
"of",
"artists",
",",
"sorted",
"by",
"the",
"year",
"they",
"joined",
"?"
] | [
"What",
"are",
"the",
"<mask>",
",",
"<mask>",
",",
"and",
"<mask>",
"of",
"<mask>",
",",
"sorted",
"by",
"the",
"<mask>",
"they",
"<mask>",
"?"
] | [
"select",
"<mask>",
",",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"order",
"by",
"<mask>"
] |
theme_gallery | SELECT DISTINCT country FROM artist | What are all distinct country for artists? | [
"SELECT",
"DISTINCT",
"country",
"FROM",
"artist"
] | [
"select",
"distinct",
"country",
"from",
"artist"
] | [
"What",
"are",
"all",
"distinct",
"country",
"for",
"artists",
"?"
] | [
"What",
"are",
"all",
"distinct",
"<mask>",
"for",
"<mask>",
"?"
] | [
"select",
"distinct",
"<mask>",
"from",
"<mask>"
] |
theme_gallery | SELECT DISTINCT country FROM artist | Return the different countries for artists. | [
"SELECT",
"DISTINCT",
"country",
"FROM",
"artist"
] | [
"select",
"distinct",
"country",
"from",
"artist"
] | [
"Return",
"the",
"different",
"countries",
"for",
"artists",
"."
] | [
"Return",
"the",
"different",
"<mask>",
"for",
"<mask>",
"."
] | [
"select",
"distinct",
"<mask>",
"from",
"<mask>"
] |
theme_gallery | SELECT name , year_join FROM artist WHERE country != 'United States' | Show all artist names and the year joined who are not from United States. | [
"SELECT",
"name",
",",
"year_join",
"FROM",
"artist",
"WHERE",
"country",
"!",
"=",
"'United",
"States",
"'"
] | [
"select",
"name",
",",
"year_join",
"from",
"artist",
"where",
"country",
"!",
"=",
"value"
] | [
"Show",
"all",
"artist",
"names",
"and",
"the",
"year",
"joined",
"who",
"are",
"not",
"from",
"United",
"States",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"and",
"the",
"<mask>",
"<mask>",
"who",
"are",
"not",
"from",
"United",
"States",
"."
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"!",
"=",
"<unk>"
] |
theme_gallery | SELECT name , year_join FROM artist WHERE country != 'United States' | What are the names and year of joining for artists that do not have the country "United States"? | [
"SELECT",
"name",
",",
"year_join",
"FROM",
"artist",
"WHERE",
"country",
"!",
"=",
"'United",
"States",
"'"
] | [
"select",
"name",
",",
"year_join",
"from",
"artist",
"where",
"country",
"!",
"=",
"value"
] | [
"What",
"are",
"the",
"names",
"and",
"year",
"of",
"joining",
"for",
"artists",
"that",
"do",
"not",
"have",
"the",
"country",
"``",
"United",
"States",
"''",
"?"
] | [
"What",
"are",
"the",
"<mask>",
"and",
"<mask>",
"of",
"<mask>",
"for",
"<mask>",
"that",
"do",
"not",
"have",
"the",
"<mask>",
"``",
"United",
"States",
"''",
"?"
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"!",
"=",
"<unk>"
] |
theme_gallery | SELECT count(*) FROM artist WHERE age > 46 AND year_join > 1990 | How many artists are above age 46 and joined after 1990? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"artist",
"WHERE",
"age",
">",
"46",
"AND",
"year_join",
">",
"1990"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"artist",
"where",
"age",
">",
"value",
"and",
"year_join",
">",
"value"
] | [
"How",
"many",
"artists",
"are",
"above",
"age",
"46",
"and",
"joined",
"after",
"1990",
"?"
] | [
"How",
"many",
"<mask>",
"are",
"above",
"<mask>",
"<unk>",
"and",
"<mask>",
"after",
"<unk>",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
">",
"<unk>",
"and",
"<mask>",
">",
"<unk>"
] |
theme_gallery | SELECT count(*) FROM artist WHERE age > 46 AND year_join > 1990 | Count the number of artists who are older than 46 and joined after 1990. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"artist",
"WHERE",
"age",
">",
"46",
"AND",
"year_join",
">",
"1990"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"artist",
"where",
"age",
">",
"value",
"and",
"year_join",
">",
"value"
] | [
"Count",
"the",
"number",
"of",
"artists",
"who",
"are",
"older",
"than",
"46",
"and",
"joined",
"after",
"1990",
"."
] | [
"Count",
"the",
"number",
"of",
"<mask>",
"who",
"are",
"older",
"than",
"<unk>",
"and",
"<mask>",
"after",
"<unk>",
"."
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
">",
"<unk>",
"and",
"<mask>",
">",
"<unk>"
] |
theme_gallery | SELECT avg(age) , min(age) FROM artist WHERE country = 'United States' | What is the average and minimum age of all artists from United States. | [
"SELECT",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
"FROM",
"artist",
"WHERE",
"country",
"=",
"'United",
"States",
"'"
] | [
"select",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
"from",
"artist",
"where",
"country",
"=",
"value"
] | [
"What",
"is",
"the",
"average",
"and",
"minimum",
"age",
"of",
"all",
"artists",
"from",
"United",
"States",
"."
] | [
"What",
"is",
"the",
"average",
"and",
"minimum",
"<mask>",
"of",
"all",
"<mask>",
"from",
"United",
"States",
"."
] | [
"select",
"avg",
"(",
"<mask>",
")",
",",
"min",
"(",
"<mask>",
")",
"from",
"<mask>",
"where",
"<mask>",
"=",
"<unk>"
] |
theme_gallery | SELECT avg(age) , min(age) FROM artist WHERE country = 'United States' | Return the average and minimum ages across artists from the United States. | [
"SELECT",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
"FROM",
"artist",
"WHERE",
"country",
"=",
"'United",
"States",
"'"
] | [
"select",
"avg",
"(",
"age",
")",
",",
"min",
"(",
"age",
")",
"from",
"artist",
"where",
"country",
"=",
"value"
] | [
"Return",
"the",
"average",
"and",
"minimum",
"ages",
"across",
"artists",
"from",
"the",
"United",
"States",
"."
] | [
"Return",
"the",
"average",
"and",
"minimum",
"<mask>",
"across",
"<mask>",
"from",
"the",
"United",
"States",
"."
] | [
"select",
"avg",
"(",
"<mask>",
")",
",",
"min",
"(",
"<mask>",
")",
"from",
"<mask>",
"where",
"<mask>",
"=",
"<unk>"
] |
theme_gallery | SELECT name FROM artist ORDER BY year_join DESC LIMIT 1 | What is the name of the artist who joined latest? | [
"SELECT",
"name",
"FROM",
"artist",
"ORDER",
"BY",
"year_join",
"DESC",
"LIMIT",
"1"
] | [
"select",
"name",
"from",
"artist",
"order",
"by",
"year_join",
"desc",
"limit",
"value"
] | [
"What",
"is",
"the",
"name",
"of",
"the",
"artist",
"who",
"joined",
"latest",
"?"
] | [
"What",
"is",
"the",
"<mask>",
"of",
"the",
"<mask>",
"who",
"<mask>",
"latest",
"?"
] | [
"select",
"<mask>",
"from",
"<mask>",
"order",
"by",
"<mask>",
"desc",
"limit",
"<unk>"
] |
theme_gallery | SELECT name FROM artist ORDER BY year_join DESC LIMIT 1 | Return the name of the artist who has the latest join year. | [
"SELECT",
"name",
"FROM",
"artist",
"ORDER",
"BY",
"year_join",
"DESC",
"LIMIT",
"1"
] | [
"select",
"name",
"from",
"artist",
"order",
"by",
"year_join",
"desc",
"limit",
"value"
] | [
"Return",
"the",
"name",
"of",
"the",
"artist",
"who",
"has",
"the",
"latest",
"join",
"year",
"."
] | [
"Return",
"the",
"<mask>",
"of",
"the",
"<mask>",
"who",
"has",
"the",
"latest",
"<mask>",
"<mask>",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"order",
"by",
"<mask>",
"desc",
"limit",
"<unk>"
] |
theme_gallery | SELECT count(*) FROM exhibition WHERE YEAR >= 2005 | How many exhibition are there in year 2005 or after? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"exhibition",
"WHERE",
"YEAR",
">",
"=",
"2005"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"exhibition",
"where",
"year",
">",
"=",
"value"
] | [
"How",
"many",
"exhibition",
"are",
"there",
"in",
"year",
"2005",
"or",
"after",
"?"
] | [
"How",
"many",
"<mask>",
"are",
"there",
"in",
"<mask>",
"<unk>",
"or",
"after",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
">",
"=",
"<unk>"
] |
theme_gallery | SELECT count(*) FROM exhibition WHERE YEAR >= 2005 | Count the number of exhibitions that happened in or after 2005. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"exhibition",
"WHERE",
"YEAR",
">",
"=",
"2005"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"exhibition",
"where",
"year",
">",
"=",
"value"
] | [
"Count",
"the",
"number",
"of",
"exhibitions",
"that",
"happened",
"in",
"or",
"after",
"2005",
"."
] | [
"Count",
"the",
"number",
"of",
"<mask>",
"that",
"happened",
"in",
"or",
"after",
"<unk>",
"."
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
">",
"=",
"<unk>"
] |
theme_gallery | SELECT theme , YEAR FROM exhibition WHERE ticket_price < 15 | Show theme and year for all exhibitions with ticket prices lower than 15. | [
"SELECT",
"theme",
",",
"YEAR",
"FROM",
"exhibition",
"WHERE",
"ticket_price",
"<",
"15"
] | [
"select",
"theme",
",",
"year",
"from",
"exhibition",
"where",
"ticket_price",
"<",
"value"
] | [
"Show",
"theme",
"and",
"year",
"for",
"all",
"exhibitions",
"with",
"ticket",
"prices",
"lower",
"than",
"15",
"."
] | [
"Show",
"<mask>",
"and",
"<mask>",
"for",
"all",
"<mask>",
"with",
"<mask>",
"<mask>",
"lower",
"than",
"<unk>",
"."
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"<",
"<unk>"
] |
theme_gallery | SELECT theme , YEAR FROM exhibition WHERE ticket_price < 15 | What are the theme and year for all exhibitions that have a ticket price under 15? | [
"SELECT",
"theme",
",",
"YEAR",
"FROM",
"exhibition",
"WHERE",
"ticket_price",
"<",
"15"
] | [
"select",
"theme",
",",
"year",
"from",
"exhibition",
"where",
"ticket_price",
"<",
"value"
] | [
"What",
"are",
"the",
"theme",
"and",
"year",
"for",
"all",
"exhibitions",
"that",
"have",
"a",
"ticket",
"price",
"under",
"15",
"?"
] | [
"What",
"are",
"the",
"<mask>",
"and",
"<mask>",
"for",
"all",
"<mask>",
"that",
"have",
"a",
"<mask>",
"<mask>",
"under",
"<unk>",
"?"
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"<",
"<unk>"
] |
theme_gallery | SELECT T2.name , count(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id | Show all artist names and the number of exhibitions for each artist. | [
"SELECT",
"T2.name",
",",
"count",
"(",
"*",
")",
"FROM",
"exhibition",
"AS",
"T1",
"JOIN",
"artist",
"AS",
"T2",
"ON",
"T1.artist_id",
"=",
"T2.artist_id",
"GROUP",
"BY",
"T1.artist_id"
] | [
"select",
"t2",
".",
"name",
",",
"count",
"(",
"*",
")",
"from",
"exhibition",
"as",
"t1",
"join",
"artist",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"group",
"by",
"t1",
".",
"artist_id"
] | [
"Show",
"all",
"artist",
"names",
"and",
"the",
"number",
"of",
"exhibitions",
"for",
"each",
"artist",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"and",
"the",
"number",
"of",
"<mask>",
"for",
"each",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>"
] |
theme_gallery | SELECT T2.name , count(*) FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id | How many exhibitions has each artist had? | [
"SELECT",
"T2.name",
",",
"count",
"(",
"*",
")",
"FROM",
"exhibition",
"AS",
"T1",
"JOIN",
"artist",
"AS",
"T2",
"ON",
"T1.artist_id",
"=",
"T2.artist_id",
"GROUP",
"BY",
"T1.artist_id"
] | [
"select",
"t2",
".",
"name",
",",
"count",
"(",
"*",
")",
"from",
"exhibition",
"as",
"t1",
"join",
"artist",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"group",
"by",
"t1",
".",
"artist_id"
] | [
"How",
"many",
"exhibitions",
"has",
"each",
"artist",
"had",
"?"
] | [
"How",
"many",
"<mask>",
"has",
"each",
"<mask>",
"had",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"count",
"(",
"*",
")",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>"
] |
theme_gallery | SELECT T2.name , T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY count(*) DESC LIMIT 1 | What is the name and country for the artist with most number of exhibitions? | [
"SELECT",
"T2.name",
",",
"T2.country",
"FROM",
"exhibition",
"AS",
"T1",
"JOIN",
"artist",
"AS",
"T2",
"ON",
"T1.artist_id",
"=",
"T2.artist_id",
"GROUP",
"BY",
"T1.artist_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t2",
".",
"name",
",",
"t2",
".",
"country",
"from",
"exhibition",
"as",
"t1",
"join",
"artist",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"group",
"by",
"t1",
".",
"artist_id",
"order",
"by",
"count",
"(",
"*"... | [
"What",
"is",
"the",
"name",
"and",
"country",
"for",
"the",
"artist",
"with",
"most",
"number",
"of",
"exhibitions",
"?"
] | [
"What",
"is",
"the",
"<mask>",
"and",
"<mask>",
"for",
"the",
"<mask>",
"with",
"most",
"number",
"of",
"<mask>",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>",
"order",
"by",
"coun... |
theme_gallery | SELECT T2.name , T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY count(*) DESC LIMIT 1 | Return the name and country corresponding to the artist who has had the most exhibitions. | [
"SELECT",
"T2.name",
",",
"T2.country",
"FROM",
"exhibition",
"AS",
"T1",
"JOIN",
"artist",
"AS",
"T2",
"ON",
"T1.artist_id",
"=",
"T2.artist_id",
"GROUP",
"BY",
"T1.artist_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
] | [
"select",
"t2",
".",
"name",
",",
"t2",
".",
"country",
"from",
"exhibition",
"as",
"t1",
"join",
"artist",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"group",
"by",
"t1",
".",
"artist_id",
"order",
"by",
"count",
"(",
"*"... | [
"Return",
"the",
"name",
"and",
"country",
"corresponding",
"to",
"the",
"artist",
"who",
"has",
"had",
"the",
"most",
"exhibitions",
"."
] | [
"Return",
"the",
"<mask>",
"and",
"<mask>",
"corresponding",
"to",
"the",
"<mask>",
"who",
"has",
"had",
"the",
"most",
"<mask>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"group",
"by",
"<mask>",
".",
"<mask>",
"order",
"by",
"coun... |
theme_gallery | SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition) | Show names for artists without any exhibition. | [
"SELECT",
"name",
"FROM",
"artist",
"WHERE",
"artist_id",
"NOT",
"IN",
"(",
"SELECT",
"artist_id",
"FROM",
"exhibition",
")"
] | [
"select",
"name",
"from",
"artist",
"where",
"artist_id",
"not",
"in",
"(",
"select",
"artist_id",
"from",
"exhibition",
")"
] | [
"Show",
"names",
"for",
"artists",
"without",
"any",
"exhibition",
"."
] | [
"Show",
"<mask>",
"for",
"<mask>",
"without",
"any",
"<mask>",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"not",
"in",
"(",
"select",
"<mask>",
"from",
"<mask>",
")"
] |
theme_gallery | SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition) | What are the names of artists that have not had any exhibitions? | [
"SELECT",
"name",
"FROM",
"artist",
"WHERE",
"artist_id",
"NOT",
"IN",
"(",
"SELECT",
"artist_id",
"FROM",
"exhibition",
")"
] | [
"select",
"name",
"from",
"artist",
"where",
"artist_id",
"not",
"in",
"(",
"select",
"artist_id",
"from",
"exhibition",
")"
] | [
"What",
"are",
"the",
"names",
"of",
"artists",
"that",
"have",
"not",
"had",
"any",
"exhibitions",
"?"
] | [
"What",
"are",
"the",
"<mask>",
"of",
"<mask>",
"that",
"have",
"not",
"had",
"any",
"<mask>",
"?"
] | [
"select",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"not",
"in",
"(",
"select",
"<mask>",
"from",
"<mask>",
")"
] |
theme_gallery | SELECT T1.theme , T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT avg(ticket_price) FROM exhibition) | What is the theme and artist name for the exhibition with a ticket price higher than the average? | [
"SELECT",
"T1.theme",
",",
"T2.name",
"FROM",
"exhibition",
"AS",
"T1",
"JOIN",
"artist",
"AS",
"T2",
"ON",
"T1.artist_id",
"=",
"T2.artist_id",
"WHERE",
"T1.ticket_price",
">",
"(",
"SELECT",
"avg",
"(",
"ticket_price",
")",
"FROM",
"exhibition",
")"
] | [
"select",
"t1",
".",
"theme",
",",
"t2",
".",
"name",
"from",
"exhibition",
"as",
"t1",
"join",
"artist",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"where",
"t1",
".",
"ticket_price",
">",
"(",
"select",
"avg",
"(",
"tick... | [
"What",
"is",
"the",
"theme",
"and",
"artist",
"name",
"for",
"the",
"exhibition",
"with",
"a",
"ticket",
"price",
"higher",
"than",
"the",
"average",
"?"
] | [
"What",
"is",
"the",
"<mask>",
"and",
"<mask>",
"<mask>",
"for",
"the",
"<mask>",
"with",
"a",
"<mask>",
"<mask>",
"higher",
"than",
"the",
"average",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
">",
"(",
"select",
"avg",... |
theme_gallery | SELECT T1.theme , T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.ticket_price > (SELECT avg(ticket_price) FROM exhibition) | Return the names of artists and the themes of their exhibitions that had a ticket price higher than average. | [
"SELECT",
"T1.theme",
",",
"T2.name",
"FROM",
"exhibition",
"AS",
"T1",
"JOIN",
"artist",
"AS",
"T2",
"ON",
"T1.artist_id",
"=",
"T2.artist_id",
"WHERE",
"T1.ticket_price",
">",
"(",
"SELECT",
"avg",
"(",
"ticket_price",
")",
"FROM",
"exhibition",
")"
] | [
"select",
"t1",
".",
"theme",
",",
"t2",
".",
"name",
"from",
"exhibition",
"as",
"t1",
"join",
"artist",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"where",
"t1",
".",
"ticket_price",
">",
"(",
"select",
"avg",
"(",
"tick... | [
"Return",
"the",
"names",
"of",
"artists",
"and",
"the",
"themes",
"of",
"their",
"exhibitions",
"that",
"had",
"a",
"ticket",
"price",
"higher",
"than",
"average",
"."
] | [
"Return",
"the",
"<mask>",
"of",
"<mask>",
"and",
"the",
"<mask>",
"of",
"their",
"<mask>",
"that",
"had",
"a",
"<mask>",
"<mask>",
"higher",
"than",
"average",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
">",
"(",
"select",
"avg",... |
theme_gallery | SELECT avg(ticket_price) , min(ticket_price) , max(ticket_price) FROM exhibition WHERE YEAR < 2009 | Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009. | [
"SELECT",
"avg",
"(",
"ticket_price",
")",
",",
"min",
"(",
"ticket_price",
")",
",",
"max",
"(",
"ticket_price",
")",
"FROM",
"exhibition",
"WHERE",
"YEAR",
"<",
"2009"
] | [
"select",
"avg",
"(",
"ticket_price",
")",
",",
"min",
"(",
"ticket_price",
")",
",",
"max",
"(",
"ticket_price",
")",
"from",
"exhibition",
"where",
"year",
"<",
"value"
] | [
"Show",
"the",
"average",
",",
"minimum",
",",
"and",
"maximum",
"ticket",
"prices",
"for",
"exhibitions",
"for",
"all",
"years",
"before",
"2009",
"."
] | [
"Show",
"the",
"average",
",",
"minimum",
",",
"and",
"maximum",
"<mask>",
"<mask>",
"for",
"<mask>",
"for",
"all",
"<mask>",
"before",
"<unk>",
"."
] | [
"select",
"avg",
"(",
"<mask>",
")",
",",
"min",
"(",
"<mask>",
")",
",",
"max",
"(",
"<mask>",
")",
"from",
"<mask>",
"where",
"<mask>",
"<",
"<unk>"
] |
theme_gallery | SELECT avg(ticket_price) , min(ticket_price) , max(ticket_price) FROM exhibition WHERE YEAR < 2009 | What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009? | [
"SELECT",
"avg",
"(",
"ticket_price",
")",
",",
"min",
"(",
"ticket_price",
")",
",",
"max",
"(",
"ticket_price",
")",
"FROM",
"exhibition",
"WHERE",
"YEAR",
"<",
"2009"
] | [
"select",
"avg",
"(",
"ticket_price",
")",
",",
"min",
"(",
"ticket_price",
")",
",",
"max",
"(",
"ticket_price",
")",
"from",
"exhibition",
"where",
"year",
"<",
"value"
] | [
"What",
"are",
"the",
"average",
",",
"minimum",
",",
"and",
"maximum",
"ticket",
"prices",
"for",
"exhibitions",
"that",
"happened",
"prior",
"to",
"2009",
"?"
] | [
"What",
"are",
"the",
"average",
",",
"minimum",
",",
"and",
"maximum",
"<mask>",
"<mask>",
"for",
"<mask>",
"that",
"happened",
"prior",
"to",
"<unk>",
"?"
] | [
"select",
"avg",
"(",
"<mask>",
")",
",",
"min",
"(",
"<mask>",
")",
",",
"max",
"(",
"<mask>",
")",
"from",
"<mask>",
"where",
"<mask>",
"<",
"<unk>"
] |
theme_gallery | SELECT theme , YEAR FROM exhibition ORDER BY ticket_price DESC | Show theme and year for all exhibitions in an descending order of ticket price. | [
"SELECT",
"theme",
",",
"YEAR",
"FROM",
"exhibition",
"ORDER",
"BY",
"ticket_price",
"DESC"
] | [
"select",
"theme",
",",
"year",
"from",
"exhibition",
"order",
"by",
"ticket_price",
"desc"
] | [
"Show",
"theme",
"and",
"year",
"for",
"all",
"exhibitions",
"in",
"an",
"descending",
"order",
"of",
"ticket",
"price",
"."
] | [
"Show",
"<mask>",
"and",
"<mask>",
"for",
"all",
"<mask>",
"in",
"an",
"descending",
"order",
"of",
"<mask>",
"<mask>",
"."
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"order",
"by",
"<mask>",
"desc"
] |
theme_gallery | SELECT theme , YEAR FROM exhibition ORDER BY ticket_price DESC | What are the themes and years for exhibitions, sorted by ticket price descending? | [
"SELECT",
"theme",
",",
"YEAR",
"FROM",
"exhibition",
"ORDER",
"BY",
"ticket_price",
"DESC"
] | [
"select",
"theme",
",",
"year",
"from",
"exhibition",
"order",
"by",
"ticket_price",
"desc"
] | [
"What",
"are",
"the",
"themes",
"and",
"years",
"for",
"exhibitions",
",",
"sorted",
"by",
"ticket",
"price",
"descending",
"?"
] | [
"What",
"are",
"the",
"<mask>",
"and",
"<mask>",
"for",
"<mask>",
",",
"sorted",
"by",
"<mask>",
"<mask>",
"descending",
"?"
] | [
"select",
"<mask>",
",",
"<mask>",
"from",
"<mask>",
"order",
"by",
"<mask>",
"desc"
] |
theme_gallery | SELECT T2.theme , T1.date , T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004 | What is the theme, date, and attendance for the exhibition in year 2004? | [
"SELECT",
"T2.theme",
",",
"T1.date",
",",
"T1.attendance",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOIN",
"exhibition",
"AS",
"T2",
"ON",
"T1.exhibition_id",
"=",
"T2.exhibition_id",
"WHERE",
"T2.year",
"=",
"2004"
] | [
"select",
"t2",
".",
"theme",
",",
"t1",
".",
"date",
",",
"t1",
".",
"attendance",
"from",
"exhibition_record",
"as",
"t1",
"join",
"exhibition",
"as",
"t2",
"on",
"t1",
".",
"exhibition_id",
"=",
"t2",
".",
"exhibition_id",
"where",
"t2",
".",
"year",
... | [
"What",
"is",
"the",
"theme",
",",
"date",
",",
"and",
"attendance",
"for",
"the",
"exhibition",
"in",
"year",
"2004",
"?"
] | [
"What",
"is",
"the",
"<mask>",
",",
"<mask>",
",",
"and",
"<mask>",
"for",
"the",
"<mask>",
"in",
"<mask>",
"<unk>",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask... |
theme_gallery | SELECT T2.theme , T1.date , T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T2.year = 2004 | Return the themes, dates, and attendance for exhibitions that happened in 2004. | [
"SELECT",
"T2.theme",
",",
"T1.date",
",",
"T1.attendance",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOIN",
"exhibition",
"AS",
"T2",
"ON",
"T1.exhibition_id",
"=",
"T2.exhibition_id",
"WHERE",
"T2.year",
"=",
"2004"
] | [
"select",
"t2",
".",
"theme",
",",
"t1",
".",
"date",
",",
"t1",
".",
"attendance",
"from",
"exhibition_record",
"as",
"t1",
"join",
"exhibition",
"as",
"t2",
"on",
"t1",
".",
"exhibition_id",
"=",
"t2",
".",
"exhibition_id",
"where",
"t2",
".",
"year",
... | [
"Return",
"the",
"themes",
",",
"dates",
",",
"and",
"attendance",
"for",
"exhibitions",
"that",
"happened",
"in",
"2004",
"."
] | [
"Return",
"the",
"<mask>",
",",
"<mask>",
",",
"and",
"<mask>",
"for",
"<mask>",
"that",
"happened",
"in",
"<unk>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
",",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask... |
theme_gallery | SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004 | Show all artist names who didn't have an exhibition in 2004. | [
"SELECT",
"name",
"FROM",
"artist",
"EXCEPT",
"SELECT",
"T2.name",
"FROM",
"exhibition",
"AS",
"T1",
"JOIN",
"artist",
"AS",
"T2",
"ON",
"T1.artist_id",
"=",
"T2.artist_id",
"WHERE",
"T1.year",
"=",
"2004"
] | [
"select",
"name",
"from",
"artist",
"except",
"select",
"t2",
".",
"name",
"from",
"exhibition",
"as",
"t1",
"join",
"artist",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"where",
"t1",
".",
"year",
"=",
"value"
] | [
"Show",
"all",
"artist",
"names",
"who",
"did",
"n't",
"have",
"an",
"exhibition",
"in",
"2004",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"who",
"did",
"n't",
"have",
"an",
"<mask>",
"in",
"<unk>",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"except",
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
"=",
"<unk... |
theme_gallery | SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id WHERE T1.year = 2004 | What are the names of artists who did not have an exhibition in 2004? | [
"SELECT",
"name",
"FROM",
"artist",
"EXCEPT",
"SELECT",
"T2.name",
"FROM",
"exhibition",
"AS",
"T1",
"JOIN",
"artist",
"AS",
"T2",
"ON",
"T1.artist_id",
"=",
"T2.artist_id",
"WHERE",
"T1.year",
"=",
"2004"
] | [
"select",
"name",
"from",
"artist",
"except",
"select",
"t2",
".",
"name",
"from",
"exhibition",
"as",
"t1",
"join",
"artist",
"as",
"t2",
"on",
"t1",
".",
"artist_id",
"=",
"t2",
".",
"artist_id",
"where",
"t1",
".",
"year",
"=",
"value"
] | [
"What",
"are",
"the",
"names",
"of",
"artists",
"who",
"did",
"not",
"have",
"an",
"exhibition",
"in",
"2004",
"?"
] | [
"What",
"are",
"the",
"<mask>",
"of",
"<mask>",
"who",
"did",
"not",
"have",
"an",
"<mask>",
"in",
"<unk>",
"?"
] | [
"select",
"<mask>",
"from",
"<mask>",
"except",
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
"=",
"<unk... |
theme_gallery | SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500 | Show the theme for exhibitions with both records of an attendance below 100 and above 500. | [
"SELECT",
"T2.theme",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOIN",
"exhibition",
"AS",
"T2",
"ON",
"T1.exhibition_id",
"=",
"T2.exhibition_id",
"WHERE",
"T1.attendance",
"<",
"100",
"INTERSECT",
"SELECT",
"T2.theme",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOI... | [
"select",
"t2",
".",
"theme",
"from",
"exhibition_record",
"as",
"t1",
"join",
"exhibition",
"as",
"t2",
"on",
"t1",
".",
"exhibition_id",
"=",
"t2",
".",
"exhibition_id",
"where",
"t1",
".",
"attendance",
"<",
"value",
"intersect",
"select",
"t2",
".",
"t... | [
"Show",
"the",
"theme",
"for",
"exhibitions",
"with",
"both",
"records",
"of",
"an",
"attendance",
"below",
"100",
"and",
"above",
"500",
"."
] | [
"Show",
"the",
"<mask>",
"for",
"<mask>",
"with",
"both",
"<mask>",
"of",
"an",
"<mask>",
"below",
"<unk>",
"and",
"above",
"<unk>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
"<",
"<unk>",
"intersect",
"select",
"<mask>",
".",
"<mask... |
theme_gallery | SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500 | Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500? | [
"SELECT",
"T2.theme",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOIN",
"exhibition",
"AS",
"T2",
"ON",
"T1.exhibition_id",
"=",
"T2.exhibition_id",
"WHERE",
"T1.attendance",
"<",
"100",
"INTERSECT",
"SELECT",
"T2.theme",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOI... | [
"select",
"t2",
".",
"theme",
"from",
"exhibition_record",
"as",
"t1",
"join",
"exhibition",
"as",
"t2",
"on",
"t1",
".",
"exhibition_id",
"=",
"t2",
".",
"exhibition_id",
"where",
"t1",
".",
"attendance",
"<",
"value",
"intersect",
"select",
"t2",
".",
"t... | [
"Which",
"themes",
"have",
"had",
"corresponding",
"exhibitions",
"that",
"have",
"had",
"attendance",
"both",
"below",
"100",
"and",
"above",
"500",
"?"
] | [
"Which",
"<mask>",
"have",
"had",
"corresponding",
"<mask>",
"that",
"have",
"had",
"<mask>",
"both",
"below",
"<unk>",
"and",
"above",
"<unk>",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
"<",
"<unk>",
"intersect",
"select",
"<mask>",
".",
"<mask... |
theme_gallery | SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10 | How many exhibitions have a attendance more than 100 or have a ticket price below 10? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOIN",
"exhibition",
"AS",
"T2",
"ON",
"T1.exhibition_id",
"=",
"T2.exhibition_id",
"WHERE",
"T1.attendance",
">",
"100",
"OR",
"T2.ticket_price",
"<",
"10"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"exhibition_record",
"as",
"t1",
"join",
"exhibition",
"as",
"t2",
"on",
"t1",
".",
"exhibition_id",
"=",
"t2",
".",
"exhibition_id",
"where",
"t1",
".",
"attendance",
">",
"value",
"or",
"t2",
".",
"ticket_price",... | [
"How",
"many",
"exhibitions",
"have",
"a",
"attendance",
"more",
"than",
"100",
"or",
"have",
"a",
"ticket",
"price",
"below",
"10",
"?"
] | [
"How",
"many",
"<mask>",
"have",
"a",
"<mask>",
"more",
"than",
"<unk>",
"or",
"have",
"a",
"<mask>",
"<mask>",
"below",
"<unk>",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
">",
"<unk>",
"or",
"<mask>",
".",
"<mask>",
"<",
"<unk... |
theme_gallery | SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 100 OR T2.ticket_price < 10 | Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOIN",
"exhibition",
"AS",
"T2",
"ON",
"T1.exhibition_id",
"=",
"T2.exhibition_id",
"WHERE",
"T1.attendance",
">",
"100",
"OR",
"T2.ticket_price",
"<",
"10"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"exhibition_record",
"as",
"t1",
"join",
"exhibition",
"as",
"t2",
"on",
"t1",
".",
"exhibition_id",
"=",
"t2",
".",
"exhibition_id",
"where",
"t1",
".",
"attendance",
">",
"value",
"or",
"t2",
".",
"ticket_price",... | [
"Count",
"the",
"number",
"of",
"exhibitions",
"that",
"have",
"had",
"an",
"attendnance",
"of",
"over",
"100",
"or",
"a",
"ticket",
"prices",
"under",
"10",
"."
] | [
"Count",
"the",
"number",
"of",
"<mask>",
"that",
"have",
"had",
"an",
"attendnance",
"of",
"over",
"<unk>",
"or",
"a",
"<mask>",
"<mask>",
"under",
"<unk>",
"."
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
">",
"<unk>",
"or",
"<mask>",
".",
"<mask>",
"<",
"<unk... |
theme_gallery | SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING avg(T1.attendance) > 200 | Show all artist names with an average exhibition attendance over 200. | [
"SELECT",
"T3.name",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOIN",
"exhibition",
"AS",
"T2",
"ON",
"T1.exhibition_id",
"=",
"T2.exhibition_id",
"JOIN",
"artist",
"AS",
"T3",
"ON",
"T3.artist_id",
"=",
"T2.artist_id",
"GROUP",
"BY",
"T3.artist_id",
"HAVING",
"av... | [
"select",
"t3",
".",
"name",
"from",
"exhibition_record",
"as",
"t1",
"join",
"exhibition",
"as",
"t2",
"on",
"t1",
".",
"exhibition_id",
"=",
"t2",
".",
"exhibition_id",
"join",
"artist",
"as",
"t3",
"on",
"t3",
".",
"artist_id",
"=",
"t2",
".",
"artist... | [
"Show",
"all",
"artist",
"names",
"with",
"an",
"average",
"exhibition",
"attendance",
"over",
"200",
"."
] | [
"Show",
"all",
"<mask>",
"<mask>",
"with",
"an",
"average",
"<mask>",
"<mask>",
"over",
"<unk>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mas... |
theme_gallery | SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id JOIN artist AS T3 ON T3.artist_id = T2.artist_id GROUP BY T3.artist_id HAVING avg(T1.attendance) > 200 | What are the names of artist whose exhibitions draw over 200 attendees on average? | [
"SELECT",
"T3.name",
"FROM",
"exhibition_record",
"AS",
"T1",
"JOIN",
"exhibition",
"AS",
"T2",
"ON",
"T1.exhibition_id",
"=",
"T2.exhibition_id",
"JOIN",
"artist",
"AS",
"T3",
"ON",
"T3.artist_id",
"=",
"T2.artist_id",
"GROUP",
"BY",
"T3.artist_id",
"HAVING",
"av... | [
"select",
"t3",
".",
"name",
"from",
"exhibition_record",
"as",
"t1",
"join",
"exhibition",
"as",
"t2",
"on",
"t1",
".",
"exhibition_id",
"=",
"t2",
".",
"exhibition_id",
"join",
"artist",
"as",
"t3",
"on",
"t3",
".",
"artist_id",
"=",
"t2",
".",
"artist... | [
"What",
"are",
"the",
"names",
"of",
"artist",
"whose",
"exhibitions",
"draw",
"over",
"200",
"attendees",
"on",
"average",
"?"
] | [
"What",
"are",
"the",
"<mask>",
"of",
"<mask>",
"whose",
"<mask>",
"draw",
"over",
"<unk>",
"attendees",
"on",
"average",
"?"
] | [
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mas... |
epinions_1 | SELECT i_id FROM item WHERE title = "orange" | Find the id of the item whose title is "orange". | [
"SELECT",
"i_id",
"FROM",
"item",
"WHERE",
"title",
"=",
"``",
"orange",
"''"
] | [
"select",
"i_id",
"from",
"item",
"where",
"title",
"=",
"value"
] | [
"Find",
"the",
"id",
"of",
"the",
"item",
"whose",
"title",
"is",
"``",
"orange",
"''",
"."
] | [
"Find",
"the",
"id",
"of",
"the",
"<mask>",
"whose",
"<mask>",
"is",
"``",
"orange",
"''",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"=",
"<unk>"
] |
epinions_1 | SELECT * FROM item | List all information in the item table. | [
"SELECT",
"*",
"FROM",
"item"
] | [
"select",
"*",
"from",
"item"
] | [
"List",
"all",
"information",
"in",
"the",
"item",
"table",
"."
] | [
"List",
"all",
"information",
"in",
"the",
"<mask>",
"table",
"."
] | [
"select",
"*",
"from",
"<mask>"
] |
epinions_1 | SELECT count(*) FROM review | Find the number of reviews. | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"review"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"review"
] | [
"Find",
"the",
"number",
"of",
"reviews",
"."
] | [
"Find",
"the",
"number",
"of",
"<mask>",
"."
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>"
] |
epinions_1 | SELECT count(*) FROM useracct | How many users are there? | [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"useracct"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"useracct"
] | [
"How",
"many",
"users",
"are",
"there",
"?"
] | [
"How",
"many",
"<mask>",
"are",
"there",
"?"
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>"
] |
epinions_1 | SELECT avg(rating) , max(rating) FROM review | Find the average and maximum rating of all reviews. | [
"SELECT",
"avg",
"(",
"rating",
")",
",",
"max",
"(",
"rating",
")",
"FROM",
"review"
] | [
"select",
"avg",
"(",
"rating",
")",
",",
"max",
"(",
"rating",
")",
"from",
"review"
] | [
"Find",
"the",
"average",
"and",
"maximum",
"rating",
"of",
"all",
"reviews",
"."
] | [
"Find",
"the",
"average",
"and",
"maximum",
"<mask>",
"of",
"all",
"<mask>",
"."
] | [
"select",
"avg",
"(",
"<mask>",
")",
",",
"max",
"(",
"<mask>",
")",
"from",
"<mask>"
] |
epinions_1 | SELECT min(rank) FROM review | Find the highest rank of all reviews. | [
"SELECT",
"min",
"(",
"rank",
")",
"FROM",
"review"
] | [
"select",
"min",
"(",
"rank",
")",
"from",
"review"
] | [
"Find",
"the",
"highest",
"rank",
"of",
"all",
"reviews",
"."
] | [
"Find",
"the",
"highest",
"<mask>",
"of",
"all",
"<mask>",
"."
] | [
"select",
"min",
"(",
"<mask>",
")",
"from",
"<mask>"
] |
epinions_1 | SELECT count(DISTINCT u_id) FROM review | How many different users wrote some reviews? | [
"SELECT",
"count",
"(",
"DISTINCT",
"u_id",
")",
"FROM",
"review"
] | [
"select",
"count",
"(",
"distinct",
"u_id",
")",
"from",
"review"
] | [
"How",
"many",
"different",
"users",
"wrote",
"some",
"reviews",
"?"
] | [
"How",
"many",
"different",
"<mask>",
"wrote",
"some",
"<mask>",
"?"
] | [
"select",
"count",
"(",
"distinct",
"<mask>",
")",
"from",
"<mask>"
] |
epinions_1 | SELECT count(DISTINCT i_id) FROM review | How many different items were reviewed by some users? | [
"SELECT",
"count",
"(",
"DISTINCT",
"i_id",
")",
"FROM",
"review"
] | [
"select",
"count",
"(",
"distinct",
"i_id",
")",
"from",
"review"
] | [
"How",
"many",
"different",
"items",
"were",
"reviewed",
"by",
"some",
"users",
"?"
] | [
"How",
"many",
"different",
"<mask>",
"were",
"<mask>",
"by",
"some",
"<mask>",
"?"
] | [
"select",
"count",
"(",
"distinct",
"<mask>",
")",
"from",
"<mask>"
] |
epinions_1 | SELECT count(*) FROM item WHERE i_id NOT IN (SELECT i_id FROM review) | Find the number of items that did not receive 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",
"that",
"did",
"not",
"receive",
"any",
"review",
"."
] | [
"Find",
"the",
"number",
"of",
"<mask>",
"that",
"did",
"not",
"receive",
"any",
"<mask>",
"."
] | [
"select",
"count",
"(",
"*",
")",
"from",
"<mask>",
"where",
"<mask>",
"not",
"in",
"(",
"select",
"<mask>",
"from",
"<mask>",
")"
] |
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",
"."
] | [
"Find",
"the",
"<mask>",
"of",
"<mask>",
"who",
"did",
"not",
"leave",
"any",
"<mask>",
"."
] | [
"select",
"<mask>",
"from",
"<mask>",
"where",
"<mask>",
"not",
"in",
"(",
"select",
"<mask>",
"from",
"<mask>",
")"
] |
epinions_1 | SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating = 10 | Find the names of goods that receive a rating of 10. | [
"SELECT",
"T1.title",
"FROM",
"item",
"AS",
"T1",
"JOIN",
"review",
"AS",
"T2",
"ON",
"T1.i_id",
"=",
"T2.i_id",
"WHERE",
"T2.rating",
"=",
"10"
] | [
"select",
"t1",
".",
"title",
"from",
"item",
"as",
"t1",
"join",
"review",
"as",
"t2",
"on",
"t1",
".",
"i_id",
"=",
"t2",
".",
"i_id",
"where",
"t2",
".",
"rating",
"=",
"value"
] | [
"Find",
"the",
"names",
"of",
"goods",
"that",
"receive",
"a",
"rating",
"of",
"10",
"."
] | [
"Find",
"the",
"<mask>",
"of",
"goods",
"that",
"receive",
"a",
"<mask>",
"of",
"<unk>",
"."
] | [
"select",
"<mask>",
".",
"<mask>",
"from",
"<mask>",
"as",
"<mask>",
"join",
"<mask>",
"as",
"<mask>",
"on",
"<mask>",
".",
"<mask>",
"=",
"<mask>",
".",
"<mask>",
"where",
"<mask>",
".",
"<mask>",
"=",
"<unk>"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.