| [ |
| { |
| "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": "Cho biết id của 3 sản phẩm được mua với số lượng lớn nhất ?", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "top", |
| "three", |
| "products", |
| "that", |
| "were", |
| "purchased", |
| "in", |
| "the", |
| "largest", |
| "amount", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 3, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 50, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "3 sản phẩm nào được mua với số lượng lớn nhất ? Cho tôi biết id của những sản phẩm này .", |
| "question_toks": [ |
| "Give", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "three", |
| "products", |
| "purchased", |
| "in", |
| "the", |
| "largest", |
| "amounts", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 3, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 50, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết id và loại của sản phẩm có giá rẻ nhất .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "product", |
| "id", |
| "and", |
| "product", |
| "type", |
| "of", |
| "the", |
| "cheapest", |
| "product", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Sản phẩm có giá thấp nhất có id và loại sản phẩm là gì ?", |
| "question_toks": [ |
| "Give", |
| "the", |
| "id", |
| "and", |
| "product", |
| "type", |
| "of", |
| "the", |
| "product", |
| "with", |
| "the", |
| "lowest", |
| "price", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Tìm số lượng các loại sản phẩm khác nhau .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "number", |
| "of", |
| "different", |
| "product", |
| "types", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| true |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Đếm số lượng các loại sản phẩm khác nhau .", |
| "question_toks": [ |
| "Count", |
| "the", |
| "number", |
| "of", |
| "distinct", |
| "product", |
| "types", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| true |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết địa chỉ của khách hàng mang mã số id 10 .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "address", |
| "of", |
| "customer", |
| "10", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 1, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 27, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 0 |
| ], |
| [ |
| "table_unit", |
| 7 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 2, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 26, |
| false |
| ], |
| null |
| ], |
| 10.0, |
| 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": "Khách hàng mang mã số id 10 ở địa chỉ nào ?", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "address", |
| "for", |
| "the", |
| "customer", |
| "with", |
| "id", |
| "10", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 1, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 27, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 0 |
| ], |
| [ |
| "table_unit", |
| 7 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 2, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 26, |
| false |
| ], |
| null |
| ], |
| 10.0, |
| 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": "Cho biết id và giới tính của từng nhân viên với chức danh là quản lý bộ phận .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "staff", |
| "ids", |
| "and", |
| "genders", |
| "of", |
| "all", |
| "staffs", |
| "whose", |
| "job", |
| "title", |
| "is", |
| "Department", |
| "Manager", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Department Manager\"", |
| 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": "Những nhân viên với chức danh là quản lý bộ phận có id và giới tính như thế nào ?", |
| "question_toks": [ |
| "Return", |
| "the", |
| "staff", |
| "ids", |
| "and", |
| "genders", |
| "for", |
| "any", |
| "staff", |
| "with", |
| "the", |
| "title", |
| "Department", |
| "Manager", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Department Manager\"", |
| 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": "Đối với mỗi phương thức thanh toán , hãy trả lại số lượng khách hàng sử dụng nó .", |
| "question_toks": [ |
| "For", |
| "each", |
| "payment", |
| "method", |
| ",", |
| "return", |
| "how", |
| "many", |
| "customers", |
| "use", |
| "it", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 12, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 12, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Có bao nhiêu khách hàng sử dụng mỗi phương thức thanh toán ?", |
| "question_toks": [ |
| "How", |
| "many", |
| "customers", |
| "use", |
| "each", |
| "payment", |
| "method", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 12, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 12, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Id của sản phẩm được đặt hàng thường xuyên nhất là gì ?", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "id", |
| "of", |
| "the", |
| "product", |
| "that", |
| "was", |
| "ordered", |
| "the", |
| "most", |
| "often", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 11 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 45, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cung cấp id cho sản phẩm được đặt hàng thường xuyên nhất .", |
| "question_toks": [ |
| "Give", |
| "the", |
| "product", |
| "id", |
| "for", |
| "the", |
| "product", |
| "that", |
| "was", |
| "ordered", |
| "most", |
| "frequently", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 11 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 45, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Tên , số điện thoại và địa chỉ email của khách hàng có số lượng đơn đặt hàng nhiều nhất ?", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "name", |
| ",", |
| "phone", |
| "number", |
| "and", |
| "email", |
| "address", |
| "of", |
| "the", |
| "customer", |
| "who", |
| "made", |
| "the", |
| "largest", |
| "number", |
| "of", |
| "orders", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 31, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 16, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 17, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết tên , số điện thoại và địa chỉ email của khách hàng có nhiều đơn đặt hàng nhất .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "name", |
| ",", |
| "phone", |
| "number", |
| "and", |
| "email", |
| "address", |
| "for", |
| "the", |
| "customer", |
| "with", |
| "the", |
| "most", |
| "orders", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 31, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 16, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 17, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Giá trung bình cho mỗi loại sản phẩm là bao nhiêu ?", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "average", |
| "price", |
| "for", |
| "each", |
| "type", |
| "of", |
| "product", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Hiển thị giá trung bình cho từng loại sản phẩm .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "average", |
| "price", |
| "for", |
| "each", |
| "product", |
| "type", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Chuỗi cửa hàng ở phía Nam có tổng cộng bao nhiêu cửa hàng ?", |
| "question_toks": [ |
| "How", |
| "many", |
| "department", |
| "stores", |
| "does", |
| "the", |
| "store", |
| "chain", |
| "South", |
| "have", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 35, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 9, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 9 |
| ], |
| [ |
| "table_unit", |
| 3 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 10, |
| false |
| ], |
| null |
| ], |
| "\"South\"", |
| 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": "Đếm số lượng cửa hàng mà chuỗi cửa hàng ở phía Nam có .", |
| "question_toks": [ |
| "Count", |
| "the", |
| "number", |
| "of", |
| "stores", |
| "the", |
| "chain", |
| "South", |
| "has", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 35, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 9, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 9 |
| ], |
| [ |
| "table_unit", |
| 3 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 10, |
| false |
| ], |
| null |
| ], |
| "\"South\"", |
| 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": "Cho biết tên và chức danh công việc của nhân viên mới nhất được phân công ?", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "name", |
| "and", |
| "job", |
| "title", |
| "of", |
| "the", |
| "staff", |
| "who", |
| "was", |
| "assigned", |
| "the", |
| "latest", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Nhân viên mới nhất được phân công tên là gì ? Đồng thời hiển thị chức danh công việc của nhân viên này .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "name", |
| "and", |
| "job", |
| "title", |
| "of", |
| "the", |
| "staff", |
| "with", |
| "the", |
| "latest", |
| "date", |
| "assigned", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết tên , loại và giá thành của tất cả các sản phẩm được cung cấp bởi nhà phân phối có id là 3 .", |
| "question_toks": [ |
| "Give", |
| "me", |
| "the", |
| "product", |
| "type", |
| ",", |
| "name", |
| "and", |
| "price", |
| "for", |
| "all", |
| "the", |
| "products", |
| "supplied", |
| "by", |
| "supplier", |
| "id", |
| "3", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| 3.0, |
| 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": "Nhà phân phối có id 3 đã cung cấp những sản phẩm nào ? Cho biết tên , loại và giá thành của từng sản phẩm .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "product", |
| "type", |
| ",", |
| "name", |
| ",", |
| "and", |
| "price", |
| "for", |
| "products", |
| "supplied", |
| "by", |
| "supplier", |
| "3", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| 3.0, |
| 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": "Hiển thị danh sách không trùng lặp bao gồm tên của những khách hàng có trạng thái đơn đặt hàng là đang chờ để xử lý , sắp xếp kết quả theo thứ tự id của khách hàng", |
| "question_toks": [ |
| "Return", |
| "the", |
| "distinct", |
| "name", |
| "of", |
| "customers", |
| "whose", |
| "order", |
| "status", |
| "is", |
| "Pending", |
| ",", |
| "in", |
| "the", |
| "order", |
| "of", |
| "customer", |
| "id", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Pending\"", |
| 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": "Liệt kê những cái tên phân biệt của các khách hàng với trạng thái đơn đặt hàng là đang chờ để xử lý theo thứ tự id của khách hàng .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "distinct", |
| "names", |
| "of", |
| "customers", |
| "with", |
| "an", |
| "order", |
| "status", |
| "of", |
| "Pending", |
| ",", |
| "sorted", |
| "by", |
| "customer", |
| "id", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Pending\"", |
| 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": "Cho biết tên và địa chỉ của những khách hàng có cả những đơn đặt hàng với trạng thái là ' Mới ' cũng như là ' Đang chờ để xử lý ' .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "name", |
| "and", |
| "address", |
| "of", |
| "the", |
| "customers", |
| "who", |
| "have", |
| "both", |
| "New", |
| "and", |
| "Pending", |
| "orders", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Pending\"", |
| null |
| ] |
| ] |
| }, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"New\"", |
| 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": "Những khách hàng nào có cả những đơn đặt hàng mới và những đơn đặt hàng đang chờ được xử lý ? Cho biết tên và địa chỉ của những khách hàng này .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "names", |
| "and", |
| "addressed", |
| "of", |
| "customers", |
| "who", |
| "have", |
| "both", |
| "New", |
| "and", |
| "Pending", |
| "orders", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Pending\"", |
| null |
| ] |
| ] |
| }, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"New\"", |
| 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": "Cho biết id của những sản phẩm được cung cấp bởi nhà phân phối với mã id 2 và có giá cao hơn mức giá trung bình của tất cả các loại sản phẩm .", |
| "question_toks": [ |
| "Return", |
| "ids", |
| "of", |
| "all", |
| "the", |
| "products", |
| "that", |
| "are", |
| "supplied", |
| "by", |
| "supplier", |
| "id", |
| "2", |
| "and", |
| "are", |
| "more", |
| "expensive", |
| "than", |
| "the", |
| "average", |
| "price", |
| "of", |
| "all", |
| "products", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| 2.0, |
| null |
| ], |
| "and", |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| 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": "Những sản phẩm đến từ nhà phân phối có mã id là 2 và có giá đắt hơn mức giá trung bình của tất cả các sản phẩm có id là gì ?", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "products", |
| "from", |
| "the", |
| "supplier", |
| "with", |
| "id", |
| "2", |
| ",", |
| "which", |
| "are", |
| "more", |
| "expensive", |
| "than", |
| "the", |
| "average", |
| "price", |
| "across", |
| "all", |
| "products", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| 2.0, |
| null |
| ], |
| "and", |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| 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": "Cho biết tên và id của cửa hàng có cả bộ phận tiếp thị và bộ phận quản lý .", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "id", |
| "and", |
| "name", |
| "of", |
| "the", |
| "department", |
| "store", |
| "that", |
| "has", |
| "both", |
| "marketing", |
| "and", |
| "managing", |
| "department", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 41, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 10 |
| ], |
| [ |
| "table_unit", |
| 9 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 41, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 10 |
| ], |
| [ |
| "table_unit", |
| 9 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 36, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 42, |
| false |
| ], |
| null |
| ], |
| "\"managing\"", |
| null |
| ] |
| ] |
| }, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 36, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 42, |
| false |
| ], |
| null |
| ], |
| "\"marketing\"", |
| 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": "Những cửa hàng nào có cả bộ phận tiếp thị và bộ phận quản lý ? Cho biết id và tên của những cửa hàng này .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "and", |
| "names", |
| "of", |
| "department", |
| "stores", |
| "with", |
| "both", |
| "marketing", |
| "and", |
| "managing", |
| "departments", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 41, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 10 |
| ], |
| [ |
| "table_unit", |
| 9 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 41, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 10 |
| ], |
| [ |
| "table_unit", |
| 9 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 36, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 42, |
| false |
| ], |
| null |
| ], |
| "\"managing\"", |
| null |
| ] |
| ] |
| }, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 36, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 42, |
| false |
| ], |
| null |
| ], |
| "\"marketing\"", |
| 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": "Tìm id của 2 chuỗi cửa hàng với số lượng cửa hàng lớn nhất .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "two", |
| "department", |
| "store", |
| "chains", |
| "with", |
| "the", |
| "largest", |
| "number", |
| "of", |
| "department", |
| "stores", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 9 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 35, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 2, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 35, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "2 chuỗi cửa hàng nào có nhiều cửa hàng nhất ? Cho tôi biết id của những chuỗi cửa hàng này .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "ids", |
| "of", |
| "the", |
| "two", |
| "department", |
| "store", |
| "chains", |
| "with", |
| "the", |
| "most", |
| "department", |
| "stores", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 9 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 35, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 2, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 35, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết bộ phận với số lượng nhân viên ít nhất", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "id", |
| "of", |
| "the", |
| "department", |
| "with", |
| "the", |
| "least", |
| "number", |
| "of", |
| "staff", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 53, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 53, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Bộ phận nào có số lượng nhận viên ít nhất ? Cho biết id của bộ phận này", |
| "question_toks": [ |
| "Return", |
| "the", |
| "id", |
| "of", |
| "the", |
| "department", |
| "with", |
| "the", |
| "fewest", |
| "staff", |
| "assignments", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 53, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 53, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Đối với mỗi loại sản phẩm , hãy cho biết mức giá bán cao nhất và thấp nhất .", |
| "question_toks": [ |
| "For", |
| "each", |
| "product", |
| "type", |
| ",", |
| "return", |
| "the", |
| "maximum", |
| "and", |
| "minimum", |
| "price", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết mức giá bán cao nhất và thấp nhất cho từng loại sản phẩm .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "maximum", |
| "and", |
| "minimum", |
| "product", |
| "prices", |
| "for", |
| "each", |
| "product", |
| "type", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Tìm loại sản phẩm có giá trung bình cao hơn giá trung bình của tất cả các sản phẩm .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "product", |
| "type", |
| "whose", |
| "average", |
| "price", |
| "is", |
| "higher", |
| "than", |
| "the", |
| "average", |
| "price", |
| "of", |
| "all", |
| "products", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 5, |
| 21, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết mã của loại sản phẩm với giá trung bình cao hơn giá trung bình của tất cả các sản phẩm .", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "code", |
| "of", |
| "the", |
| "product", |
| "type", |
| "with", |
| "an", |
| "average", |
| "price", |
| "higher", |
| "than", |
| "the", |
| "average", |
| "price", |
| "of", |
| "all", |
| "products", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 5, |
| 21, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Tìm id và tên của nhân viên đã được phân công làm việc trong khoảng thời gian ngắn nhất .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "id", |
| "and", |
| "name", |
| "of", |
| "the", |
| "staff", |
| "who", |
| "has", |
| "been", |
| "assigned", |
| "for", |
| "the", |
| "shortest", |
| "period", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| [ |
| 0, |
| 54, |
| false |
| ] |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Nhân viên nào đã được phân công làm việc trong khoảng thời gian ngắn nhất ? Cho biết id và tên của nhân viên này .", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "id", |
| "and", |
| "name", |
| "of", |
| "the", |
| "staff", |
| "who", |
| "has", |
| "been", |
| "assigned", |
| "for", |
| "the", |
| "least", |
| "amount", |
| "of", |
| "time", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| [ |
| 0, |
| 54, |
| false |
| ] |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Hiển thị tên và id của tất cả các sản phẩm có giá trong khoảng từ 600 đến 700 .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "names", |
| "and", |
| "ids", |
| "of", |
| "all", |
| "products", |
| "whose", |
| "price", |
| "is", |
| "between", |
| "600", |
| "and", |
| "700", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 600.0, |
| 700.0 |
| ] |
| ] |
| } |
| }, |
| { |
| "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": "Những sản phẩm nào có giá bán trong khoảng từ 600 đến 700 . Cho biết tên và id của những sản phẩm này .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "names", |
| "and", |
| "ids", |
| "of", |
| "products", |
| "costing", |
| "between", |
| "600", |
| "and", |
| "700", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 600.0, |
| 700.0 |
| ] |
| ] |
| } |
| }, |
| { |
| "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": "Tìm id của tất cả các khách hàng đã đặt hàng ngay sau khi một số đơn đặt hàng đã bị huỷ .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "ids", |
| "of", |
| "all", |
| "distinct", |
| "customers", |
| "who", |
| "made", |
| "order", |
| "after", |
| "some", |
| "orders", |
| "that", |
| "were", |
| "Cancelled", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Cancelled\"", |
| null |
| ] |
| ] |
| }, |
| 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": "Những khách hàng đã đặt hàng ngay sau khi một số đơn đặt hàng của họ bị huỷ có id là gì ?", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "distinct", |
| "ids", |
| "of", |
| "customers", |
| "who", |
| "made", |
| "an", |
| "order", |
| "after", |
| "any", |
| "order", |
| "that", |
| "was", |
| "Cancelled", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Cancelled\"", |
| null |
| ] |
| ] |
| }, |
| 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": "Cho biết id của những nhân viên đã được phân vào một bộ phận nào đó trước tất cả các nhân viên văn phòng", |
| "question_toks": [ |
| "What", |
| "is", |
| "id", |
| "of", |
| "the", |
| "staff", |
| "who", |
| "had", |
| "a", |
| "Staff", |
| "Department", |
| "Assignment", |
| "earlier", |
| "than", |
| "any", |
| "Clerical", |
| "Staff", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Clerical Staff\"", |
| null |
| ] |
| ] |
| }, |
| 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": "Những nhân viên nào đã được phân vào một số bộ phận sớm hơn tất cả các nhân viên văn phòng . Cho biết id của những nhân viên này .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "id", |
| "of", |
| "the", |
| "staff", |
| "whose", |
| "Staff", |
| "Department", |
| "Assignment", |
| "was", |
| "earlier", |
| "than", |
| "that", |
| "of", |
| "any", |
| "Clerical", |
| "Staff", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Clerical Staff\"", |
| null |
| ] |
| ] |
| }, |
| 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": "Cho biết tên và id của những khách hàng với địa chỉ có chứa cụm kí tự TN .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "names", |
| "and", |
| "ids", |
| "of", |
| "customers", |
| "whose", |
| "address", |
| "contains", |
| "TN", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ], |
| "\"%TN%\"", |
| 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": "Những khách hàng nào có địa chỉ chứa cụm kí tự TN . Hãy hiển thị tên và id cho những khách hàng đó .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "names", |
| "and", |
| "ids", |
| "of", |
| "customers", |
| "who", |
| "have", |
| "TN", |
| "in", |
| "their", |
| "address", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ], |
| "\"%TN%\"", |
| 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": "Cho biết tên và giới tính của những nhân viên đã được giao việc trong năm 2016 .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "name", |
| "and", |
| "gender", |
| "of", |
| "the", |
| "staff", |
| "who", |
| "was", |
| "assigned", |
| "in", |
| "2016", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 54, |
| false |
| ], |
| null |
| ], |
| "\"2016%\"", |
| 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": "Những nhân viên nào đã được giao việc trong năm 2016 . Liệt kê tên và giới tính của những nhân viên đó .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "names", |
| "and", |
| "genders", |
| "of", |
| "staff", |
| "who", |
| "were", |
| "assigned", |
| "in", |
| "2016", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 54, |
| false |
| ], |
| null |
| ], |
| "\"2016%\"", |
| 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": "Liệt kê tên của những nhân viên đã được phân công nhiều công việc .", |
| "question_toks": [ |
| "List", |
| "the", |
| "name", |
| "of", |
| "staff", |
| "who", |
| "has", |
| "been", |
| "assigned", |
| "multiple", |
| "jobs", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 52, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ], |
| 1.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Những nhân viên nào đã được giao cho nhiều công việc ? Cho biết tên của những nhân viên này .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "names", |
| "of", |
| "staff", |
| "who", |
| "have", |
| "been", |
| "assigned", |
| "multiple", |
| "jobs", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 52, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ], |
| 1.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Liệt kê tên và số điện thoại của tất cả các nhà phân phối theo thứ tự bảng chữ cái của địa chỉ mà họ đang ở .", |
| "question_toks": [ |
| "List", |
| "the", |
| "name", |
| "and", |
| "phone", |
| "number", |
| "of", |
| "all", |
| "suppliers", |
| "in", |
| "the", |
| "alphabetical", |
| "order", |
| "of", |
| "their", |
| "addresses", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 6, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 22, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 23, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 1, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ], |
| [ |
| "table_unit", |
| 6 |
| ], |
| [ |
| "table_unit", |
| 0 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 2, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 7, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Sắp xếp tên và số điện thoại của các nhà phân phối theo thứ tự bảng chữ cái của địa chỉ mà họ đang ở .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "names", |
| "and", |
| "phone", |
| "numbers", |
| "for", |
| "all", |
| "suppliers", |
| ",", |
| "sorted", |
| "in", |
| "alphabetical", |
| "order", |
| "of", |
| "their", |
| "addressed", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 6, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 22, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 23, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 1, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ], |
| [ |
| "table_unit", |
| 6 |
| ], |
| [ |
| "table_unit", |
| 0 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 2, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 7, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết số điện thoại của tất cả các khách hàng cũng như là số điện thoại của những nhà phân phối .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "phone", |
| "numbers", |
| "of", |
| "all", |
| "customers", |
| "and", |
| "suppliers", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 16, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Các khách hàng cũng như là các nhà phân phối có số điện thoại là gì ?", |
| "question_toks": [ |
| "Return", |
| "the", |
| "phone", |
| "numbers", |
| "for", |
| "all", |
| "customers", |
| "and", |
| "suppliers", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 16, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết id của các sản phẩm đã được đặt hàng nhiều hơn 3 lần hoặc có tổng số tiền mua vào nhiều hơn 80000 .", |
| "question_toks": [ |
| "Return", |
| "the", |
| "ids", |
| "of", |
| "all", |
| "products", |
| "that", |
| "were", |
| "ordered", |
| "more", |
| "than", |
| "three", |
| "times", |
| "or", |
| "supplied", |
| "more", |
| "than", |
| "80000", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 11 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 45, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 46, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 4, |
| 50, |
| false |
| ], |
| null |
| ], |
| 80000.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Những sản phẩm nào đã được đặt hàng nhiều hơn 3 lần hoặc có tổng số tiền mua vào nhiều hơn 80000 ? Cho biết id của những sản phẩm này .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "all", |
| "products", |
| "that", |
| "were", |
| "either", |
| "ordered", |
| "more", |
| "than", |
| "3", |
| "times", |
| "or", |
| "have", |
| "a", |
| "cumulative", |
| "amount", |
| "purchased", |
| "of", |
| "above", |
| "80000", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 11 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 45, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 46, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 4, |
| 50, |
| false |
| ], |
| null |
| ], |
| 80000.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết id và tên của những sản phẩm có giá thấp hơn 600 hoặc cao hơn 900 .", |
| "question_toks": [ |
| "What", |
| "are", |
| "id", |
| "and", |
| "name", |
| "of", |
| "the", |
| "products", |
| "whose", |
| "price", |
| "is", |
| "lower", |
| "than", |
| "600", |
| "or", |
| "higher", |
| "than", |
| "900", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 600.0, |
| null |
| ], |
| "or", |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 900.0, |
| 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": "Những sản phẩm có giá thấp hơn 600 hoặc cao hơn 900 có id là gì ?", |
| "question_toks": [ |
| "Give", |
| "the", |
| "ids", |
| "and", |
| "names", |
| "of", |
| "products", |
| "with", |
| "price", |
| "lower", |
| "than", |
| "600", |
| "or", |
| "higher", |
| "than", |
| "900", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 600.0, |
| null |
| ], |
| "or", |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 900.0, |
| 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": "Cho biết id của nhà phân phối có số tiền mua vào trung bình cho mỗi sản phẩm trên 50000 hoặc dưới 30000 .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "id", |
| "of", |
| "suppliers", |
| "whose", |
| "average", |
| "amount", |
| "purchased", |
| "for", |
| "each", |
| "product", |
| "is", |
| "above", |
| "50000", |
| "or", |
| "below", |
| "30000", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "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 |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Những nhà phân phối nào có số tiền mua vào trung bình cho mỗi sản phẩm trên 50000 hoặc dưới 30000 ? Hiển thị id của những nhà phân phối này .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "of", |
| "suppliers", |
| "which", |
| "have", |
| "an", |
| "average", |
| "amount", |
| "purchased", |
| "of", |
| "above", |
| "50000", |
| "or", |
| "below", |
| "30000", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "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 |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết số tiền mua vào trung bình và giá trị mua vào trung bình của nhà phân phối đã cung cấp nhiều sản phẩm nhất .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "average", |
| "amount", |
| "purchased", |
| "and", |
| "value", |
| "purchased", |
| "for", |
| "the", |
| "supplier", |
| "who", |
| "supplies", |
| "the", |
| "most", |
| "products", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 50, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 51, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 47, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| 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": "Những nhà phân phối đã cung cấp nhiều sản phẩm nhất có số tiền mua vào trung bình và giá trị mua vào trung bình là bao nhiêu ?", |
| "question_toks": [ |
| "Return", |
| "the", |
| "average", |
| "total", |
| "amount", |
| "purchased", |
| "and", |
| "total", |
| "value", |
| "purchased", |
| "for", |
| "the", |
| "supplier", |
| "who", |
| "supplies", |
| "the", |
| "greatest", |
| "number", |
| "of", |
| "products", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 50, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 51, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 47, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| }, |
| 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": "Hiển thị mã số lớn nhất và nhỏ nhất trong tất cả các mã số khách hàng .", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "largest", |
| "and", |
| "smallest", |
| "customer", |
| "codes", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 13, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 13, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết mã số khách hàng lớn nhất và nhỏ nhất ?", |
| "question_toks": [ |
| "Return", |
| "the", |
| "maximum", |
| "and", |
| "minimum", |
| "customer", |
| "codes", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 13, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 13, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Liệt kê tên của tất cả các khách hàng khác nhau đã từng mua bàn phím .", |
| "question_toks": [ |
| "List", |
| "the", |
| "names", |
| "of", |
| "all", |
| "the", |
| "distinct", |
| "customers", |
| "who", |
| "bought", |
| "a", |
| "keyboard", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "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 |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ], |
| "\"keyboard\"", |
| 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": "Những khách hàng nào đã từng mua bàn phím ? Hiển thị tên của những người này .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "distinct", |
| "names", |
| "of", |
| "customers", |
| "who", |
| "have", |
| "purchased", |
| "a", |
| "keyboard", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "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 |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ], |
| "\"keyboard\"", |
| 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": "Liệt kê tên và số điện thoại của tất cả các nhà phân phối khác nhau hiện đang cung cấp các loại quần bò màu đỏ .", |
| "question_toks": [ |
| "List", |
| "the", |
| "names", |
| "and", |
| "phone", |
| "numbers", |
| "of", |
| "all", |
| "the", |
| "distinct", |
| "suppliers", |
| "who", |
| "supply", |
| "red", |
| "jeans", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 6, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ], |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 7, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ], |
| "\"red jeans\"", |
| 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": "Hiển thị danh sách bao gồm tên và số điện thoại của các nhà phân phối hiện đang cung cấp các loại quần bò màu đỏ .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "distinct", |
| "names", |
| "and", |
| "phone", |
| "numbers", |
| "for", |
| "suppliers", |
| "who", |
| "have", |
| "red", |
| "jeans", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 6, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ], |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 7, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ], |
| "\"red jeans\"", |
| 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": "Nhóm và sắp xếp mức giá cao nhất cũng như là thấp nhất cho từng loại sản phẩm theo thứ tự mã của mỗi loại sản phẩm .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "highest", |
| "and", |
| "lowest", |
| "prices", |
| "of", |
| "products", |
| ",", |
| "grouped", |
| "by", |
| "and", |
| "alphabetically", |
| "ordered", |
| "by", |
| "product", |
| "type", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết mức giá cao nhất và thấp nhất của từng loại sản phẩm , được nhóm và sắp xếp theo thứ tự mã của mỗi loại .", |
| "question_toks": [ |
| "Give", |
| "the", |
| "maximum", |
| "and", |
| "minimum", |
| "product", |
| "prices", |
| "for", |
| "each", |
| "product", |
| "type", |
| ",", |
| "grouped", |
| "and", |
| "ordered", |
| "by", |
| "product", |
| "type", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Cho biết id đơn đặt hàng và id khách hàng của các đơn đặt hàng ở trạng thái đã bị huỷ bỏ , sắp xếp kết quả theo ngày đặt hàng .", |
| "question_toks": [ |
| "List", |
| "the", |
| "order", |
| "id", |
| ",", |
| "customer", |
| "id", |
| "for", |
| "orders", |
| "in", |
| "Cancelled", |
| "status", |
| ",", |
| "ordered", |
| "by", |
| "their", |
| "order", |
| "dates", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Cancelled\"", |
| 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": "Các đơn đặt hàng nào có trạng thái là đã bị huỷ bỏ ? Sắp xếp id đơn đặt hàng và id khách hàng của những đơn đặt hàng này theo thứ tự ngày đặt hàng .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "order", |
| "ids", |
| "and", |
| "customer", |
| "ids", |
| "for", |
| "orders", |
| "that", |
| "have", |
| "been", |
| "Cancelled", |
| ",", |
| "sorted", |
| "by", |
| "their", |
| "order", |
| "dates", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Cancelled\"", |
| 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": "Tìm tên của các sản phẩm đã được mua bởi ít nhất hai khách hàng khác nhau .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "names", |
| "of", |
| "products", |
| "that", |
| "were", |
| "bought", |
| "by", |
| "at", |
| "least", |
| "two", |
| "distinct", |
| "customers", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 18, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 5, |
| [ |
| 0, |
| [ |
| 3, |
| 31, |
| true |
| ], |
| null |
| ], |
| 2.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Những sản phẩm nào đã được mua bởi hai khách hàng khác nhau ? Cho biết tên của những sản phẩm này .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "distinct", |
| "names", |
| "of", |
| "products", |
| "purchased", |
| "by", |
| "at", |
| "least", |
| "two", |
| "different", |
| "customers", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 18, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 5, |
| [ |
| 0, |
| [ |
| 3, |
| 31, |
| true |
| ], |
| null |
| ], |
| 2.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Tìm tên của khách hàng đã mua ít nhất ba sản phẩm khác nhau .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "names", |
| "of", |
| "customers", |
| "who", |
| "have", |
| "bought", |
| "by", |
| "at", |
| "least", |
| "three", |
| "distinct", |
| "products", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 11, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 5, |
| [ |
| 0, |
| [ |
| 3, |
| 45, |
| true |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Những khách hàng đã mua ít nhất ba sản phẩm khác nhau có tên là gì ?", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "distinct", |
| "names", |
| "of", |
| "customers", |
| "who", |
| "have", |
| "purchased", |
| "at", |
| "least", |
| "three", |
| "different", |
| "products", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ] |
| ] |
| }, |
| "groupBy": [ |
| [ |
| 0, |
| 11, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 5, |
| [ |
| 0, |
| [ |
| 3, |
| 45, |
| true |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [] |
| } |
| }, |
| { |
| "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": "Tìm tên và giới tính của những nhân viên đã được giao cho công việc của một ' nhân viên bán hàng ' nhưng không phải là ' nhân viên thư ký ' .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "name", |
| "and", |
| "gender", |
| "of", |
| "the", |
| "staff", |
| "who", |
| "has", |
| "been", |
| "assigned", |
| "the", |
| "job", |
| "of", |
| "Sales", |
| "Person", |
| "but", |
| "never", |
| "Clerical", |
| "Staff", |
| "." |
| ], |
| "sql": { |
| "except": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Clerical Staff\"", |
| null |
| ] |
| ] |
| }, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Sales Person\"", |
| 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": "Những nhân viên nào đã giữ chức vụ là ' nhân viên bán hàng ' chứ không phải là ' nhân viên thư ký ' ? Cho biết tên và giới tính của họ .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "names", |
| "and", |
| "genders", |
| "of", |
| "staff", |
| "who", |
| "have", |
| "held", |
| "the", |
| "title", |
| "Sales", |
| "Person", |
| ",", |
| "but", |
| "never", |
| "Clerical", |
| "Staff", |
| "?" |
| ], |
| "sql": { |
| "except": { |
| "except": null, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Clerical Staff\"", |
| null |
| ] |
| ] |
| }, |
| "from": { |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ], |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Sales Person\"", |
| 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": "Tìm id và tên của khách hàng có địa chỉ ở tiểu bang WY và không sử dụng thẻ tín dụng để thanh toán .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "id", |
| "and", |
| "name", |
| "of", |
| "customers", |
| "whose", |
| "address", |
| "contains", |
| "WY", |
| "state", |
| "and", |
| "do", |
| "not", |
| "use", |
| "credit", |
| "card", |
| "for", |
| "payment", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ], |
| "\"%WY%\"", |
| null |
| ], |
| "and", |
| [ |
| false, |
| 7, |
| [ |
| 0, |
| [ |
| 0, |
| 12, |
| false |
| ], |
| null |
| ], |
| "\"Credit Card\"", |
| 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": "Những khách hàng nào có chứa WY trong địa chỉ và không sử dụng thẻ tín dụng để thanh toán ? Cho biết tên và id của những khách hàng này .", |
| "question_toks": [ |
| "What", |
| "are", |
| "the", |
| "ids", |
| "and", |
| "names", |
| "of", |
| "customers", |
| "with", |
| "addressed", |
| "that", |
| "contain", |
| "WY", |
| "and", |
| "who", |
| "do", |
| "not", |
| "use", |
| "a", |
| "credit", |
| "card", |
| "for", |
| "payment", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ], |
| "\"%WY%\"", |
| null |
| ], |
| "and", |
| [ |
| false, |
| 7, |
| [ |
| 0, |
| [ |
| 0, |
| 12, |
| false |
| ], |
| null |
| ], |
| "\"Credit Card\"", |
| 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": "Tìm giá trung bình của tất cả các sản phẩm quần áo .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "average", |
| "price", |
| "of", |
| "all", |
| "product", |
| "clothes", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ], |
| "\"Clothes\"", |
| 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": "Những sản phẩm quần áo có giá trung bình là bao nhiêu ?", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "average", |
| "price", |
| "of", |
| "clothes", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": null, |
| "orderBy": [], |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ], |
| "\"Clothes\"", |
| 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": "Cho biết tên của sản phẩm phần cứng được bán với giá cao nhất .", |
| "question_toks": [ |
| "Find", |
| "the", |
| "name", |
| "of", |
| "the", |
| "most", |
| "expensive", |
| "hardware", |
| "product", |
| "." |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ], |
| "\"Hardware\"", |
| 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": "Sản phẩm phần cứng có giá cao nhất tên là gì ?", |
| "question_toks": [ |
| "What", |
| "is", |
| "the", |
| "name", |
| "of", |
| "the", |
| "hardware", |
| "product", |
| "with", |
| "the", |
| "greatest", |
| "price", |
| "?" |
| ], |
| "sql": { |
| "except": null, |
| "from": { |
| "conds": [], |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ] |
| }, |
| "groupBy": [], |
| "having": [], |
| "intersect": null, |
| "limit": 1, |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "union": null, |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ], |
| "\"Hardware\"", |
| null |
| ] |
| ] |
| } |
| } |
| ] |