dreamerdeo's picture
Upload folder using huggingface_hub
1faca1c
[
{
"db_id": "department_store",
"query": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3",
"query_toks": [
"SELECT",
"product_id",
"FROM",
"product_suppliers",
"ORDER",
"BY",
"total_amount_purchased",
"DESC",
"LIMIT",
"3"
],
"query_toks_no_value": [
"select",
"product_id",
"from",
"product_suppliers",
"order",
"by",
"total_amount_purchased",
"desc",
"limit",
"value"
],
"question": "Quels sont les identifiants des trois principaux produits achetés en plus grande quantité?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
46,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
0,
50,
false
],
null
]
]
],
"limit": 3,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3",
"query_toks": [
"SELECT",
"product_id",
"FROM",
"product_suppliers",
"ORDER",
"BY",
"total_amount_purchased",
"DESC",
"LIMIT",
"3"
],
"query_toks_no_value": [
"select",
"product_id",
"from",
"product_suppliers",
"order",
"by",
"total_amount_purchased",
"desc",
"limit",
"value"
],
"question": "Donnez les identifiants des trois produits achetés dans les plus grandes quantités.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
46,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
0,
50,
false
],
null
]
]
],
"limit": 3,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1",
"query_toks": [
"SELECT",
"product_id",
",",
"product_type_code",
"FROM",
"products",
"ORDER",
"BY",
"product_price",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"product_id",
",",
"product_type_code",
"from",
"products",
"order",
"by",
"product_price",
"limit",
"value"
],
"question": "Quels sont l'identifiant et le type de produit du produit le moins cher?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
18,
false
],
null
]
],
[
0,
[
0,
[
0,
19,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
21,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1",
"query_toks": [
"SELECT",
"product_id",
",",
"product_type_code",
"FROM",
"products",
"ORDER",
"BY",
"product_price",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"product_id",
",",
"product_type_code",
"from",
"products",
"order",
"by",
"product_price",
"limit",
"value"
],
"question": "Donnez l'identifiant et le type de produit du produit avec le prix le plus bas.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
18,
false
],
null
]
],
[
0,
[
0,
[
0,
19,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
21,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT count(DISTINCT product_type_code) FROM products",
"query_toks": [
"SELECT",
"count",
"(",
"DISTINCT",
"product_type_code",
")",
"FROM",
"products"
],
"query_toks_no_value": [
"select",
"count",
"(",
"distinct",
"product_type_code",
")",
"from",
"products"
],
"question": "Trouvez le nombre de types de produits différents.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
3,
[
0,
[
0,
19,
true
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT count(DISTINCT product_type_code) FROM products",
"query_toks": [
"SELECT",
"count",
"(",
"DISTINCT",
"product_type_code",
")",
"FROM",
"products"
],
"query_toks_no_value": [
"select",
"count",
"(",
"distinct",
"product_type_code",
")",
"from",
"products"
],
"question": "Comptez le nombre de types de produits distincts.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
3,
[
0,
[
0,
19,
true
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10",
"query_toks": [
"SELECT",
"T1.address_details",
"FROM",
"addresses",
"AS",
"T1",
"JOIN",
"customer_addresses",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"WHERE",
"T2.customer_id",
"=",
"10"
],
"query_toks_no_value": [
"select",
"t1",
".",
"address_details",
"from",
"addresses",
"as",
"t1",
"join",
"customer_addresses",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"where",
"t2",
".",
"customer_id",
"=",
"value"
],
"question": "Renvoyez l'adresse du client 10.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
0
],
[
"table_unit",
7
]
],
"conds": [
[
false,
2,
[
0,
[
0,
1,
false
],
null
],
[
0,
27,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
2,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
26,
false
],
null
],
10.0,
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10",
"query_toks": [
"SELECT",
"T1.address_details",
"FROM",
"addresses",
"AS",
"T1",
"JOIN",
"customer_addresses",
"AS",
"T2",
"ON",
"T1.address_id",
"=",
"T2.address_id",
"WHERE",
"T2.customer_id",
"=",
"10"
],
"query_toks_no_value": [
"select",
"t1",
".",
"address_details",
"from",
"addresses",
"as",
"t1",
"join",
"customer_addresses",
"as",
"t2",
"on",
"t1",
".",
"address_id",
"=",
"t2",
".",
"address_id",
"where",
"t2",
".",
"customer_id",
"=",
"value"
],
"question": "Quelle est l'adresse du client avec l'ID 10?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
0
],
[
"table_unit",
7
]
],
"conds": [
[
false,
2,
[
0,
[
0,
1,
false
],
null
],
[
0,
27,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
2,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
26,
false
],
null
],
10.0,
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Department Manager\"",
"query_toks": [
"SELECT",
"T1.staff_id",
",",
"T1.staff_gender",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"staff_department_assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.job_title_code",
"=",
"``",
"Department",
"Manager",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_id",
",",
"t1",
".",
"staff_gender",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"job_title_code",
"=",
"value"
],
"question": "Quels sont les identifiants et les sexes du personnel de tous les membres du personnel dont le titre de poste est \"Department Manager\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
3,
false
],
null
]
],
[
0,
[
0,
[
0,
4,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
55,
false
],
null
],
"\"Department Manager\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Department Manager\"",
"query_toks": [
"SELECT",
"T1.staff_id",
",",
"T1.staff_gender",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"staff_department_assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.job_title_code",
"=",
"``",
"Department",
"Manager",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_id",
",",
"t1",
".",
"staff_gender",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"job_title_code",
"=",
"value"
],
"question": "Renvoyez les identifiants et les sexes du personnel de tout membre du personnel portant le titre de \"Department Manager\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
3,
false
],
null
]
],
[
0,
[
0,
[
0,
4,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
55,
false
],
null
],
"\"Department Manager\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code",
"query_toks": [
"SELECT",
"payment_method_code",
",",
"count",
"(",
"*",
")",
"FROM",
"customers",
"GROUP",
"BY",
"payment_method_code"
],
"query_toks_no_value": [
"select",
"payment_method_code",
",",
"count",
"(",
"*",
")",
"from",
"customers",
"group",
"by",
"payment_method_code"
],
"question": "Pour chaque mode de paiement, indiquez le nombre de clients qui l'utilisent.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
12,
false
],
null
]
],
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
12,
false
]
],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code",
"query_toks": [
"SELECT",
"payment_method_code",
",",
"count",
"(",
"*",
")",
"FROM",
"customers",
"GROUP",
"BY",
"payment_method_code"
],
"query_toks_no_value": [
"select",
"payment_method_code",
",",
"count",
"(",
"*",
")",
"from",
"customers",
"group",
"by",
"payment_method_code"
],
"question": "Combien de clients utilisent chaque mode de paiement?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
12,
false
],
null
]
],
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
12,
false
]
],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1",
"query_toks": [
"SELECT",
"product_id",
"FROM",
"order_items",
"GROUP",
"BY",
"product_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"product_id",
"from",
"order_items",
"group",
"by",
"product_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Quel est l'identifiant du produit qui a été commandé le plus souvent?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
11
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
45,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
45,
false
]
],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1",
"query_toks": [
"SELECT",
"product_id",
"FROM",
"order_items",
"GROUP",
"BY",
"product_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"product_id",
"from",
"order_items",
"group",
"by",
"product_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Indiquez l'identifiant du produit qui a été commandé le plus fréquemment.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
11
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
45,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
45,
false
]
],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1",
"query_toks": [
"SELECT",
"T1.customer_name",
",",
"T1.customer_phone",
",",
"T1.customer_email",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"GROUP",
"BY",
"T2.customer_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"customer_name",
",",
"t1",
".",
"customer_phone",
",",
"t1",
".",
"customer_email",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"group",
"by",
"t2",
".",
"customer_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Quels sont le nom, le numéro de téléphone et l'adresse e-mail du client ayant effectué le plus grand nombre de commandes?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
],
[
0,
[
0,
[
0,
16,
false
],
null
]
],
[
0,
[
0,
[
0,
17,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
31,
false
]
],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1",
"query_toks": [
"SELECT",
"T1.customer_name",
",",
"T1.customer_phone",
",",
"T1.customer_email",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"GROUP",
"BY",
"T2.customer_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"customer_name",
",",
"t1",
".",
"customer_phone",
",",
"t1",
".",
"customer_email",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"group",
"by",
"t2",
".",
"customer_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Renvoyez le nom, le numéro de téléphone et l'adresse e-mail du client ayant effectué le plus de commandes.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
],
[
0,
[
0,
[
0,
16,
false
],
null
]
],
[
0,
[
0,
[
0,
17,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
31,
false
]
],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_code",
"query_toks": [
"SELECT",
"product_type_code",
",",
"avg",
"(",
"product_price",
")",
"FROM",
"products",
"GROUP",
"BY",
"product_type_code"
],
"query_toks_no_value": [
"select",
"product_type_code",
",",
"avg",
"(",
"product_price",
")",
"from",
"products",
"group",
"by",
"product_type_code"
],
"question": "Quel est le prix moyen de chaque type de produit?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
19,
false
],
null
]
],
[
5,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
19,
false
]
],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_code",
"query_toks": [
"SELECT",
"product_type_code",
",",
"avg",
"(",
"product_price",
")",
"FROM",
"products",
"GROUP",
"BY",
"product_type_code"
],
"query_toks_no_value": [
"select",
"product_type_code",
",",
"avg",
"(",
"product_price",
")",
"from",
"products",
"group",
"by",
"product_type_code"
],
"question": "Renvoyez le prix moyen pour chaque type de produit.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
19,
false
],
null
]
],
[
5,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
19,
false
]
],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = \"South\"",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"department_stores",
"AS",
"T1",
"JOIN",
"department_store_chain",
"AS",
"T2",
"ON",
"T1.dept_store_chain_id",
"=",
"T2.dept_store_chain_id",
"WHERE",
"T2.dept_store_chain_name",
"=",
"``",
"South",
"''"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"department_stores",
"as",
"t1",
"join",
"department_store_chain",
"as",
"t2",
"on",
"t1",
".",
"dept_store_chain_id",
"=",
"t2",
".",
"dept_store_chain_id",
"where",
"t2",
".",
"dept_store_chain_name",
"=",
"value"
],
"question": "Combien de grands magasins la chaîne de magasins \"South\" possède-t-elle?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
9
],
[
"table_unit",
3
]
],
"conds": [
[
false,
2,
[
0,
[
0,
35,
false
],
null
],
[
0,
9,
false
],
null
]
]
},
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
10,
false
],
null
],
"\"South\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = \"South\"",
"query_toks": [
"SELECT",
"count",
"(",
"*",
")",
"FROM",
"department_stores",
"AS",
"T1",
"JOIN",
"department_store_chain",
"AS",
"T2",
"ON",
"T1.dept_store_chain_id",
"=",
"T2.dept_store_chain_id",
"WHERE",
"T2.dept_store_chain_name",
"=",
"``",
"South",
"''"
],
"query_toks_no_value": [
"select",
"count",
"(",
"*",
")",
"from",
"department_stores",
"as",
"t1",
"join",
"department_store_chain",
"as",
"t2",
"on",
"t1",
".",
"dept_store_chain_id",
"=",
"t2",
".",
"dept_store_chain_id",
"where",
"t2",
".",
"dept_store_chain_name",
"=",
"value"
],
"question": "Comptez le nombre de magasins de la chaîne \"South\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
9
],
[
"table_unit",
3
]
],
"conds": [
[
false,
2,
[
0,
[
0,
35,
false
],
null
],
[
0,
9,
false
],
null
]
]
},
"select": [
false,
[
[
3,
[
0,
[
0,
0,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
10,
false
],
null
],
"\"South\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1",
"query_toks": [
"SELECT",
"T1.staff_name",
",",
"T2.job_title_code",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"staff_department_assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"ORDER",
"BY",
"T2.date_assigned_to",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_name",
",",
"t2",
".",
"job_title_code",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"order",
"by",
"t2",
".",
"date_assigned_to",
"desc",
"limit",
"value"
],
"question": "Quels sont le nom et l'intitulé du poste du personnel désigné le plus récent?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
],
[
0,
[
0,
[
0,
55,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
0,
56,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1",
"query_toks": [
"SELECT",
"T1.staff_name",
",",
"T2.job_title_code",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"staff_department_assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"ORDER",
"BY",
"T2.date_assigned_to",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_name",
",",
"t2",
".",
"job_title_code",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"order",
"by",
"t2",
".",
"date_assigned_to",
"desc",
"limit",
"value"
],
"question": "Renvoyez le nom et l'intitulé du poste du personnel avec la dernière date attribuée.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
],
[
0,
[
0,
[
0,
55,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
0,
56,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3",
"query_toks": [
"SELECT",
"T2.product_type_code",
",",
"T2.product_name",
",",
"T2.product_price",
"FROM",
"product_suppliers",
"AS",
"T1",
"JOIN",
"products",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id",
"WHERE",
"T1.supplier_id",
"=",
"3"
],
"query_toks_no_value": [
"select",
"t2",
".",
"product_type_code",
",",
"t2",
".",
"product_name",
",",
"t2",
".",
"product_price",
"from",
"product_suppliers",
"as",
"t1",
"join",
"products",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id",
"where",
"t1",
".",
"supplier_id",
"=",
"value"
],
"question": "Donnez-moi le type de produit, le nom et le prix de tous les produits fournis par le fournisseur id 3.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
46,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
19,
false
],
null
]
],
[
0,
[
0,
[
0,
20,
false
],
null
]
],
[
0,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
47,
false
],
null
],
3.0,
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3",
"query_toks": [
"SELECT",
"T2.product_type_code",
",",
"T2.product_name",
",",
"T2.product_price",
"FROM",
"product_suppliers",
"AS",
"T1",
"JOIN",
"products",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id",
"WHERE",
"T1.supplier_id",
"=",
"3"
],
"query_toks_no_value": [
"select",
"t2",
".",
"product_type_code",
",",
"t2",
".",
"product_name",
",",
"t2",
".",
"product_price",
"from",
"product_suppliers",
"as",
"t1",
"join",
"products",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id",
"where",
"t1",
".",
"supplier_id",
"=",
"value"
],
"question": "Renvoyer le type de produit, le nom et le prix des produits fournis par le fournisseur 3.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
46,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
19,
false
],
null
]
],
[
0,
[
0,
[
0,
20,
false
],
null
]
],
[
0,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
47,
false
],
null
],
3.0,
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id",
"query_toks": [
"SELECT",
"DISTINCT",
"T1.customer_name",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"WHERE",
"T2.order_status_code",
"=",
"``",
"Pending",
"''",
"ORDER",
"BY",
"T2.customer_id"
],
"query_toks_no_value": [
"select",
"distinct",
"t1",
".",
"customer_name",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"where",
"t2",
".",
"order_status_code",
"=",
"value",
"order",
"by",
"t2",
".",
"customer_id"
],
"question": "Renvoyez le nom distinct des clients dont l'état de la commande est \"Pending\", dans l'ordre de l'identifiant du client.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"Pending\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
31,
false
],
null
]
]
],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id",
"query_toks": [
"SELECT",
"DISTINCT",
"T1.customer_name",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"WHERE",
"T2.order_status_code",
"=",
"``",
"Pending",
"''",
"ORDER",
"BY",
"T2.customer_id"
],
"query_toks_no_value": [
"select",
"distinct",
"t1",
".",
"customer_name",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"where",
"t2",
".",
"order_status_code",
"=",
"value",
"order",
"by",
"t2",
".",
"customer_id"
],
"question": "Quels sont les noms distincts des clients dont le statut de commande est \"Pending\", triés par id du client?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"Pending\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
31,
false
],
null
]
]
],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"",
"query_toks": [
"SELECT",
"T1.customer_name",
",",
"T1.customer_address",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"WHERE",
"T2.order_status_code",
"=",
"``",
"New",
"''",
"INTERSECT",
"SELECT",
"T1.customer_name",
",",
"T1.customer_address",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"WHERE",
"T2.order_status_code",
"=",
"``",
"Pending",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"customer_name",
",",
"t1",
".",
"customer_address",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"where",
"t2",
".",
"order_status_code",
"=",
"value",
"intersect",
"select",
"t1",
".",
"customer_name",
",",
"t1",
".",
"customer_address",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"where",
"t2",
".",
"order_status_code",
"=",
"value"
],
"question": "Trouvez le nom et l'adresse des clients qui ont à la fois des commandes \"New\" et \"Pending\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
],
[
0,
[
0,
[
0,
15,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"New\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
],
[
0,
[
0,
[
0,
15,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"Pending\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"",
"query_toks": [
"SELECT",
"T1.customer_name",
",",
"T1.customer_address",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"WHERE",
"T2.order_status_code",
"=",
"``",
"New",
"''",
"INTERSECT",
"SELECT",
"T1.customer_name",
",",
"T1.customer_address",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"WHERE",
"T2.order_status_code",
"=",
"``",
"Pending",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"customer_name",
",",
"t1",
".",
"customer_address",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"where",
"t2",
".",
"order_status_code",
"=",
"value",
"intersect",
"select",
"t1",
".",
"customer_name",
",",
"t1",
".",
"customer_address",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"where",
"t2",
".",
"order_status_code",
"=",
"value"
],
"question": "Quels sont les noms et adresses des clients qui ont à la fois des commandes \"New\" et \"Pending\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
],
[
0,
[
0,
[
0,
15,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"New\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
],
[
0,
[
0,
[
0,
15,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"Pending\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)",
"query_toks": [
"SELECT",
"T1.product_id",
"FROM",
"product_suppliers",
"AS",
"T1",
"JOIN",
"products",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id",
"WHERE",
"T1.supplier_id",
"=",
"2",
"AND",
"T2.product_price",
">",
"(",
"SELECT",
"avg",
"(",
"product_price",
")",
"FROM",
"products",
")"
],
"query_toks_no_value": [
"select",
"t1",
".",
"product_id",
"from",
"product_suppliers",
"as",
"t1",
"join",
"products",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id",
"where",
"t1",
".",
"supplier_id",
"=",
"value",
"and",
"t2",
".",
"product_price",
">",
"(",
"select",
"avg",
"(",
"product_price",
")",
"from",
"products",
")"
],
"question": "retournez les ids de tous les produits fournis par le fournisseur id 2 et qui sont plus chers que le prix moyen de tous les produits.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
46,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
46,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
47,
false
],
null
],
2.0,
null
],
"and",
[
false,
3,
[
0,
[
0,
21,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
5,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)",
"query_toks": [
"SELECT",
"T1.product_id",
"FROM",
"product_suppliers",
"AS",
"T1",
"JOIN",
"products",
"AS",
"T2",
"ON",
"T1.product_id",
"=",
"T2.product_id",
"WHERE",
"T1.supplier_id",
"=",
"2",
"AND",
"T2.product_price",
">",
"(",
"SELECT",
"avg",
"(",
"product_price",
")",
"FROM",
"products",
")"
],
"query_toks_no_value": [
"select",
"t1",
".",
"product_id",
"from",
"product_suppliers",
"as",
"t1",
"join",
"products",
"as",
"t2",
"on",
"t1",
".",
"product_id",
"=",
"t2",
".",
"product_id",
"where",
"t1",
".",
"supplier_id",
"=",
"value",
"and",
"t2",
".",
"product_price",
">",
"(",
"select",
"avg",
"(",
"product_price",
")",
"from",
"products",
")"
],
"question": "Quels sont les identifiants des produits du fournisseur avec l'identifiant 2, qui sont plus chers que le prix moyen de tous les produits?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
46,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
46,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
47,
false
],
null
],
2.0,
null
],
"and",
[
false,
3,
[
0,
[
0,
21,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
5,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"",
"query_toks": [
"SELECT",
"T2.dept_store_id",
",",
"T2.store_name",
"FROM",
"departments",
"AS",
"T1",
"JOIN",
"department_stores",
"AS",
"T2",
"ON",
"T1.dept_store_id",
"=",
"T2.dept_store_id",
"WHERE",
"T1.department_name",
"=",
"``",
"marketing",
"''",
"INTERSECT",
"SELECT",
"T2.dept_store_id",
",",
"T2.store_name",
"FROM",
"departments",
"AS",
"T1",
"JOIN",
"department_stores",
"AS",
"T2",
"ON",
"T1.dept_store_id",
"=",
"T2.dept_store_id",
"WHERE",
"T1.department_name",
"=",
"``",
"managing",
"''"
],
"query_toks_no_value": [
"select",
"t2",
".",
"dept_store_id",
",",
"t2",
".",
"store_name",
"from",
"departments",
"as",
"t1",
"join",
"department_stores",
"as",
"t2",
"on",
"t1",
".",
"dept_store_id",
"=",
"t2",
".",
"dept_store_id",
"where",
"t1",
".",
"department_name",
"=",
"value",
"intersect",
"select",
"t2",
".",
"dept_store_id",
",",
"t2",
".",
"store_name",
"from",
"departments",
"as",
"t1",
"join",
"department_stores",
"as",
"t2",
"on",
"t1",
".",
"dept_store_id",
"=",
"t2",
".",
"dept_store_id",
"where",
"t1",
".",
"department_name",
"=",
"value"
],
"question": "Quel est l'identifiant et le nom du grand magasin qui a à la fois un service de \"marketing\" et \"managing\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
10
],
[
"table_unit",
9
]
],
"conds": [
[
false,
2,
[
0,
[
0,
41,
false
],
null
],
[
0,
34,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
34,
false
],
null
]
],
[
0,
[
0,
[
0,
36,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
42,
false
],
null
],
"\"marketing\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": {
"from": {
"table_units": [
[
"table_unit",
10
],
[
"table_unit",
9
]
],
"conds": [
[
false,
2,
[
0,
[
0,
41,
false
],
null
],
[
0,
34,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
34,
false
],
null
]
],
[
0,
[
0,
[
0,
36,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
42,
false
],
null
],
"\"managing\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"",
"query_toks": [
"SELECT",
"T2.dept_store_id",
",",
"T2.store_name",
"FROM",
"departments",
"AS",
"T1",
"JOIN",
"department_stores",
"AS",
"T2",
"ON",
"T1.dept_store_id",
"=",
"T2.dept_store_id",
"WHERE",
"T1.department_name",
"=",
"``",
"marketing",
"''",
"INTERSECT",
"SELECT",
"T2.dept_store_id",
",",
"T2.store_name",
"FROM",
"departments",
"AS",
"T1",
"JOIN",
"department_stores",
"AS",
"T2",
"ON",
"T1.dept_store_id",
"=",
"T2.dept_store_id",
"WHERE",
"T1.department_name",
"=",
"``",
"managing",
"''"
],
"query_toks_no_value": [
"select",
"t2",
".",
"dept_store_id",
",",
"t2",
".",
"store_name",
"from",
"departments",
"as",
"t1",
"join",
"department_stores",
"as",
"t2",
"on",
"t1",
".",
"dept_store_id",
"=",
"t2",
".",
"dept_store_id",
"where",
"t1",
".",
"department_name",
"=",
"value",
"intersect",
"select",
"t2",
".",
"dept_store_id",
",",
"t2",
".",
"store_name",
"from",
"departments",
"as",
"t1",
"join",
"department_stores",
"as",
"t2",
"on",
"t1",
".",
"dept_store_id",
"=",
"t2",
".",
"dept_store_id",
"where",
"t1",
".",
"department_name",
"=",
"value"
],
"question": "Quels sont les identifiants et les noms des grands magasins ayant à la fois des départements \"marketing\" et \"managing\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
10
],
[
"table_unit",
9
]
],
"conds": [
[
false,
2,
[
0,
[
0,
41,
false
],
null
],
[
0,
34,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
34,
false
],
null
]
],
[
0,
[
0,
[
0,
36,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
42,
false
],
null
],
"\"marketing\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": {
"from": {
"table_units": [
[
"table_unit",
10
],
[
"table_unit",
9
]
],
"conds": [
[
false,
2,
[
0,
[
0,
41,
false
],
null
],
[
0,
34,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
34,
false
],
null
]
],
[
0,
[
0,
[
0,
36,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
42,
false
],
null
],
"\"managing\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2",
"query_toks": [
"SELECT",
"dept_store_chain_id",
"FROM",
"department_stores",
"GROUP",
"BY",
"dept_store_chain_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"2"
],
"query_toks_no_value": [
"select",
"dept_store_chain_id",
"from",
"department_stores",
"group",
"by",
"dept_store_chain_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Quels sont les identifiants des deux chaînes de grands magasins avec le plus grand nombre de grands magasins?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
9
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
35,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
35,
false
]
],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 2,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2",
"query_toks": [
"SELECT",
"dept_store_chain_id",
"FROM",
"department_stores",
"GROUP",
"BY",
"dept_store_chain_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"2"
],
"query_toks_no_value": [
"select",
"dept_store_chain_id",
"from",
"department_stores",
"group",
"by",
"dept_store_chain_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value"
],
"question": "Retournez les identifiants des deux chaînes de grands magasins ayant le plus grand nombre de grands magasins.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
9
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
35,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
35,
false
]
],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 2,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1",
"query_toks": [
"SELECT",
"department_id",
"FROM",
"staff_department_assignments",
"GROUP",
"BY",
"department_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"department_id",
"from",
"staff_department_assignments",
"group",
"by",
"department_id",
"order",
"by",
"count",
"(",
"*",
")",
"limit",
"value"
],
"question": "Quel est l'identifiant du département avec le moins d'effectifs?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
13
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
53,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
53,
false
]
],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1",
"query_toks": [
"SELECT",
"department_id",
"FROM",
"staff_department_assignments",
"GROUP",
"BY",
"department_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"department_id",
"from",
"staff_department_assignments",
"group",
"by",
"department_id",
"order",
"by",
"count",
"(",
"*",
")",
"limit",
"value"
],
"question": "Renvoyez l'identifiant du département avec le moins d'affectations de personnel.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
13
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
53,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
53,
false
]
],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code",
"query_toks": [
"SELECT",
"product_type_code",
",",
"max",
"(",
"product_price",
")",
",",
"min",
"(",
"product_price",
")",
"FROM",
"products",
"GROUP",
"BY",
"product_type_code"
],
"query_toks_no_value": [
"select",
"product_type_code",
",",
"max",
"(",
"product_price",
")",
",",
"min",
"(",
"product_price",
")",
"from",
"products",
"group",
"by",
"product_type_code"
],
"question": "Pour chaque type de produit, renvoyez le prix maximum et minimum.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
19,
false
],
null
]
],
[
1,
[
0,
[
0,
21,
false
],
null
]
],
[
2,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
19,
false
]
],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code",
"query_toks": [
"SELECT",
"product_type_code",
",",
"max",
"(",
"product_price",
")",
",",
"min",
"(",
"product_price",
")",
"FROM",
"products",
"GROUP",
"BY",
"product_type_code"
],
"query_toks_no_value": [
"select",
"product_type_code",
",",
"max",
"(",
"product_price",
")",
",",
"min",
"(",
"product_price",
")",
"from",
"products",
"group",
"by",
"product_type_code"
],
"question": "Quels sont les prix maximum et minimum des produits pour chaque type de produit?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
19,
false
],
null
]
],
[
1,
[
0,
[
0,
21,
false
],
null
]
],
[
2,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
19,
false
]
],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)",
"query_toks": [
"SELECT",
"product_type_code",
"FROM",
"products",
"GROUP",
"BY",
"product_type_code",
"HAVING",
"avg",
"(",
"product_price",
")",
">",
"(",
"SELECT",
"avg",
"(",
"product_price",
")",
"FROM",
"products",
")"
],
"query_toks_no_value": [
"select",
"product_type_code",
"from",
"products",
"group",
"by",
"product_type_code",
"having",
"avg",
"(",
"product_price",
")",
">",
"(",
"select",
"avg",
"(",
"product_price",
")",
"from",
"products",
")"
],
"question": "Trouvez le type de produit dont le prix moyen est supérieur au prix moyen de tous les produits.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
19,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
19,
false
]
],
"having": [
[
false,
3,
[
0,
[
5,
21,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
5,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)",
"query_toks": [
"SELECT",
"product_type_code",
"FROM",
"products",
"GROUP",
"BY",
"product_type_code",
"HAVING",
"avg",
"(",
"product_price",
")",
">",
"(",
"SELECT",
"avg",
"(",
"product_price",
")",
"FROM",
"products",
")"
],
"query_toks_no_value": [
"select",
"product_type_code",
"from",
"products",
"group",
"by",
"product_type_code",
"having",
"avg",
"(",
"product_price",
")",
">",
"(",
"select",
"avg",
"(",
"product_price",
")",
"from",
"products",
")"
],
"question": "Quel est le code du type de produit avec un prix moyen supérieur au prix moyen de tous les produits?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
19,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
19,
false
]
],
"having": [
[
false,
3,
[
0,
[
5,
21,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
5,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1",
"query_toks": [
"SELECT",
"T1.staff_id",
",",
"T1.staff_name",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"Staff_Department_Assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"ORDER",
"BY",
"date_assigned_to",
"-",
"date_assigned_from",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_id",
",",
"t1",
".",
"staff_name",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"order",
"by",
"date_assigned_to",
"-",
"date_assigned_from",
"limit",
"value"
],
"question": "Trouvez l'identifiant et le nom du personnel affecté pour la période la plus courte.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
3,
false
],
null
]
],
[
0,
[
0,
[
0,
5,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
1,
[
0,
56,
false
],
[
0,
54,
false
]
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1",
"query_toks": [
"SELECT",
"T1.staff_id",
",",
"T1.staff_name",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"Staff_Department_Assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"ORDER",
"BY",
"date_assigned_to",
"-",
"date_assigned_from",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_id",
",",
"t1",
".",
"staff_name",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"order",
"by",
"date_assigned_to",
"-",
"date_assigned_from",
"limit",
"value"
],
"question": "Quels sont l'identifiant et le nom du personnel affecté depuis le moins de temps?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
3,
false
],
null
]
],
[
0,
[
0,
[
0,
5,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
1,
[
0,
56,
false
],
[
0,
54,
false
]
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700",
"query_toks": [
"SELECT",
"product_name",
",",
"product_id",
"FROM",
"products",
"WHERE",
"product_price",
"BETWEEN",
"600",
"AND",
"700"
],
"query_toks_no_value": [
"select",
"product_name",
",",
"product_id",
"from",
"products",
"where",
"product_price",
"between",
"value",
"and",
"value"
],
"question": "Renvoyez les noms et identifiants de tous les produits dont le prix est compris entre 600 et 700.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
20,
false
],
null
]
],
[
0,
[
0,
[
0,
18,
false
],
null
]
]
]
],
"where": [
[
false,
1,
[
0,
[
0,
21,
false
],
null
],
600.0,
700.0
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700",
"query_toks": [
"SELECT",
"product_name",
",",
"product_id",
"FROM",
"products",
"WHERE",
"product_price",
"BETWEEN",
"600",
"AND",
"700"
],
"query_toks_no_value": [
"select",
"product_name",
",",
"product_id",
"from",
"products",
"where",
"product_price",
"between",
"value",
"and",
"value"
],
"question": "Quels sont les noms et les identifiants des produits qui coûtent entre 600 et 700?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
20,
false
],
null
]
],
[
0,
[
0,
[
0,
18,
false
],
null
]
]
]
],
"where": [
[
false,
1,
[
0,
[
0,
21,
false
],
null
],
600.0,
700.0
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = \"Cancelled\")",
"query_toks": [
"SELECT",
"DISTINCT",
"customer_id",
"FROM",
"Customer_Orders",
"WHERE",
"order_date",
">",
"(",
"SELECT",
"min",
"(",
"order_date",
")",
"FROM",
"Customer_Orders",
"WHERE",
"order_status_code",
"=",
"``",
"Cancelled",
"''",
")"
],
"query_toks_no_value": [
"select",
"distinct",
"customer_id",
"from",
"customer_orders",
"where",
"order_date",
">",
"(",
"select",
"min",
"(",
"order_date",
")",
"from",
"customer_orders",
"where",
"order_status_code",
"=",
"value",
")"
],
"question": "Trouvez les identifiants de tous les clients distincts qui ont passé une commande après certaines commandes qui ont été \"Cancelled\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
8
]
],
"conds": []
},
"select": [
true,
[
[
0,
[
0,
[
0,
31,
false
],
null
]
]
]
],
"where": [
[
false,
3,
[
0,
[
0,
33,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
8
]
],
"conds": []
},
"select": [
false,
[
[
2,
[
0,
[
0,
33,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"Cancelled\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = \"Cancelled\")",
"query_toks": [
"SELECT",
"DISTINCT",
"customer_id",
"FROM",
"Customer_Orders",
"WHERE",
"order_date",
">",
"(",
"SELECT",
"min",
"(",
"order_date",
")",
"FROM",
"Customer_Orders",
"WHERE",
"order_status_code",
"=",
"``",
"Cancelled",
"''",
")"
],
"query_toks_no_value": [
"select",
"distinct",
"customer_id",
"from",
"customer_orders",
"where",
"order_date",
">",
"(",
"select",
"min",
"(",
"order_date",
")",
"from",
"customer_orders",
"where",
"order_status_code",
"=",
"value",
")"
],
"question": "Quels sont les identifiants distincts des clients qui ont passé une commande après une commande \"Cancelled\" ?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
8
]
],
"conds": []
},
"select": [
true,
[
[
0,
[
0,
[
0,
31,
false
],
null
]
]
]
],
"where": [
[
false,
3,
[
0,
[
0,
33,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
8
]
],
"conds": []
},
"select": [
false,
[
[
2,
[
0,
[
0,
33,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"Cancelled\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')",
"query_toks": [
"SELECT",
"staff_id",
"FROM",
"Staff_Department_Assignments",
"WHERE",
"date_assigned_to",
"<",
"(",
"SELECT",
"max",
"(",
"date_assigned_to",
")",
"FROM",
"Staff_Department_Assignments",
"WHERE",
"job_title_code",
"=",
"'Clerical",
"Staff",
"'",
")"
],
"query_toks_no_value": [
"select",
"staff_id",
"from",
"staff_department_assignments",
"where",
"date_assigned_to",
"<",
"(",
"select",
"max",
"(",
"date_assigned_to",
")",
"from",
"staff_department_assignments",
"where",
"job_title_code",
"=",
"value",
")"
],
"question": "Quel est l'identifiant du personnel qui avait une affectation au service du personnel plus tôt que n'importe quel \"Clerical Staff\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
13
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
52,
false
],
null
]
]
]
],
"where": [
[
false,
4,
[
0,
[
0,
56,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
13
]
],
"conds": []
},
"select": [
false,
[
[
1,
[
0,
[
0,
56,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
55,
false
],
null
],
"\"Clerical Staff\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')",
"query_toks": [
"SELECT",
"staff_id",
"FROM",
"Staff_Department_Assignments",
"WHERE",
"date_assigned_to",
"<",
"(",
"SELECT",
"max",
"(",
"date_assigned_to",
")",
"FROM",
"Staff_Department_Assignments",
"WHERE",
"job_title_code",
"=",
"'Clerical",
"Staff",
"'",
")"
],
"query_toks_no_value": [
"select",
"staff_id",
"from",
"staff_department_assignments",
"where",
"date_assigned_to",
"<",
"(",
"select",
"max",
"(",
"date_assigned_to",
")",
"from",
"staff_department_assignments",
"where",
"job_title_code",
"=",
"value",
")"
],
"question": "Renvoyez l'identifiant du personnel dont l'affectation au service du personnel était antérieure à celle de n'importe quel \"Clerical Staff\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
13
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
52,
false
],
null
]
]
]
],
"where": [
[
false,
4,
[
0,
[
0,
56,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
13
]
],
"conds": []
},
"select": [
false,
[
[
1,
[
0,
[
0,
56,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
55,
false
],
null
],
"\"Clerical Staff\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE \"%TN%\"",
"query_toks": [
"SELECT",
"customer_name",
",",
"customer_id",
"FROM",
"customers",
"WHERE",
"customer_address",
"LIKE",
"``",
"%",
"TN",
"%",
"''"
],
"query_toks_no_value": [
"select",
"customer_name",
",",
"customer_id",
"from",
"customers",
"where",
"customer_address",
"like",
"value"
],
"question": "Quels sont les noms et identifiants des clients dont l'adresse contient \"TN\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
],
[
0,
[
0,
[
0,
11,
false
],
null
]
]
]
],
"where": [
[
false,
9,
[
0,
[
0,
15,
false
],
null
],
"\"%TN%\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE \"%TN%\"",
"query_toks": [
"SELECT",
"customer_name",
",",
"customer_id",
"FROM",
"customers",
"WHERE",
"customer_address",
"LIKE",
"``",
"%",
"TN",
"%",
"''"
],
"query_toks_no_value": [
"select",
"customer_name",
",",
"customer_id",
"from",
"customers",
"where",
"customer_address",
"like",
"value"
],
"question": "Renvoyez les noms et identifiants des clients qui ont \"TN\" dans leur adresse.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
],
[
0,
[
0,
[
0,
11,
false
],
null
]
]
]
],
"where": [
[
false,
9,
[
0,
[
0,
15,
false
],
null
],
"\"%TN%\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"",
"query_toks": [
"SELECT",
"T1.staff_name",
",",
"T1.staff_gender",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"staff_department_assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.date_assigned_from",
"LIKE",
"``",
"2016",
"%",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_name",
",",
"t1",
".",
"staff_gender",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"date_assigned_from",
"like",
"value"
],
"question": "Renvoyez le nom et le sexe du personnel affecté en \"2016\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
],
[
0,
[
0,
[
0,
4,
false
],
null
]
]
]
],
"where": [
[
false,
9,
[
0,
[
0,
54,
false
],
null
],
"\"2016%\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"",
"query_toks": [
"SELECT",
"T1.staff_name",
",",
"T1.staff_gender",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"staff_department_assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.date_assigned_from",
"LIKE",
"``",
"2016",
"%",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_name",
",",
"t1",
".",
"staff_gender",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"date_assigned_from",
"like",
"value"
],
"question": "Quels sont les noms et les sexes des membres du personnel affectés en \"2016\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
],
[
0,
[
0,
[
0,
4,
false
],
null
]
]
]
],
"where": [
[
false,
9,
[
0,
[
0,
54,
false
],
null
],
"\"2016%\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1",
"query_toks": [
"SELECT",
"T1.staff_name",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"staff_department_assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"GROUP",
"BY",
"T2.staff_id",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_name",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"group",
"by",
"t2",
".",
"staff_id",
"having",
"count",
"(",
"*",
")",
">",
"value"
],
"question": "Indiquez le nom du personnel à qui plusieurs emplois ont été attribués.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
52,
false
]
],
"having": [
[
false,
3,
[
0,
[
3,
0,
false
],
null
],
1.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1",
"query_toks": [
"SELECT",
"T1.staff_name",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"staff_department_assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"GROUP",
"BY",
"T2.staff_id",
"HAVING",
"COUNT",
"(",
"*",
")",
">",
"1"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_name",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"group",
"by",
"t2",
".",
"staff_id",
"having",
"count",
"(",
"*",
")",
">",
"value"
],
"question": "Quels sont les noms du personnel à qui plusieurs emplois ont été attribués?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
52,
false
]
],
"having": [
[
false,
3,
[
0,
[
3,
0,
false
],
null
],
1.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details",
"query_toks": [
"SELECT",
"T1.supplier_name",
",",
"T1.supplier_phone",
"FROM",
"Suppliers",
"AS",
"T1",
"JOIN",
"supplier_addresses",
"AS",
"T2",
"ON",
"T1.supplier_id",
"=",
"T2.supplier_id",
"JOIN",
"addresses",
"AS",
"T3",
"ON",
"T2.address_id",
"=",
"T3.address_id",
"ORDER",
"BY",
"T3.address_details"
],
"query_toks_no_value": [
"select",
"t1",
".",
"supplier_name",
",",
"t1",
".",
"supplier_phone",
"from",
"suppliers",
"as",
"t1",
"join",
"supplier_addresses",
"as",
"t2",
"on",
"t1",
".",
"supplier_id",
"=",
"t2",
".",
"supplier_id",
"join",
"addresses",
"as",
"t3",
"on",
"t2",
".",
"address_id",
"=",
"t3",
".",
"address_id",
"order",
"by",
"t3",
".",
"address_details"
],
"question": "Indiquez le nom et le numéro de téléphone de tous les fournisseurs dans l'ordre alphabétique de leurs adresses.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
2
],
[
"table_unit",
6
],
[
"table_unit",
0
]
],
"conds": [
[
false,
2,
[
0,
[
0,
6,
false
],
null
],
[
0,
22,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
23,
false
],
null
],
[
0,
1,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
7,
false
],
null
]
],
[
0,
[
0,
[
0,
8,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
2,
false
],
null
]
]
],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details",
"query_toks": [
"SELECT",
"T1.supplier_name",
",",
"T1.supplier_phone",
"FROM",
"Suppliers",
"AS",
"T1",
"JOIN",
"supplier_addresses",
"AS",
"T2",
"ON",
"T1.supplier_id",
"=",
"T2.supplier_id",
"JOIN",
"addresses",
"AS",
"T3",
"ON",
"T2.address_id",
"=",
"T3.address_id",
"ORDER",
"BY",
"T3.address_details"
],
"query_toks_no_value": [
"select",
"t1",
".",
"supplier_name",
",",
"t1",
".",
"supplier_phone",
"from",
"suppliers",
"as",
"t1",
"join",
"supplier_addresses",
"as",
"t2",
"on",
"t1",
".",
"supplier_id",
"=",
"t2",
".",
"supplier_id",
"join",
"addresses",
"as",
"t3",
"on",
"t2",
".",
"address_id",
"=",
"t3",
".",
"address_id",
"order",
"by",
"t3",
".",
"address_details"
],
"question": "Quels sont les noms et numéros de téléphone de tous les fournisseurs, classés par ordre alphabétique de leur adresse?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
2
],
[
"table_unit",
6
],
[
"table_unit",
0
]
],
"conds": [
[
false,
2,
[
0,
[
0,
6,
false
],
null
],
[
0,
22,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
23,
false
],
null
],
[
0,
1,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
7,
false
],
null
]
],
[
0,
[
0,
[
0,
8,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
2,
false
],
null
]
]
],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers",
"query_toks": [
"SELECT",
"customer_phone",
"FROM",
"customers",
"UNION",
"SELECT",
"supplier_phone",
"FROM",
"suppliers"
],
"query_toks_no_value": [
"select",
"customer_phone",
"from",
"customers",
"union",
"select",
"supplier_phone",
"from",
"suppliers"
],
"question": "Quels sont les numéros de téléphone de tous les clients et fournisseurs.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
16,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": {
"from": {
"table_units": [
[
"table_unit",
2
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
8,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers",
"query_toks": [
"SELECT",
"customer_phone",
"FROM",
"customers",
"UNION",
"SELECT",
"supplier_phone",
"FROM",
"suppliers"
],
"query_toks_no_value": [
"select",
"customer_phone",
"from",
"customers",
"union",
"select",
"supplier_phone",
"from",
"suppliers"
],
"question": "Renvoyez les numéros de téléphone de tous les clients et fournisseurs.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
16,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": {
"from": {
"table_units": [
[
"table_unit",
2
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
8,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased) > 80000",
"query_toks": [
"SELECT",
"product_id",
"FROM",
"Order_Items",
"GROUP",
"BY",
"product_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"3",
"UNION",
"SELECT",
"product_id",
"FROM",
"Product_Suppliers",
"GROUP",
"BY",
"product_id",
"HAVING",
"sum",
"(",
"total_amount_purchased",
")",
">",
"80000"
],
"query_toks_no_value": [
"select",
"product_id",
"from",
"order_items",
"group",
"by",
"product_id",
"having",
"count",
"(",
"*",
")",
">",
"value",
"union",
"select",
"product_id",
"from",
"product_suppliers",
"group",
"by",
"product_id",
"having",
"sum",
"(",
"total_amount_purchased",
")",
">",
"value"
],
"question": "Renvoyez les identifiants de tous les produits qui ont été commandés plus de trois fois ou fournis plus de 80000.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
11
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
45,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
45,
false
]
],
"having": [
[
false,
3,
[
0,
[
3,
0,
false
],
null
],
3.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": {
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
46,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
46,
false
]
],
"having": [
[
false,
3,
[
0,
[
4,
50,
false
],
null
],
80000.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased) > 80000",
"query_toks": [
"SELECT",
"product_id",
"FROM",
"Order_Items",
"GROUP",
"BY",
"product_id",
"HAVING",
"count",
"(",
"*",
")",
">",
"3",
"UNION",
"SELECT",
"product_id",
"FROM",
"Product_Suppliers",
"GROUP",
"BY",
"product_id",
"HAVING",
"sum",
"(",
"total_amount_purchased",
")",
">",
"80000"
],
"query_toks_no_value": [
"select",
"product_id",
"from",
"order_items",
"group",
"by",
"product_id",
"having",
"count",
"(",
"*",
")",
">",
"value",
"union",
"select",
"product_id",
"from",
"product_suppliers",
"group",
"by",
"product_id",
"having",
"sum",
"(",
"total_amount_purchased",
")",
">",
"value"
],
"question": "Quels sont les identifiants de tous les produits qui ont été commandés plus de 3 fois ou dont le montant cumulé des achats est supérieur à 80000?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
11
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
45,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
45,
false
]
],
"having": [
[
false,
3,
[
0,
[
3,
0,
false
],
null
],
3.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": {
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
46,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
46,
false
]
],
"having": [
[
false,
3,
[
0,
[
4,
50,
false
],
null
],
80000.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
},
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900",
"query_toks": [
"SELECT",
"product_id",
",",
"product_name",
"FROM",
"products",
"WHERE",
"product_price",
"<",
"600",
"OR",
"product_price",
">",
"900"
],
"query_toks_no_value": [
"select",
"product_id",
",",
"product_name",
"from",
"products",
"where",
"product_price",
"<",
"value",
"or",
"product_price",
">",
"value"
],
"question": "Quels sont l'identifiant et le nom des produits dont le prix est inférieur à 600 ou supérieur à 900?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
18,
false
],
null
]
],
[
0,
[
0,
[
0,
20,
false
],
null
]
]
]
],
"where": [
[
false,
4,
[
0,
[
0,
21,
false
],
null
],
600.0,
null
],
"or",
[
false,
3,
[
0,
[
0,
21,
false
],
null
],
900.0,
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900",
"query_toks": [
"SELECT",
"product_id",
",",
"product_name",
"FROM",
"products",
"WHERE",
"product_price",
"<",
"600",
"OR",
"product_price",
">",
"900"
],
"query_toks_no_value": [
"select",
"product_id",
",",
"product_name",
"from",
"products",
"where",
"product_price",
"<",
"value",
"or",
"product_price",
">",
"value"
],
"question": "Indiquez les identifiants et les noms des produits dont le prix est inférieur à 600 ou supérieur à 900.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
18,
false
],
null
]
],
[
0,
[
0,
[
0,
20,
false
],
null
]
]
]
],
"where": [
[
false,
4,
[
0,
[
0,
21,
false
],
null
],
600.0,
null
],
"or",
[
false,
3,
[
0,
[
0,
21,
false
],
null
],
900.0,
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000",
"query_toks": [
"SELECT",
"supplier_id",
"FROM",
"Product_Suppliers",
"GROUP",
"BY",
"supplier_id",
"HAVING",
"avg",
"(",
"total_amount_purchased",
")",
">",
"50000",
"OR",
"avg",
"(",
"total_amount_purchased",
")",
"<",
"30000"
],
"query_toks_no_value": [
"select",
"supplier_id",
"from",
"product_suppliers",
"group",
"by",
"supplier_id",
"having",
"avg",
"(",
"total_amount_purchased",
")",
">",
"value",
"or",
"avg",
"(",
"total_amount_purchased",
")",
"<",
"value"
],
"question": "Trouvez l'identifiant des fournisseurs dont le montant moyen acheté pour chaque produit est supérieur à 50000 ou inférieur à 30000.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
47,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
47,
false
]
],
"having": [
[
false,
3,
[
0,
[
5,
50,
false
],
null
],
50000.0,
null
],
"or",
[
false,
4,
[
0,
[
5,
50,
false
],
null
],
30000.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000",
"query_toks": [
"SELECT",
"supplier_id",
"FROM",
"Product_Suppliers",
"GROUP",
"BY",
"supplier_id",
"HAVING",
"avg",
"(",
"total_amount_purchased",
")",
">",
"50000",
"OR",
"avg",
"(",
"total_amount_purchased",
")",
"<",
"30000"
],
"query_toks_no_value": [
"select",
"supplier_id",
"from",
"product_suppliers",
"group",
"by",
"supplier_id",
"having",
"avg",
"(",
"total_amount_purchased",
")",
">",
"value",
"or",
"avg",
"(",
"total_amount_purchased",
")",
"<",
"value"
],
"question": "Quels sont les identifiants des fournisseurs dont le montant moyen des achats est supérieur à 50000 ou inférieur à 30000?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
47,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
47,
false
]
],
"having": [
[
false,
3,
[
0,
[
5,
50,
false
],
null
],
50000.0,
null
],
"or",
[
false,
4,
[
0,
[
5,
50,
false
],
null
],
30000.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT avg(total_amount_purchased) , avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)",
"query_toks": [
"SELECT",
"avg",
"(",
"total_amount_purchased",
")",
",",
"avg",
"(",
"total_value_purchased",
")",
"FROM",
"Product_Suppliers",
"WHERE",
"supplier_id",
"=",
"(",
"SELECT",
"supplier_id",
"FROM",
"Product_Suppliers",
"GROUP",
"BY",
"supplier_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
")"
],
"query_toks_no_value": [
"select",
"avg",
"(",
"total_amount_purchased",
")",
",",
"avg",
"(",
"total_value_purchased",
")",
"from",
"product_suppliers",
"where",
"supplier_id",
"=",
"(",
"select",
"supplier_id",
"from",
"product_suppliers",
"group",
"by",
"supplier_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value",
")"
],
"question": "Quel est le montant moyen acheté et la valeur achetée pour le fournisseur qui fournit le plus de produits.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
5,
[
0,
[
0,
50,
false
],
null
]
],
[
5,
[
0,
[
0,
51,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
47,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
47,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
47,
false
]
],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT avg(total_amount_purchased) , avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)",
"query_toks": [
"SELECT",
"avg",
"(",
"total_amount_purchased",
")",
",",
"avg",
"(",
"total_value_purchased",
")",
"FROM",
"Product_Suppliers",
"WHERE",
"supplier_id",
"=",
"(",
"SELECT",
"supplier_id",
"FROM",
"Product_Suppliers",
"GROUP",
"BY",
"supplier_id",
"ORDER",
"BY",
"count",
"(",
"*",
")",
"DESC",
"LIMIT",
"1",
")"
],
"query_toks_no_value": [
"select",
"avg",
"(",
"total_amount_purchased",
")",
",",
"avg",
"(",
"total_value_purchased",
")",
"from",
"product_suppliers",
"where",
"supplier_id",
"=",
"(",
"select",
"supplier_id",
"from",
"product_suppliers",
"group",
"by",
"supplier_id",
"order",
"by",
"count",
"(",
"*",
")",
"desc",
"limit",
"value",
")"
],
"question": "Renvoyez le montant total moyen acheté et la valeur totale achetée pour le fournisseur qui fournit le plus grand nombre de produits.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
5,
[
0,
[
0,
50,
false
],
null
]
],
[
5,
[
0,
[
0,
51,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
47,
false
],
null
],
{
"from": {
"table_units": [
[
"table_unit",
12
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
47,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
47,
false
]
],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
3,
0,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
},
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT max(customer_code) , min(customer_code) FROM Customers",
"query_toks": [
"SELECT",
"max",
"(",
"customer_code",
")",
",",
"min",
"(",
"customer_code",
")",
"FROM",
"Customers"
],
"query_toks_no_value": [
"select",
"max",
"(",
"customer_code",
")",
",",
"min",
"(",
"customer_code",
")",
"from",
"customers"
],
"question": "Quels sont les codes de client les plus grands et les plus petits?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
1,
[
0,
[
0,
13,
false
],
null
]
],
[
2,
[
0,
[
0,
13,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT max(customer_code) , min(customer_code) FROM Customers",
"query_toks": [
"SELECT",
"max",
"(",
"customer_code",
")",
",",
"min",
"(",
"customer_code",
")",
"FROM",
"Customers"
],
"query_toks_no_value": [
"select",
"max",
"(",
"customer_code",
")",
",",
"min",
"(",
"customer_code",
")",
"from",
"customers"
],
"question": "Renvoyez les codes de client maximums et minimums.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
1,
[
0,
[
0,
13,
false
],
null
]
],
[
2,
[
0,
[
0,
13,
false
],
null
]
]
]
],
"where": [],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"",
"query_toks": [
"SELECT",
"DISTINCT",
"T1.customer_name",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"JOIN",
"order_items",
"AS",
"T3",
"ON",
"T2.order_id",
"=",
"T3.order_id",
"JOIN",
"products",
"AS",
"T4",
"ON",
"T3.product_id",
"=",
"T4.product_id",
"WHERE",
"T4.product_name",
"=",
"``",
"keyboard",
"''"
],
"query_toks_no_value": [
"select",
"distinct",
"t1",
".",
"customer_name",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"join",
"order_items",
"as",
"t3",
"on",
"t2",
".",
"order_id",
"=",
"t3",
".",
"order_id",
"join",
"products",
"as",
"t4",
"on",
"t3",
".",
"product_id",
"=",
"t4",
".",
"product_id",
"where",
"t4",
".",
"product_name",
"=",
"value"
],
"question": "Dressez la liste des noms de tous les clients distincts qui ont acheté un \"keyboard\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
],
[
"table_unit",
11
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
30,
false
],
null
],
[
0,
44,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
45,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
20,
false
],
null
],
"\"keyboard\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"",
"query_toks": [
"SELECT",
"DISTINCT",
"T1.customer_name",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"JOIN",
"order_items",
"AS",
"T3",
"ON",
"T2.order_id",
"=",
"T3.order_id",
"JOIN",
"products",
"AS",
"T4",
"ON",
"T3.product_id",
"=",
"T4.product_id",
"WHERE",
"T4.product_name",
"=",
"``",
"keyboard",
"''"
],
"query_toks_no_value": [
"select",
"distinct",
"t1",
".",
"customer_name",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"join",
"order_items",
"as",
"t3",
"on",
"t2",
".",
"order_id",
"=",
"t3",
".",
"order_id",
"join",
"products",
"as",
"t4",
"on",
"t3",
".",
"product_id",
"=",
"t4",
".",
"product_id",
"where",
"t4",
".",
"product_name",
"=",
"value"
],
"question": "Quels sont les noms distincts des clients qui ont acheté un \"keyboard\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
],
[
"table_unit",
11
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
30,
false
],
null
],
[
0,
44,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
45,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
20,
false
],
null
],
"\"keyboard\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = \"red jeans\"",
"query_toks": [
"SELECT",
"DISTINCT",
"T1.supplier_name",
",",
"T1.supplier_phone",
"FROM",
"suppliers",
"AS",
"T1",
"JOIN",
"product_suppliers",
"AS",
"T2",
"ON",
"T1.supplier_id",
"=",
"T2.supplier_id",
"JOIN",
"products",
"AS",
"T3",
"ON",
"T2.product_id",
"=",
"T3.product_id",
"WHERE",
"T3.product_name",
"=",
"``",
"red",
"jeans",
"''"
],
"query_toks_no_value": [
"select",
"distinct",
"t1",
".",
"supplier_name",
",",
"t1",
".",
"supplier_phone",
"from",
"suppliers",
"as",
"t1",
"join",
"product_suppliers",
"as",
"t2",
"on",
"t1",
".",
"supplier_id",
"=",
"t2",
".",
"supplier_id",
"join",
"products",
"as",
"t3",
"on",
"t2",
".",
"product_id",
"=",
"t3",
".",
"product_id",
"where",
"t3",
".",
"product_name",
"=",
"value"
],
"question": "Dressez la liste des noms et des numéros de téléphone de tous les fournisseurs distincts qui fournissent des \"red jeans\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
2
],
[
"table_unit",
12
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
6,
false
],
null
],
[
0,
47,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
46,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
7,
false
],
null
]
],
[
0,
[
0,
[
0,
8,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
20,
false
],
null
],
"\"red jeans\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = \"red jeans\"",
"query_toks": [
"SELECT",
"DISTINCT",
"T1.supplier_name",
",",
"T1.supplier_phone",
"FROM",
"suppliers",
"AS",
"T1",
"JOIN",
"product_suppliers",
"AS",
"T2",
"ON",
"T1.supplier_id",
"=",
"T2.supplier_id",
"JOIN",
"products",
"AS",
"T3",
"ON",
"T2.product_id",
"=",
"T3.product_id",
"WHERE",
"T3.product_name",
"=",
"``",
"red",
"jeans",
"''"
],
"query_toks_no_value": [
"select",
"distinct",
"t1",
".",
"supplier_name",
",",
"t1",
".",
"supplier_phone",
"from",
"suppliers",
"as",
"t1",
"join",
"product_suppliers",
"as",
"t2",
"on",
"t1",
".",
"supplier_id",
"=",
"t2",
".",
"supplier_id",
"join",
"products",
"as",
"t3",
"on",
"t2",
".",
"product_id",
"=",
"t3",
".",
"product_id",
"where",
"t3",
".",
"product_name",
"=",
"value"
],
"question": "Quels sont les noms et numéros de téléphone distincts des fournisseurs qui ont des \"red jeans\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
2
],
[
"table_unit",
12
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
6,
false
],
null
],
[
0,
47,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
46,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
7,
false
],
null
]
],
[
0,
[
0,
[
0,
8,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
20,
false
],
null
],
"\"red jeans\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code",
"query_toks": [
"SELECT",
"max",
"(",
"product_price",
")",
",",
"min",
"(",
"product_price",
")",
",",
"product_type_code",
"FROM",
"products",
"GROUP",
"BY",
"product_type_code",
"ORDER",
"BY",
"product_type_code"
],
"query_toks_no_value": [
"select",
"max",
"(",
"product_price",
")",
",",
"min",
"(",
"product_price",
")",
",",
"product_type_code",
"from",
"products",
"group",
"by",
"product_type_code",
"order",
"by",
"product_type_code"
],
"question": "Quels sont les prix les plus élevés et les plus bas des produits, groupés par type de produit et classés par ordre alphabétique?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
1,
[
0,
[
0,
21,
false
],
null
]
],
[
2,
[
0,
[
0,
21,
false
],
null
]
],
[
0,
[
0,
[
0,
19,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
19,
false
]
],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
19,
false
],
null
]
]
],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code",
"query_toks": [
"SELECT",
"max",
"(",
"product_price",
")",
",",
"min",
"(",
"product_price",
")",
",",
"product_type_code",
"FROM",
"products",
"GROUP",
"BY",
"product_type_code",
"ORDER",
"BY",
"product_type_code"
],
"query_toks_no_value": [
"select",
"max",
"(",
"product_price",
")",
",",
"min",
"(",
"product_price",
")",
",",
"product_type_code",
"from",
"products",
"group",
"by",
"product_type_code",
"order",
"by",
"product_type_code"
],
"question": "Indiquez les prix maximum et minimum des produits pour chaque type de produit, regroupés et classés par type de produit.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
1,
[
0,
[
0,
21,
false
],
null
]
],
[
2,
[
0,
[
0,
21,
false
],
null
]
],
[
0,
[
0,
[
0,
19,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
19,
false
]
],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
19,
false
],
null
]
]
],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = \"Cancelled\" ORDER BY order_date",
"query_toks": [
"SELECT",
"order_id",
",",
"customer_id",
"FROM",
"customer_orders",
"WHERE",
"order_status_code",
"=",
"``",
"Cancelled",
"''",
"ORDER",
"BY",
"order_date"
],
"query_toks_no_value": [
"select",
"order_id",
",",
"customer_id",
"from",
"customer_orders",
"where",
"order_status_code",
"=",
"value",
"order",
"by",
"order_date"
],
"question": "Répertoriez l'identifiant de la commande, l'identifiant du client pour les commandes en statut \"Cancelled\", classés par date de commande.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
8
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
30,
false
],
null
]
],
[
0,
[
0,
[
0,
31,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"Cancelled\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
33,
false
],
null
]
]
],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = \"Cancelled\" ORDER BY order_date",
"query_toks": [
"SELECT",
"order_id",
",",
"customer_id",
"FROM",
"customer_orders",
"WHERE",
"order_status_code",
"=",
"``",
"Cancelled",
"''",
"ORDER",
"BY",
"order_date"
],
"query_toks_no_value": [
"select",
"order_id",
",",
"customer_id",
"from",
"customer_orders",
"where",
"order_status_code",
"=",
"value",
"order",
"by",
"order_date"
],
"question": "Quels sont les identifiants de la commande et les identifiants du client pour les commandes \"Cancelled\", triés par date de commande?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
8
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
30,
false
],
null
]
],
[
0,
[
0,
[
0,
31,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
32,
false
],
null
],
"\"Cancelled\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [
"asc",
[
[
0,
[
0,
33,
false
],
null
]
]
],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 2",
"query_toks": [
"SELECT",
"DISTINCT",
"T3.product_name",
"FROM",
"customer_orders",
"AS",
"T1",
"JOIN",
"order_items",
"AS",
"T2",
"ON",
"T1.order_id",
"=",
"T2.order_id",
"JOIN",
"products",
"AS",
"T3",
"ON",
"T2.product_id",
"=",
"T3.product_id",
"GROUP",
"BY",
"T3.product_id",
"HAVING",
"COUNT",
"(",
"DISTINCT",
"T1.customer_id",
")",
">",
"=",
"2"
],
"query_toks_no_value": [
"select",
"distinct",
"t3",
".",
"product_name",
"from",
"customer_orders",
"as",
"t1",
"join",
"order_items",
"as",
"t2",
"on",
"t1",
".",
"order_id",
"=",
"t2",
".",
"order_id",
"join",
"products",
"as",
"t3",
"on",
"t2",
".",
"product_id",
"=",
"t3",
".",
"product_id",
"group",
"by",
"t3",
".",
"product_id",
"having",
"count",
"(",
"distinct",
"t1",
".",
"customer_id",
")",
">",
"=",
"value"
],
"question": "Recherchez les noms des produits achetés par au moins deux clients distincts.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
8
],
[
"table_unit",
11
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
30,
false
],
null
],
[
0,
44,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
45,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
20,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
18,
false
]
],
"having": [
[
false,
5,
[
0,
[
3,
31,
true
],
null
],
2.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 2",
"query_toks": [
"SELECT",
"DISTINCT",
"T3.product_name",
"FROM",
"customer_orders",
"AS",
"T1",
"JOIN",
"order_items",
"AS",
"T2",
"ON",
"T1.order_id",
"=",
"T2.order_id",
"JOIN",
"products",
"AS",
"T3",
"ON",
"T2.product_id",
"=",
"T3.product_id",
"GROUP",
"BY",
"T3.product_id",
"HAVING",
"COUNT",
"(",
"DISTINCT",
"T1.customer_id",
")",
">",
"=",
"2"
],
"query_toks_no_value": [
"select",
"distinct",
"t3",
".",
"product_name",
"from",
"customer_orders",
"as",
"t1",
"join",
"order_items",
"as",
"t2",
"on",
"t1",
".",
"order_id",
"=",
"t2",
".",
"order_id",
"join",
"products",
"as",
"t3",
"on",
"t2",
".",
"product_id",
"=",
"t3",
".",
"product_id",
"group",
"by",
"t3",
".",
"product_id",
"having",
"count",
"(",
"distinct",
"t1",
".",
"customer_id",
")",
">",
"=",
"value"
],
"question": "Quels sont les noms distincts des produits achetés par au moins deux clients différents?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
8
],
[
"table_unit",
11
],
[
"table_unit",
5
]
],
"conds": [
[
false,
2,
[
0,
[
0,
30,
false
],
null
],
[
0,
44,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
45,
false
],
null
],
[
0,
18,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
20,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
18,
false
]
],
"having": [
[
false,
5,
[
0,
[
3,
31,
true
],
null
],
2.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3",
"query_toks": [
"SELECT",
"DISTINCT",
"T1.customer_name",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"JOIN",
"order_items",
"AS",
"T3",
"ON",
"T2.order_id",
"=",
"T3.order_id",
"GROUP",
"BY",
"T1.customer_id",
"HAVING",
"COUNT",
"(",
"DISTINCT",
"T3.product_id",
")",
">",
"=",
"3"
],
"query_toks_no_value": [
"select",
"distinct",
"t1",
".",
"customer_name",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"join",
"order_items",
"as",
"t3",
"on",
"t2",
".",
"order_id",
"=",
"t3",
".",
"order_id",
"group",
"by",
"t1",
".",
"customer_id",
"having",
"count",
"(",
"distinct",
"t3",
".",
"product_id",
")",
">",
"=",
"value"
],
"question": "Trouvez les noms des clients qui ont acheté au moins trois produits distincts.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
],
[
"table_unit",
11
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
30,
false
],
null
],
[
0,
44,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
11,
false
]
],
"having": [
[
false,
5,
[
0,
[
3,
45,
true
],
null
],
3.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3",
"query_toks": [
"SELECT",
"DISTINCT",
"T1.customer_name",
"FROM",
"customers",
"AS",
"T1",
"JOIN",
"customer_orders",
"AS",
"T2",
"ON",
"T1.customer_id",
"=",
"T2.customer_id",
"JOIN",
"order_items",
"AS",
"T3",
"ON",
"T2.order_id",
"=",
"T3.order_id",
"GROUP",
"BY",
"T1.customer_id",
"HAVING",
"COUNT",
"(",
"DISTINCT",
"T3.product_id",
")",
">",
"=",
"3"
],
"query_toks_no_value": [
"select",
"distinct",
"t1",
".",
"customer_name",
"from",
"customers",
"as",
"t1",
"join",
"customer_orders",
"as",
"t2",
"on",
"t1",
".",
"customer_id",
"=",
"t2",
".",
"customer_id",
"join",
"order_items",
"as",
"t3",
"on",
"t2",
".",
"order_id",
"=",
"t3",
".",
"order_id",
"group",
"by",
"t1",
".",
"customer_id",
"having",
"count",
"(",
"distinct",
"t3",
".",
"product_id",
")",
">",
"=",
"value"
],
"question": "Quels sont les noms distincts des clients qui ont acheté au moins trois produits différents?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
],
[
"table_unit",
8
],
[
"table_unit",
11
]
],
"conds": [
[
false,
2,
[
0,
[
0,
11,
false
],
null
],
[
0,
31,
false
],
null
],
"and",
[
false,
2,
[
0,
[
0,
30,
false
],
null
],
[
0,
44,
false
],
null
]
]
},
"select": [
true,
[
[
0,
[
0,
[
0,
14,
false
],
null
]
]
]
],
"where": [],
"groupBy": [
[
0,
11,
false
]
],
"having": [
[
false,
5,
[
0,
[
3,
45,
true
],
null
],
3.0,
null
]
],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Sales Person\" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Clerical Staff\"",
"query_toks": [
"SELECT",
"T1.staff_name",
",",
"T1.staff_gender",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"Staff_Department_Assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.job_title_code",
"=",
"``",
"Sales",
"Person",
"''",
"EXCEPT",
"SELECT",
"T1.staff_name",
",",
"T1.staff_gender",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"Staff_Department_Assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.job_title_code",
"=",
"``",
"Clerical",
"Staff",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_name",
",",
"t1",
".",
"staff_gender",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"job_title_code",
"=",
"value",
"except",
"select",
"t1",
".",
"staff_name",
",",
"t1",
".",
"staff_gender",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"job_title_code",
"=",
"value"
],
"question": "Trouvez le nom et le sexe du personnel qui a été affecté au poste de \"Sales Person\" mais jamais de \"Clerical Staff\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
],
[
0,
[
0,
[
0,
4,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
55,
false
],
null
],
"\"Sales Person\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
],
[
0,
[
0,
[
0,
4,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
55,
false
],
null
],
"\"Clerical Staff\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
}
},
{
"db_id": "department_store",
"query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Sales Person\" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Clerical Staff\"",
"query_toks": [
"SELECT",
"T1.staff_name",
",",
"T1.staff_gender",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"Staff_Department_Assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.job_title_code",
"=",
"``",
"Sales",
"Person",
"''",
"EXCEPT",
"SELECT",
"T1.staff_name",
",",
"T1.staff_gender",
"FROM",
"staff",
"AS",
"T1",
"JOIN",
"Staff_Department_Assignments",
"AS",
"T2",
"ON",
"T1.staff_id",
"=",
"T2.staff_id",
"WHERE",
"T2.job_title_code",
"=",
"``",
"Clerical",
"Staff",
"''"
],
"query_toks_no_value": [
"select",
"t1",
".",
"staff_name",
",",
"t1",
".",
"staff_gender",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"job_title_code",
"=",
"value",
"except",
"select",
"t1",
".",
"staff_name",
",",
"t1",
".",
"staff_gender",
"from",
"staff",
"as",
"t1",
"join",
"staff_department_assignments",
"as",
"t2",
"on",
"t1",
".",
"staff_id",
"=",
"t2",
".",
"staff_id",
"where",
"t2",
".",
"job_title_code",
"=",
"value"
],
"question": "Quels sont les noms et les sexes des employés qui ont occupé le titre de \"Sales Person\", mais jamais de \"Clerical Staff\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
],
[
0,
[
0,
[
0,
4,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
55,
false
],
null
],
"\"Sales Person\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": {
"from": {
"table_units": [
[
"table_unit",
1
],
[
"table_unit",
13
]
],
"conds": [
[
false,
2,
[
0,
[
0,
3,
false
],
null
],
[
0,
52,
false
],
null
]
]
},
"select": [
false,
[
[
0,
[
0,
[
0,
5,
false
],
null
]
],
[
0,
[
0,
[
0,
4,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
55,
false
],
null
],
"\"Clerical Staff\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
}
},
{
"db_id": "department_store",
"query": "SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE \"%WY%\" AND payment_method_code != \"Credit Card\"",
"query_toks": [
"SELECT",
"customer_id",
",",
"customer_name",
"FROM",
"customers",
"WHERE",
"customer_address",
"LIKE",
"``",
"%",
"WY",
"%",
"''",
"AND",
"payment_method_code",
"!",
"=",
"``",
"Credit",
"Card",
"''"
],
"query_toks_no_value": [
"select",
"customer_id",
",",
"customer_name",
"from",
"customers",
"where",
"customer_address",
"like",
"value",
"and",
"payment_method_code",
"!",
"=",
"value"
],
"question": "Trouvez l'identifiant et le nom des clients dont l'adresse contient l'état \"WY\" et n'utilisez pas de \"credit card\" pour le paiement.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
11,
false
],
null
]
],
[
0,
[
0,
[
0,
14,
false
],
null
]
]
]
],
"where": [
[
false,
9,
[
0,
[
0,
15,
false
],
null
],
"\"%WY%\"",
null
],
"and",
[
false,
7,
[
0,
[
0,
12,
false
],
null
],
"\"Credit Card\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE \"%WY%\" AND payment_method_code != \"Credit Card\"",
"query_toks": [
"SELECT",
"customer_id",
",",
"customer_name",
"FROM",
"customers",
"WHERE",
"customer_address",
"LIKE",
"``",
"%",
"WY",
"%",
"''",
"AND",
"payment_method_code",
"!",
"=",
"``",
"Credit",
"Card",
"''"
],
"query_toks_no_value": [
"select",
"customer_id",
",",
"customer_name",
"from",
"customers",
"where",
"customer_address",
"like",
"value",
"and",
"payment_method_code",
"!",
"=",
"value"
],
"question": "Quels sont les identifiants et noms des clients dont l'adresse contient \"WY\" et qui n'utilisent pas de \"credit card\" pour le paiement?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
4
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
11,
false
],
null
]
],
[
0,
[
0,
[
0,
14,
false
],
null
]
]
]
],
"where": [
[
false,
9,
[
0,
[
0,
15,
false
],
null
],
"\"%WY%\"",
null
],
"and",
[
false,
7,
[
0,
[
0,
12,
false
],
null
],
"\"Credit Card\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'",
"query_toks": [
"SELECT",
"avg",
"(",
"product_price",
")",
"FROM",
"products",
"WHERE",
"product_type_code",
"=",
"'Clothes",
"'"
],
"query_toks_no_value": [
"select",
"avg",
"(",
"product_price",
")",
"from",
"products",
"where",
"product_type_code",
"=",
"value"
],
"question": "Trouvez le prix moyen de tous les produits \"clothes\".",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
5,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
19,
false
],
null
],
"\"Clothes\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'",
"query_toks": [
"SELECT",
"avg",
"(",
"product_price",
")",
"FROM",
"products",
"WHERE",
"product_type_code",
"=",
"'Clothes",
"'"
],
"query_toks_no_value": [
"select",
"avg",
"(",
"product_price",
")",
"from",
"products",
"where",
"product_type_code",
"=",
"value"
],
"question": "Quel est le prix moyen des \"clothes\"?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
5,
[
0,
[
0,
21,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
19,
false
],
null
],
"\"Clothes\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [],
"limit": null,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1",
"query_toks": [
"SELECT",
"product_name",
"FROM",
"products",
"WHERE",
"product_type_code",
"=",
"'Hardware",
"'",
"ORDER",
"BY",
"product_price",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"product_name",
"from",
"products",
"where",
"product_type_code",
"=",
"value",
"order",
"by",
"product_price",
"desc",
"limit",
"value"
],
"question": "Trouvez le nom du produit \"hardware\" le plus cher.",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
20,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
19,
false
],
null
],
"\"Hardware\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
0,
21,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
},
{
"db_id": "department_store",
"query": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1",
"query_toks": [
"SELECT",
"product_name",
"FROM",
"products",
"WHERE",
"product_type_code",
"=",
"'Hardware",
"'",
"ORDER",
"BY",
"product_price",
"DESC",
"LIMIT",
"1"
],
"query_toks_no_value": [
"select",
"product_name",
"from",
"products",
"where",
"product_type_code",
"=",
"value",
"order",
"by",
"product_price",
"desc",
"limit",
"value"
],
"question": "Quel est le nom du produit \"hardware\" le plus cher?",
"sql": {
"from": {
"table_units": [
[
"table_unit",
5
]
],
"conds": []
},
"select": [
false,
[
[
0,
[
0,
[
0,
20,
false
],
null
]
]
]
],
"where": [
[
false,
2,
[
0,
[
0,
19,
false
],
null
],
"\"Hardware\"",
null
]
],
"groupBy": [],
"having": [],
"orderBy": [
"desc",
[
[
0,
[
0,
21,
false
],
null
]
]
],
"limit": 1,
"intersect": null,
"union": null,
"except": null
}
}
]