| [ |
| { |
| "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つの製品のIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 50, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 3, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3", |
| "query_toks": [ |
| "SELECT", |
| "product_id", |
| "FROM", |
| "product_suppliers", |
| "ORDER", |
| "BY", |
| "total_amount_purchased", |
| "DESC", |
| "LIMIT", |
| "3" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_id", |
| "from", |
| "product_suppliers", |
| "order", |
| "by", |
| "total_amount_purchased", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "最も多く購入した3つの製品のIDを入力します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 50, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 3, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "product_id", |
| ",", |
| "product_type_code", |
| "FROM", |
| "products", |
| "ORDER", |
| "BY", |
| "product_price", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_id", |
| ",", |
| "product_type_code", |
| "from", |
| "products", |
| "order", |
| "by", |
| "product_price", |
| "limit", |
| "value" |
| ], |
| "question": "最も安い製品の製品IDと製品タイプは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_id , product_type_code FROM products ORDER BY product_price LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "product_id", |
| ",", |
| "product_type_code", |
| "FROM", |
| "products", |
| "ORDER", |
| "BY", |
| "product_price", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_id", |
| ",", |
| "product_type_code", |
| "from", |
| "products", |
| "order", |
| "by", |
| "product_price", |
| "limit", |
| "value" |
| ], |
| "question": "最低価格の商品のIDと商品タイプを入力してください。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT count(DISTINCT product_type_code) FROM products", |
| "query_toks": [ |
| "SELECT", |
| "count", |
| "(", |
| "DISTINCT", |
| "product_type_code", |
| ")", |
| "FROM", |
| "products" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "count", |
| "(", |
| "distinct", |
| "product_type_code", |
| ")", |
| "from", |
| "products" |
| ], |
| "question": "さまざまな製品タイプの数を見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| true |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT count(DISTINCT product_type_code) FROM products", |
| "query_toks": [ |
| "SELECT", |
| "count", |
| "(", |
| "DISTINCT", |
| "product_type_code", |
| ")", |
| "FROM", |
| "products" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "count", |
| "(", |
| "distinct", |
| "product_type_code", |
| ")", |
| "from", |
| "products" |
| ], |
| "question": "異なる製品タイプの数を数えます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| true |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10", |
| "query_toks": [ |
| "SELECT", |
| "T1.address_details", |
| "FROM", |
| "addresses", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_addresses", |
| "AS", |
| "T2", |
| "ON", |
| "T1.address_id", |
| "=", |
| "T2.address_id", |
| "WHERE", |
| "T2.customer_id", |
| "=", |
| "10" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "address_details", |
| "from", |
| "addresses", |
| "as", |
| "t1", |
| "join", |
| "customer_addresses", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "address_id", |
| "=", |
| "t2", |
| ".", |
| "address_id", |
| "where", |
| "t2", |
| ".", |
| "customer_id", |
| "=", |
| "value" |
| ], |
| "question": "顧客10の住所を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 0 |
| ], |
| [ |
| "table_unit", |
| 7 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 1, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 27, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 2, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 26, |
| false |
| ], |
| null |
| ], |
| 10.0, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10", |
| "query_toks": [ |
| "SELECT", |
| "T1.address_details", |
| "FROM", |
| "addresses", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_addresses", |
| "AS", |
| "T2", |
| "ON", |
| "T1.address_id", |
| "=", |
| "T2.address_id", |
| "WHERE", |
| "T2.customer_id", |
| "=", |
| "10" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "address_details", |
| "from", |
| "addresses", |
| "as", |
| "t1", |
| "join", |
| "customer_addresses", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "address_id", |
| "=", |
| "t2", |
| ".", |
| "address_id", |
| "where", |
| "t2", |
| ".", |
| "customer_id", |
| "=", |
| "value" |
| ], |
| "question": "ID 10の顧客の住所は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 0 |
| ], |
| [ |
| "table_unit", |
| 7 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 1, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 27, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 2, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 26, |
| false |
| ], |
| null |
| ], |
| 10.0, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Department Manager\"", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_id", |
| ",", |
| "T1.staff_gender", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "staff_department_assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "WHERE", |
| "T2.job_title_code", |
| "=", |
| "``", |
| "Department", |
| "Manager", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_id", |
| ",", |
| "t1", |
| ".", |
| "staff_gender", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "where", |
| "t2", |
| ".", |
| "job_title_code", |
| "=", |
| "value" |
| ], |
| "question": "役職が「Department Manager」であるすべてのスタッフのスタッフIDと性別は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Department Manager\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_id , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Department Manager\"", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_id", |
| ",", |
| "T1.staff_gender", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "staff_department_assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "WHERE", |
| "T2.job_title_code", |
| "=", |
| "``", |
| "Department", |
| "Manager", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_id", |
| ",", |
| "t1", |
| ".", |
| "staff_gender", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "where", |
| "t2", |
| ".", |
| "job_title_code", |
| "=", |
| "value" |
| ], |
| "question": "「Department Manager」というタイトルのスタッフのスタッフIDと性別を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Department Manager\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code", |
| "query_toks": [ |
| "SELECT", |
| "payment_method_code", |
| ",", |
| "count", |
| "(", |
| "*", |
| ")", |
| "FROM", |
| "customers", |
| "GROUP", |
| "BY", |
| "payment_method_code" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "payment_method_code", |
| ",", |
| "count", |
| "(", |
| "*", |
| ")", |
| "from", |
| "customers", |
| "group", |
| "by", |
| "payment_method_code" |
| ], |
| "question": "お支払い方法ごとに、使用した顧客の数を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 12, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 12, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT payment_method_code , count(*) FROM customers GROUP BY payment_method_code", |
| "query_toks": [ |
| "SELECT", |
| "payment_method_code", |
| ",", |
| "count", |
| "(", |
| "*", |
| ")", |
| "FROM", |
| "customers", |
| "GROUP", |
| "BY", |
| "payment_method_code" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "payment_method_code", |
| ",", |
| "count", |
| "(", |
| "*", |
| ")", |
| "from", |
| "customers", |
| "group", |
| "by", |
| "payment_method_code" |
| ], |
| "question": "各支払い方法を使用する顧客は何人ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 12, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 12, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "product_id", |
| "FROM", |
| "order_items", |
| "GROUP", |
| "BY", |
| "product_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_id", |
| "from", |
| "order_items", |
| "group", |
| "by", |
| "product_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "最も頻繁に注文された製品のIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 11 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 45, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "product_id", |
| "FROM", |
| "order_items", |
| "GROUP", |
| "BY", |
| "product_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_id", |
| "from", |
| "order_items", |
| "group", |
| "by", |
| "product_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "最も頻繁に注文された製品の製品IDを指定します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 11 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 45, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "T1.customer_name", |
| ",", |
| "T1.customer_phone", |
| ",", |
| "T1.customer_email", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "GROUP", |
| "BY", |
| "T2.customer_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "customer_name", |
| ",", |
| "t1", |
| ".", |
| "customer_phone", |
| ",", |
| "t1", |
| ".", |
| "customer_email", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "group", |
| "by", |
| "t2", |
| ".", |
| "customer_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "注文数が最も多かったお客様のお名前、電話番号、メールアドレスを教えてください。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 16, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 17, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 31, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.customer_name , T1.customer_phone , T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "T1.customer_name", |
| ",", |
| "T1.customer_phone", |
| ",", |
| "T1.customer_email", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "GROUP", |
| "BY", |
| "T2.customer_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "customer_name", |
| ",", |
| "t1", |
| ".", |
| "customer_phone", |
| ",", |
| "t1", |
| ".", |
| "customer_email", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "group", |
| "by", |
| "t2", |
| ".", |
| "customer_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "注文数が最も多い顧客の名前、電話番号、メールアドレスを返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 16, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 17, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 31, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_code", |
| "query_toks": [ |
| "SELECT", |
| "product_type_code", |
| ",", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| "GROUP", |
| "BY", |
| "product_type_code" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_type_code", |
| ",", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| "group", |
| "by", |
| "product_type_code" |
| ], |
| "question": "各タイプの製品の平均価格はいくらですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_type_code , avg(product_price) FROM products GROUP BY product_type_code", |
| "query_toks": [ |
| "SELECT", |
| "product_type_code", |
| ",", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| "GROUP", |
| "BY", |
| "product_type_code" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_type_code", |
| ",", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| "group", |
| "by", |
| "product_type_code" |
| ], |
| "question": "各商品タイプの平均価格を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = \"South\"", |
| "query_toks": [ |
| "SELECT", |
| "count", |
| "(", |
| "*", |
| ")", |
| "FROM", |
| "department_stores", |
| "AS", |
| "T1", |
| "JOIN", |
| "department_store_chain", |
| "AS", |
| "T2", |
| "ON", |
| "T1.dept_store_chain_id", |
| "=", |
| "T2.dept_store_chain_id", |
| "WHERE", |
| "T2.dept_store_chain_name", |
| "=", |
| "``", |
| "South", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "count", |
| "(", |
| "*", |
| ")", |
| "from", |
| "department_stores", |
| "as", |
| "t1", |
| "join", |
| "department_store_chain", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "dept_store_chain_id", |
| "=", |
| "t2", |
| ".", |
| "dept_store_chain_id", |
| "where", |
| "t2", |
| ".", |
| "dept_store_chain_name", |
| "=", |
| "value" |
| ], |
| "question": "「chain South」にはデパートがいくつありますか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 9 |
| ], |
| [ |
| "table_unit", |
| 3 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 35, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 9, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 10, |
| false |
| ], |
| null |
| ], |
| "\"South\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT 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": "「chain South」が持っている店の数を数えます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 9 |
| ], |
| [ |
| "table_unit", |
| 3 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 35, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 9, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 10, |
| false |
| ], |
| null |
| ], |
| "\"South\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_name", |
| ",", |
| "T2.job_title_code", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "staff_department_assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "ORDER", |
| "BY", |
| "T2.date_assigned_to", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| ",", |
| "t2", |
| ".", |
| "job_title_code", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "order", |
| "by", |
| "t2", |
| ".", |
| "date_assigned_to", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "最新の担当者の氏名と役職は?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_name", |
| ",", |
| "T2.job_title_code", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "staff_department_assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "ORDER", |
| "BY", |
| "T2.date_assigned_to", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| ",", |
| "t2", |
| ".", |
| "job_title_code", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "order", |
| "by", |
| "t2", |
| ".", |
| "date_assigned_to", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "最新の日付が割り当てられたスタッフの名前と役職を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3", |
| "query_toks": [ |
| "SELECT", |
| "T2.product_type_code", |
| ",", |
| "T2.product_name", |
| ",", |
| "T2.product_price", |
| "FROM", |
| "product_suppliers", |
| "AS", |
| "T1", |
| "JOIN", |
| "products", |
| "AS", |
| "T2", |
| "ON", |
| "T1.product_id", |
| "=", |
| "T2.product_id", |
| "WHERE", |
| "T1.supplier_id", |
| "=", |
| "3" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t2", |
| ".", |
| "product_type_code", |
| ",", |
| "t2", |
| ".", |
| "product_name", |
| ",", |
| "t2", |
| ".", |
| "product_price", |
| "from", |
| "product_suppliers", |
| "as", |
| "t1", |
| "join", |
| "products", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "product_id", |
| "=", |
| "t2", |
| ".", |
| "product_id", |
| "where", |
| "t1", |
| ".", |
| "supplier_id", |
| "=", |
| "value" |
| ], |
| "question": "サプライヤーID3が提供するすべての製品の製品タイプ、名前、価格を教えてください。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T2.product_type_code , T2.product_name , T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 3", |
| "query_toks": [ |
| "SELECT", |
| "T2.product_type_code", |
| ",", |
| "T2.product_name", |
| ",", |
| "T2.product_price", |
| "FROM", |
| "product_suppliers", |
| "AS", |
| "T1", |
| "JOIN", |
| "products", |
| "AS", |
| "T2", |
| "ON", |
| "T1.product_id", |
| "=", |
| "T2.product_id", |
| "WHERE", |
| "T1.supplier_id", |
| "=", |
| "3" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t2", |
| ".", |
| "product_type_code", |
| ",", |
| "t2", |
| ".", |
| "product_name", |
| ",", |
| "t2", |
| ".", |
| "product_price", |
| "from", |
| "product_suppliers", |
| "as", |
| "t1", |
| "join", |
| "products", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "product_id", |
| "=", |
| "t2", |
| ".", |
| "product_id", |
| "where", |
| "t1", |
| ".", |
| "supplier_id", |
| "=", |
| "value" |
| ], |
| "question": "サプライヤ3から提供された製品の製品タイプ、名前、および価格を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.customer_name", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "WHERE", |
| "T2.order_status_code", |
| "=", |
| "``", |
| "Pending", |
| "''", |
| "ORDER", |
| "BY", |
| "T2.customer_id" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "customer_name", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "where", |
| "t2", |
| ".", |
| "order_status_code", |
| "=", |
| "value", |
| "order", |
| "by", |
| "t2", |
| ".", |
| "customer_id" |
| ], |
| "question": "注文ステータスが「on-hold」の顧客の個別の名前を顧客IDの順序で返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Pending\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\" ORDER BY T2.customer_id", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.customer_name", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "WHERE", |
| "T2.order_status_code", |
| "=", |
| "``", |
| "Pending", |
| "''", |
| "ORDER", |
| "BY", |
| "T2.customer_id" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "customer_name", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "where", |
| "t2", |
| ".", |
| "order_status_code", |
| "=", |
| "value", |
| "order", |
| "by", |
| "t2", |
| ".", |
| "customer_id" |
| ], |
| "question": "注文ステータスが「on-hold」の顧客の識別名は何ですか?顧客IDでソートされていますか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Pending\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"", |
| "query_toks": [ |
| "SELECT", |
| "T1.customer_name", |
| ",", |
| "T1.customer_address", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "WHERE", |
| "T2.order_status_code", |
| "=", |
| "``", |
| "New", |
| "''", |
| "INTERSECT", |
| "SELECT", |
| "T1.customer_name", |
| ",", |
| "T1.customer_address", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "WHERE", |
| "T2.order_status_code", |
| "=", |
| "``", |
| "Pending", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "customer_name", |
| ",", |
| "t1", |
| ".", |
| "customer_address", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "where", |
| "t2", |
| ".", |
| "order_status_code", |
| "=", |
| "value", |
| "intersect", |
| "select", |
| "t1", |
| ".", |
| "customer_name", |
| ",", |
| "t1", |
| ".", |
| "customer_address", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "where", |
| "t2", |
| ".", |
| "order_status_code", |
| "=", |
| "value" |
| ], |
| "question": "新規注文と「on-hold」の注文の両方を持っている顧客の名前と住所を見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"New\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Pending\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"New\" INTERSECT SELECT T1.customer_name , T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = \"Pending\"", |
| "query_toks": [ |
| "SELECT", |
| "T1.customer_name", |
| ",", |
| "T1.customer_address", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "WHERE", |
| "T2.order_status_code", |
| "=", |
| "``", |
| "New", |
| "''", |
| "INTERSECT", |
| "SELECT", |
| "T1.customer_name", |
| ",", |
| "T1.customer_address", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "WHERE", |
| "T2.order_status_code", |
| "=", |
| "``", |
| "Pending", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "customer_name", |
| ",", |
| "t1", |
| ".", |
| "customer_address", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "where", |
| "t2", |
| ".", |
| "order_status_code", |
| "=", |
| "value", |
| "intersect", |
| "select", |
| "t1", |
| ".", |
| "customer_name", |
| ",", |
| "t1", |
| ".", |
| "customer_address", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "where", |
| "t2", |
| ".", |
| "order_status_code", |
| "=", |
| "value" |
| ], |
| "question": "新規注文と「on-hold」の注文の両方を持っている顧客の名前と住所は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"New\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Pending\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)", |
| "query_toks": [ |
| "SELECT", |
| "T1.product_id", |
| "FROM", |
| "product_suppliers", |
| "AS", |
| "T1", |
| "JOIN", |
| "products", |
| "AS", |
| "T2", |
| "ON", |
| "T1.product_id", |
| "=", |
| "T2.product_id", |
| "WHERE", |
| "T1.supplier_id", |
| "=", |
| "2", |
| "AND", |
| "T2.product_price", |
| ">", |
| "(", |
| "SELECT", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "product_id", |
| "from", |
| "product_suppliers", |
| "as", |
| "t1", |
| "join", |
| "products", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "product_id", |
| "=", |
| "t2", |
| ".", |
| "product_id", |
| "where", |
| "t1", |
| ".", |
| "supplier_id", |
| "=", |
| "value", |
| "and", |
| "t2", |
| ".", |
| "product_price", |
| ">", |
| "(", |
| "select", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| ")" |
| ], |
| "question": "サプライヤID2によって提供され、すべての製品の平均価格よりも高いすべての製品の返品ID。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| 2.0, |
| null |
| ], |
| "and", |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT avg(product_price) FROM products)", |
| "query_toks": [ |
| "SELECT", |
| "T1.product_id", |
| "FROM", |
| "product_suppliers", |
| "AS", |
| "T1", |
| "JOIN", |
| "products", |
| "AS", |
| "T2", |
| "ON", |
| "T1.product_id", |
| "=", |
| "T2.product_id", |
| "WHERE", |
| "T1.supplier_id", |
| "=", |
| "2", |
| "AND", |
| "T2.product_price", |
| ">", |
| "(", |
| "SELECT", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "product_id", |
| "from", |
| "product_suppliers", |
| "as", |
| "t1", |
| "join", |
| "products", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "product_id", |
| "=", |
| "t2", |
| ".", |
| "product_id", |
| "where", |
| "t1", |
| ".", |
| "supplier_id", |
| "=", |
| "value", |
| "and", |
| "t2", |
| ".", |
| "product_price", |
| ">", |
| "(", |
| "select", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| ")" |
| ], |
| "question": "ID 2のサプライヤーからの製品のIDは何ですか?これは、すべての製品の平均価格よりも高価です。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| 2.0, |
| null |
| ], |
| "and", |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"", |
| "query_toks": [ |
| "SELECT", |
| "T2.dept_store_id", |
| ",", |
| "T2.store_name", |
| "FROM", |
| "departments", |
| "AS", |
| "T1", |
| "JOIN", |
| "department_stores", |
| "AS", |
| "T2", |
| "ON", |
| "T1.dept_store_id", |
| "=", |
| "T2.dept_store_id", |
| "WHERE", |
| "T1.department_name", |
| "=", |
| "``", |
| "marketing", |
| "''", |
| "INTERSECT", |
| "SELECT", |
| "T2.dept_store_id", |
| ",", |
| "T2.store_name", |
| "FROM", |
| "departments", |
| "AS", |
| "T1", |
| "JOIN", |
| "department_stores", |
| "AS", |
| "T2", |
| "ON", |
| "T1.dept_store_id", |
| "=", |
| "T2.dept_store_id", |
| "WHERE", |
| "T1.department_name", |
| "=", |
| "``", |
| "managing", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t2", |
| ".", |
| "dept_store_id", |
| ",", |
| "t2", |
| ".", |
| "store_name", |
| "from", |
| "departments", |
| "as", |
| "t1", |
| "join", |
| "department_stores", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "dept_store_id", |
| "=", |
| "t2", |
| ".", |
| "dept_store_id", |
| "where", |
| "t1", |
| ".", |
| "department_name", |
| "=", |
| "value", |
| "intersect", |
| "select", |
| "t2", |
| ".", |
| "dept_store_id", |
| ",", |
| "t2", |
| ".", |
| "store_name", |
| "from", |
| "departments", |
| "as", |
| "t1", |
| "join", |
| "department_stores", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "dept_store_id", |
| "=", |
| "t2", |
| ".", |
| "dept_store_id", |
| "where", |
| "t1", |
| ".", |
| "department_name", |
| "=", |
| "value" |
| ], |
| "question": "「marketing」部門と「managing」部門の両方があるデパートのIDと名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 10 |
| ], |
| [ |
| "table_unit", |
| 9 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 41, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 36, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 42, |
| false |
| ], |
| null |
| ], |
| "\"marketing\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 10 |
| ], |
| [ |
| "table_unit", |
| 9 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 41, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 36, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 42, |
| false |
| ], |
| null |
| ], |
| "\"managing\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"marketing\" INTERSECT SELECT T2.dept_store_id , T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id = T2.dept_store_id WHERE T1.department_name = \"managing\"", |
| "query_toks": [ |
| "SELECT", |
| "T2.dept_store_id", |
| ",", |
| "T2.store_name", |
| "FROM", |
| "departments", |
| "AS", |
| "T1", |
| "JOIN", |
| "department_stores", |
| "AS", |
| "T2", |
| "ON", |
| "T1.dept_store_id", |
| "=", |
| "T2.dept_store_id", |
| "WHERE", |
| "T1.department_name", |
| "=", |
| "``", |
| "marketing", |
| "''", |
| "INTERSECT", |
| "SELECT", |
| "T2.dept_store_id", |
| ",", |
| "T2.store_name", |
| "FROM", |
| "departments", |
| "AS", |
| "T1", |
| "JOIN", |
| "department_stores", |
| "AS", |
| "T2", |
| "ON", |
| "T1.dept_store_id", |
| "=", |
| "T2.dept_store_id", |
| "WHERE", |
| "T1.department_name", |
| "=", |
| "``", |
| "managing", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t2", |
| ".", |
| "dept_store_id", |
| ",", |
| "t2", |
| ".", |
| "store_name", |
| "from", |
| "departments", |
| "as", |
| "t1", |
| "join", |
| "department_stores", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "dept_store_id", |
| "=", |
| "t2", |
| ".", |
| "dept_store_id", |
| "where", |
| "t1", |
| ".", |
| "department_name", |
| "=", |
| "value", |
| "intersect", |
| "select", |
| "t2", |
| ".", |
| "dept_store_id", |
| ",", |
| "t2", |
| ".", |
| "store_name", |
| "from", |
| "departments", |
| "as", |
| "t1", |
| "join", |
| "department_stores", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "dept_store_id", |
| "=", |
| "t2", |
| ".", |
| "dept_store_id", |
| "where", |
| "t1", |
| ".", |
| "department_name", |
| "=", |
| "value" |
| ], |
| "question": "「marketing」部門と「managing」部門の両方を持つデパートのIDと名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 10 |
| ], |
| [ |
| "table_unit", |
| 9 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 41, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 36, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 42, |
| false |
| ], |
| null |
| ], |
| "\"marketing\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 10 |
| ], |
| [ |
| "table_unit", |
| 9 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 41, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 34, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 36, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 42, |
| false |
| ], |
| null |
| ], |
| "\"managing\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2", |
| "query_toks": [ |
| "SELECT", |
| "dept_store_chain_id", |
| "FROM", |
| "department_stores", |
| "GROUP", |
| "BY", |
| "dept_store_chain_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "DESC", |
| "LIMIT", |
| "2" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "dept_store_chain_id", |
| "from", |
| "department_stores", |
| "group", |
| "by", |
| "dept_store_chain_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "デパートの数が最も多い2つのデパートチェーンのIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 9 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 35, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 35, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 2, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2", |
| "query_toks": [ |
| "SELECT", |
| "dept_store_chain_id", |
| "FROM", |
| "department_stores", |
| "GROUP", |
| "BY", |
| "dept_store_chain_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "DESC", |
| "LIMIT", |
| "2" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "dept_store_chain_id", |
| "from", |
| "department_stores", |
| "group", |
| "by", |
| "dept_store_chain_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "デパートが最も多い2つのデパートチェーンのIDを返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 9 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 35, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 35, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 2, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "department_id", |
| "FROM", |
| "staff_department_assignments", |
| "GROUP", |
| "BY", |
| "department_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "department_id", |
| "from", |
| "staff_department_assignments", |
| "group", |
| "by", |
| "department_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "limit", |
| "value" |
| ], |
| "question": "スタッフの数が最も少ない部門のIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 53, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 53, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "department_id", |
| "FROM", |
| "staff_department_assignments", |
| "GROUP", |
| "BY", |
| "department_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "department_id", |
| "from", |
| "staff_department_assignments", |
| "group", |
| "by", |
| "department_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "limit", |
| "value" |
| ], |
| "question": "スタッフの割り当てが最も少ない部門のIDを返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 53, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 53, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code", |
| "query_toks": [ |
| "SELECT", |
| "product_type_code", |
| ",", |
| "max", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "min", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| "GROUP", |
| "BY", |
| "product_type_code" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_type_code", |
| ",", |
| "max", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "min", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| "group", |
| "by", |
| "product_type_code" |
| ], |
| "question": "製品タイプごとに、最大価格と最小価格を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code", |
| "query_toks": [ |
| "SELECT", |
| "product_type_code", |
| ",", |
| "max", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "min", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| "GROUP", |
| "BY", |
| "product_type_code" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_type_code", |
| ",", |
| "max", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "min", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| "group", |
| "by", |
| "product_type_code" |
| ], |
| "question": "各製品タイプの最大および最小製品価格はいくらですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)", |
| "query_toks": [ |
| "SELECT", |
| "product_type_code", |
| "FROM", |
| "products", |
| "GROUP", |
| "BY", |
| "product_type_code", |
| "HAVING", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| ">", |
| "(", |
| "SELECT", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_type_code", |
| "from", |
| "products", |
| "group", |
| "by", |
| "product_type_code", |
| "having", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| ">", |
| "(", |
| "select", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| ")" |
| ], |
| "question": "平均価格がすべての製品の平均価格よりも高い製品タイプを見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 5, |
| 21, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price) > (SELECT avg(product_price) FROM products)", |
| "query_toks": [ |
| "SELECT", |
| "product_type_code", |
| "FROM", |
| "products", |
| "GROUP", |
| "BY", |
| "product_type_code", |
| "HAVING", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| ">", |
| "(", |
| "SELECT", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_type_code", |
| "from", |
| "products", |
| "group", |
| "by", |
| "product_type_code", |
| "having", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| ">", |
| "(", |
| "select", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| ")" |
| ], |
| "question": "すべての製品の平均価格よりも平均価格が高い製品タイプのコードは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 5, |
| 21, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_id", |
| ",", |
| "T1.staff_name", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "Staff_Department_Assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "ORDER", |
| "BY", |
| "date_assigned_to", |
| "-", |
| "date_assigned_from", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_id", |
| ",", |
| "t1", |
| ".", |
| "staff_name", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "order", |
| "by", |
| "date_assigned_to", |
| "-", |
| "date_assigned_from", |
| "limit", |
| "value" |
| ], |
| "question": "最短期間で割り当てられたスタッフのIDと名前を見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| [ |
| 0, |
| 54, |
| false |
| ] |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_id , T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_id", |
| ",", |
| "T1.staff_name", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "Staff_Department_Assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "ORDER", |
| "BY", |
| "date_assigned_to", |
| "-", |
| "date_assigned_from", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_id", |
| ",", |
| "t1", |
| ".", |
| "staff_name", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "order", |
| "by", |
| "date_assigned_to", |
| "-", |
| "date_assigned_from", |
| "limit", |
| "value" |
| ], |
| "question": "割り当て時間が最も短いスタッフのIDと名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| [ |
| 0, |
| 54, |
| false |
| ] |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700", |
| "query_toks": [ |
| "SELECT", |
| "product_name", |
| ",", |
| "product_id", |
| "FROM", |
| "products", |
| "WHERE", |
| "product_price", |
| "BETWEEN", |
| "600", |
| "AND", |
| "700" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_name", |
| ",", |
| "product_id", |
| "from", |
| "products", |
| "where", |
| "product_price", |
| "between", |
| "value", |
| "and", |
| "value" |
| ], |
| "question": "価格が600〜700のすべての製品の名前とIDを返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 600.0, |
| 700.0 |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_name , product_id FROM products WHERE product_price BETWEEN 600 AND 700", |
| "query_toks": [ |
| "SELECT", |
| "product_name", |
| ",", |
| "product_id", |
| "FROM", |
| "products", |
| "WHERE", |
| "product_price", |
| "BETWEEN", |
| "600", |
| "AND", |
| "700" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_name", |
| ",", |
| "product_id", |
| "from", |
| "products", |
| "where", |
| "product_price", |
| "between", |
| "value", |
| "and", |
| "value" |
| ], |
| "question": "600から700の価格の製品の名前とIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 600.0, |
| 700.0 |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = \"Cancelled\")", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "customer_id", |
| "FROM", |
| "Customer_Orders", |
| "WHERE", |
| "order_date", |
| ">", |
| "(", |
| "SELECT", |
| "min", |
| "(", |
| "order_date", |
| ")", |
| "FROM", |
| "Customer_Orders", |
| "WHERE", |
| "order_status_code", |
| "=", |
| "``", |
| "Cancelled", |
| "''", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "customer_id", |
| "from", |
| "customer_orders", |
| "where", |
| "order_date", |
| ">", |
| "(", |
| "select", |
| "min", |
| "(", |
| "order_date", |
| ")", |
| "from", |
| "customer_orders", |
| "where", |
| "order_status_code", |
| "=", |
| "value", |
| ")" |
| ], |
| "question": "「Cancelled」いくつかの注文の後に注文したすべての個別の顧客のIDを検索します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Cancelled\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date > (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code = \"Cancelled\")", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "customer_id", |
| "FROM", |
| "Customer_Orders", |
| "WHERE", |
| "order_date", |
| ">", |
| "(", |
| "SELECT", |
| "min", |
| "(", |
| "order_date", |
| ")", |
| "FROM", |
| "Customer_Orders", |
| "WHERE", |
| "order_status_code", |
| "=", |
| "``", |
| "Cancelled", |
| "''", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "customer_id", |
| "from", |
| "customer_orders", |
| "where", |
| "order_date", |
| ">", |
| "(", |
| "select", |
| "min", |
| "(", |
| "order_date", |
| ")", |
| "from", |
| "customer_orders", |
| "where", |
| "order_status_code", |
| "=", |
| "value", |
| ")" |
| ], |
| "question": "「Cancelled」注文の後に注文した顧客の個別のIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Cancelled\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')", |
| "query_toks": [ |
| "SELECT", |
| "staff_id", |
| "FROM", |
| "Staff_Department_Assignments", |
| "WHERE", |
| "date_assigned_to", |
| "<", |
| "(", |
| "SELECT", |
| "max", |
| "(", |
| "date_assigned_to", |
| ")", |
| "FROM", |
| "Staff_Department_Assignments", |
| "WHERE", |
| "job_title_code", |
| "=", |
| "'Clerical", |
| "Staff", |
| "'", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "staff_id", |
| "from", |
| "staff_department_assignments", |
| "where", |
| "date_assigned_to", |
| "<", |
| "(", |
| "select", |
| "max", |
| "(", |
| "date_assigned_to", |
| ")", |
| "from", |
| "staff_department_assignments", |
| "where", |
| "job_title_code", |
| "=", |
| "value", |
| ")" |
| ], |
| "question": "「Clerical Staff」よりも早くスタッフ部門の割り当てを受けたスタッフのIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Clerical Staff\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')", |
| "query_toks": [ |
| "SELECT", |
| "staff_id", |
| "FROM", |
| "Staff_Department_Assignments", |
| "WHERE", |
| "date_assigned_to", |
| "<", |
| "(", |
| "SELECT", |
| "max", |
| "(", |
| "date_assigned_to", |
| ")", |
| "FROM", |
| "Staff_Department_Assignments", |
| "WHERE", |
| "job_title_code", |
| "=", |
| "'Clerical", |
| "Staff", |
| "'", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "staff_id", |
| "from", |
| "staff_department_assignments", |
| "where", |
| "date_assigned_to", |
| "<", |
| "(", |
| "select", |
| "max", |
| "(", |
| "date_assigned_to", |
| ")", |
| "from", |
| "staff_department_assignments", |
| "where", |
| "job_title_code", |
| "=", |
| "value", |
| ")" |
| ], |
| "question": "スタッフ部門の割り当てがどの「Clerical Staff」よりも早いスタッフのIDを返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 56, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Clerical Staff\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE \"%TN%\"", |
| "query_toks": [ |
| "SELECT", |
| "customer_name", |
| ",", |
| "customer_id", |
| "FROM", |
| "customers", |
| "WHERE", |
| "customer_address", |
| "LIKE", |
| "``", |
| "%", |
| "TN", |
| "%", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "customer_name", |
| ",", |
| "customer_id", |
| "from", |
| "customers", |
| "where", |
| "customer_address", |
| "like", |
| "value" |
| ], |
| "question": "住所に「TN」TNが含まれている顧客の名前とIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ], |
| "\"%TN%\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT customer_name , customer_id FROM customers WHERE customer_address LIKE \"%TN%\"", |
| "query_toks": [ |
| "SELECT", |
| "customer_name", |
| ",", |
| "customer_id", |
| "FROM", |
| "customers", |
| "WHERE", |
| "customer_address", |
| "LIKE", |
| "``", |
| "%", |
| "TN", |
| "%", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "customer_name", |
| ",", |
| "customer_id", |
| "from", |
| "customers", |
| "where", |
| "customer_address", |
| "like", |
| "value" |
| ], |
| "question": "アドレスに「TN」が含まれている顧客の名前とIDを返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ], |
| "\"%TN%\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_name", |
| ",", |
| "T1.staff_gender", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "staff_department_assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "WHERE", |
| "T2.date_assigned_from", |
| "LIKE", |
| "``", |
| "2016", |
| "%", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| ",", |
| "t1", |
| ".", |
| "staff_gender", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "where", |
| "t2", |
| ".", |
| "date_assigned_from", |
| "like", |
| "value" |
| ], |
| "question": "「2016」年に割り当てられたスタッフの名前と性別を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 54, |
| false |
| ], |
| null |
| ], |
| "\"2016%\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE \"2016%\"", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_name", |
| ",", |
| "T1.staff_gender", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "staff_department_assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "WHERE", |
| "T2.date_assigned_from", |
| "LIKE", |
| "``", |
| "2016", |
| "%", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| ",", |
| "t1", |
| ".", |
| "staff_gender", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "where", |
| "t2", |
| ".", |
| "date_assigned_from", |
| "like", |
| "value" |
| ], |
| "question": "「2016」年に配属されたスタッフの氏名と性別は?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 54, |
| false |
| ], |
| null |
| ], |
| "\"2016%\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_name", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "staff_department_assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "GROUP", |
| "BY", |
| "T2.staff_id", |
| "HAVING", |
| "COUNT", |
| "(", |
| "*", |
| ")", |
| ">", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "group", |
| "by", |
| "t2", |
| ".", |
| "staff_id", |
| "having", |
| "count", |
| "(", |
| "*", |
| ")", |
| ">", |
| "value" |
| ], |
| "question": "複数の仕事を割り当てられたスタッフの名前をリストします。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 52, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ], |
| 1.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*) > 1", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_name", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "staff_department_assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "GROUP", |
| "BY", |
| "T2.staff_id", |
| "HAVING", |
| "COUNT", |
| "(", |
| "*", |
| ")", |
| ">", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "group", |
| "by", |
| "t2", |
| ".", |
| "staff_id", |
| "having", |
| "count", |
| "(", |
| "*", |
| ")", |
| ">", |
| "value" |
| ], |
| "question": "複数の仕事を割り当てられたスタッフの名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 52, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ], |
| 1.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details", |
| "query_toks": [ |
| "SELECT", |
| "T1.supplier_name", |
| ",", |
| "T1.supplier_phone", |
| "FROM", |
| "Suppliers", |
| "AS", |
| "T1", |
| "JOIN", |
| "supplier_addresses", |
| "AS", |
| "T2", |
| "ON", |
| "T1.supplier_id", |
| "=", |
| "T2.supplier_id", |
| "JOIN", |
| "addresses", |
| "AS", |
| "T3", |
| "ON", |
| "T2.address_id", |
| "=", |
| "T3.address_id", |
| "ORDER", |
| "BY", |
| "T3.address_details" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "supplier_name", |
| ",", |
| "t1", |
| ".", |
| "supplier_phone", |
| "from", |
| "suppliers", |
| "as", |
| "t1", |
| "join", |
| "supplier_addresses", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "supplier_id", |
| "=", |
| "t2", |
| ".", |
| "supplier_id", |
| "join", |
| "addresses", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "address_id", |
| "=", |
| "t3", |
| ".", |
| "address_id", |
| "order", |
| "by", |
| "t3", |
| ".", |
| "address_details" |
| ], |
| "question": "すべてのサプライヤーの名前と電話番号を住所のアルファベット順にリストします。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ], |
| [ |
| "table_unit", |
| 6 |
| ], |
| [ |
| "table_unit", |
| 0 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 6, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 22, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 23, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 1, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 7, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 2, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.supplier_name , T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id = T2.supplier_id JOIN addresses AS T3 ON T2.address_id = T3.address_id ORDER BY T3.address_details", |
| "query_toks": [ |
| "SELECT", |
| "T1.supplier_name", |
| ",", |
| "T1.supplier_phone", |
| "FROM", |
| "Suppliers", |
| "AS", |
| "T1", |
| "JOIN", |
| "supplier_addresses", |
| "AS", |
| "T2", |
| "ON", |
| "T1.supplier_id", |
| "=", |
| "T2.supplier_id", |
| "JOIN", |
| "addresses", |
| "AS", |
| "T3", |
| "ON", |
| "T2.address_id", |
| "=", |
| "T3.address_id", |
| "ORDER", |
| "BY", |
| "T3.address_details" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "supplier_name", |
| ",", |
| "t1", |
| ".", |
| "supplier_phone", |
| "from", |
| "suppliers", |
| "as", |
| "t1", |
| "join", |
| "supplier_addresses", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "supplier_id", |
| "=", |
| "t2", |
| ".", |
| "supplier_id", |
| "join", |
| "addresses", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "address_id", |
| "=", |
| "t3", |
| ".", |
| "address_id", |
| "order", |
| "by", |
| "t3", |
| ".", |
| "address_details" |
| ], |
| "question": "住所のアルファベット順に並べ替えられた、すべてのサプライヤーの名前と電話番号は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ], |
| [ |
| "table_unit", |
| 6 |
| ], |
| [ |
| "table_unit", |
| 0 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 6, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 22, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 23, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 1, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 7, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 2, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers", |
| "query_toks": [ |
| "SELECT", |
| "customer_phone", |
| "FROM", |
| "customers", |
| "UNION", |
| "SELECT", |
| "supplier_phone", |
| "FROM", |
| "suppliers" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "customer_phone", |
| "from", |
| "customers", |
| "union", |
| "select", |
| "supplier_phone", |
| "from", |
| "suppliers" |
| ], |
| "question": "すべての顧客とサプライヤーの電話番号は何ですか。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 16, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers", |
| "query_toks": [ |
| "SELECT", |
| "customer_phone", |
| "FROM", |
| "customers", |
| "UNION", |
| "SELECT", |
| "supplier_phone", |
| "FROM", |
| "suppliers" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "customer_phone", |
| "from", |
| "customers", |
| "union", |
| "select", |
| "supplier_phone", |
| "from", |
| "suppliers" |
| ], |
| "question": "すべての顧客とサプライヤーの電話番号を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 16, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased) > 80000", |
| "query_toks": [ |
| "SELECT", |
| "product_id", |
| "FROM", |
| "Order_Items", |
| "GROUP", |
| "BY", |
| "product_id", |
| "HAVING", |
| "count", |
| "(", |
| "*", |
| ")", |
| ">", |
| "3", |
| "UNION", |
| "SELECT", |
| "product_id", |
| "FROM", |
| "Product_Suppliers", |
| "GROUP", |
| "BY", |
| "product_id", |
| "HAVING", |
| "sum", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ">", |
| "80000" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_id", |
| "from", |
| "order_items", |
| "group", |
| "by", |
| "product_id", |
| "having", |
| "count", |
| "(", |
| "*", |
| ")", |
| ">", |
| "value", |
| "union", |
| "select", |
| "product_id", |
| "from", |
| "product_suppliers", |
| "group", |
| "by", |
| "product_id", |
| "having", |
| "sum", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ">", |
| "value" |
| ], |
| "question": "3回以上注文された、または80000回以上供給されたすべての製品のIDを返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 11 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 45, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 46, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 4, |
| 50, |
| false |
| ], |
| null |
| ], |
| 80000.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*) > 3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased) > 80000", |
| "query_toks": [ |
| "SELECT", |
| "product_id", |
| "FROM", |
| "Order_Items", |
| "GROUP", |
| "BY", |
| "product_id", |
| "HAVING", |
| "count", |
| "(", |
| "*", |
| ")", |
| ">", |
| "3", |
| "UNION", |
| "SELECT", |
| "product_id", |
| "FROM", |
| "Product_Suppliers", |
| "GROUP", |
| "BY", |
| "product_id", |
| "HAVING", |
| "sum", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ">", |
| "80000" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_id", |
| "from", |
| "order_items", |
| "group", |
| "by", |
| "product_id", |
| "having", |
| "count", |
| "(", |
| "*", |
| ")", |
| ">", |
| "value", |
| "union", |
| "select", |
| "product_id", |
| "from", |
| "product_suppliers", |
| "group", |
| "by", |
| "product_id", |
| "having", |
| "sum", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ">", |
| "value" |
| ], |
| "question": "3回以上注文された、または累積購入額が80000を超えるすべての製品のIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 11 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 45, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 46, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 4, |
| 50, |
| false |
| ], |
| null |
| ], |
| 80000.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900", |
| "query_toks": [ |
| "SELECT", |
| "product_id", |
| ",", |
| "product_name", |
| "FROM", |
| "products", |
| "WHERE", |
| "product_price", |
| "<", |
| "600", |
| "OR", |
| "product_price", |
| ">", |
| "900" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_id", |
| ",", |
| "product_name", |
| "from", |
| "products", |
| "where", |
| "product_price", |
| "<", |
| "value", |
| "or", |
| "product_price", |
| ">", |
| "value" |
| ], |
| "question": "価格が600未満または900を超える製品のIDと名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 600.0, |
| null |
| ], |
| "or", |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 900.0, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_id , product_name FROM products WHERE product_price < 600 OR product_price > 900", |
| "query_toks": [ |
| "SELECT", |
| "product_id", |
| ",", |
| "product_name", |
| "FROM", |
| "products", |
| "WHERE", |
| "product_price", |
| "<", |
| "600", |
| "OR", |
| "product_price", |
| ">", |
| "900" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_id", |
| ",", |
| "product_name", |
| "from", |
| "products", |
| "where", |
| "product_price", |
| "<", |
| "value", |
| "or", |
| "product_price", |
| ">", |
| "value" |
| ], |
| "question": "価格が600未満または900を超える製品のIDと名前を入力してください。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 600.0, |
| null |
| ], |
| "or", |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ], |
| 900.0, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000", |
| "query_toks": [ |
| "SELECT", |
| "supplier_id", |
| "FROM", |
| "Product_Suppliers", |
| "GROUP", |
| "BY", |
| "supplier_id", |
| "HAVING", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ">", |
| "50000", |
| "OR", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| "<", |
| "30000" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "supplier_id", |
| "from", |
| "product_suppliers", |
| "group", |
| "by", |
| "supplier_id", |
| "having", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ">", |
| "value", |
| "or", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| "<", |
| "value" |
| ], |
| "question": "各製品の平均購入額が50000を超えるまたは30000未満のサプライヤーのIDを見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 47, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 5, |
| 50, |
| false |
| ], |
| null |
| ], |
| 50000.0, |
| null |
| ], |
| "or", |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 5, |
| 50, |
| false |
| ], |
| null |
| ], |
| 30000.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased) > 50000 OR avg(total_amount_purchased) < 30000", |
| "query_toks": [ |
| "SELECT", |
| "supplier_id", |
| "FROM", |
| "Product_Suppliers", |
| "GROUP", |
| "BY", |
| "supplier_id", |
| "HAVING", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ">", |
| "50000", |
| "OR", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| "<", |
| "30000" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "supplier_id", |
| "from", |
| "product_suppliers", |
| "group", |
| "by", |
| "supplier_id", |
| "having", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ">", |
| "value", |
| "or", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| "<", |
| "value" |
| ], |
| "question": "平均購入額が50000以上または30000未満のサプライヤーのIDは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 47, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 3, |
| [ |
| 0, |
| [ |
| 5, |
| 50, |
| false |
| ], |
| null |
| ], |
| 50000.0, |
| null |
| ], |
| "or", |
| [ |
| false, |
| 4, |
| [ |
| 0, |
| [ |
| 5, |
| 50, |
| false |
| ], |
| null |
| ], |
| 30000.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT avg(total_amount_purchased) , avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)", |
| "query_toks": [ |
| "SELECT", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ",", |
| "avg", |
| "(", |
| "total_value_purchased", |
| ")", |
| "FROM", |
| "Product_Suppliers", |
| "WHERE", |
| "supplier_id", |
| "=", |
| "(", |
| "SELECT", |
| "supplier_id", |
| "FROM", |
| "Product_Suppliers", |
| "GROUP", |
| "BY", |
| "supplier_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "DESC", |
| "LIMIT", |
| "1", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ",", |
| "avg", |
| "(", |
| "total_value_purchased", |
| ")", |
| "from", |
| "product_suppliers", |
| "where", |
| "supplier_id", |
| "=", |
| "(", |
| "select", |
| "supplier_id", |
| "from", |
| "product_suppliers", |
| "group", |
| "by", |
| "supplier_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "desc", |
| "limit", |
| "value", |
| ")" |
| ], |
| "question": "最も多くの製品を供給しているサプライヤーの平均購入額と購入額はいくらですか。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 50, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 51, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 47, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT avg(total_amount_purchased) , avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id = (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)", |
| "query_toks": [ |
| "SELECT", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ",", |
| "avg", |
| "(", |
| "total_value_purchased", |
| ")", |
| "FROM", |
| "Product_Suppliers", |
| "WHERE", |
| "supplier_id", |
| "=", |
| "(", |
| "SELECT", |
| "supplier_id", |
| "FROM", |
| "Product_Suppliers", |
| "GROUP", |
| "BY", |
| "supplier_id", |
| "ORDER", |
| "BY", |
| "count", |
| "(", |
| "*", |
| ")", |
| "DESC", |
| "LIMIT", |
| "1", |
| ")" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "avg", |
| "(", |
| "total_amount_purchased", |
| ")", |
| ",", |
| "avg", |
| "(", |
| "total_value_purchased", |
| ")", |
| "from", |
| "product_suppliers", |
| "where", |
| "supplier_id", |
| "=", |
| "(", |
| "select", |
| "supplier_id", |
| "from", |
| "product_suppliers", |
| "group", |
| "by", |
| "supplier_id", |
| "order", |
| "by", |
| "count", |
| "(", |
| "*", |
| ")", |
| "desc", |
| "limit", |
| "value", |
| ")" |
| ], |
| "question": "最も多くの製品を供給しているサプライヤーの平均合計購入額と合計購入額を返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 50, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 51, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 12 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 47, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 3, |
| 0, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| }, |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT max(customer_code) , min(customer_code) FROM Customers", |
| "query_toks": [ |
| "SELECT", |
| "max", |
| "(", |
| "customer_code", |
| ")", |
| ",", |
| "min", |
| "(", |
| "customer_code", |
| ")", |
| "FROM", |
| "Customers" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "max", |
| "(", |
| "customer_code", |
| ")", |
| ",", |
| "min", |
| "(", |
| "customer_code", |
| ")", |
| "from", |
| "customers" |
| ], |
| "question": "最大および最小の顧客コードは何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 13, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 13, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT max(customer_code) , min(customer_code) FROM Customers", |
| "query_toks": [ |
| "SELECT", |
| "max", |
| "(", |
| "customer_code", |
| ")", |
| ",", |
| "min", |
| "(", |
| "customer_code", |
| ")", |
| "FROM", |
| "Customers" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "max", |
| "(", |
| "customer_code", |
| ")", |
| ",", |
| "min", |
| "(", |
| "customer_code", |
| ")", |
| "from", |
| "customers" |
| ], |
| "question": "最大および最小の顧客コードを返します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 13, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 13, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.customer_name", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "JOIN", |
| "order_items", |
| "AS", |
| "T3", |
| "ON", |
| "T2.order_id", |
| "=", |
| "T3.order_id", |
| "JOIN", |
| "products", |
| "AS", |
| "T4", |
| "ON", |
| "T3.product_id", |
| "=", |
| "T4.product_id", |
| "WHERE", |
| "T4.product_name", |
| "=", |
| "``", |
| "keyboard", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "customer_name", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "join", |
| "order_items", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "order_id", |
| "=", |
| "t3", |
| ".", |
| "order_id", |
| "join", |
| "products", |
| "as", |
| "t4", |
| "on", |
| "t3", |
| ".", |
| "product_id", |
| "=", |
| "t4", |
| ".", |
| "product_id", |
| "where", |
| "t4", |
| ".", |
| "product_name", |
| "=", |
| "value" |
| ], |
| "question": "「keyboard」を購入したすべての個別の顧客の名前をリストします。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ], |
| "\"keyboard\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id JOIN products AS T4 ON T3.product_id = T4.product_id WHERE T4.product_name = \"keyboard\"", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.customer_name", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "JOIN", |
| "order_items", |
| "AS", |
| "T3", |
| "ON", |
| "T2.order_id", |
| "=", |
| "T3.order_id", |
| "JOIN", |
| "products", |
| "AS", |
| "T4", |
| "ON", |
| "T3.product_id", |
| "=", |
| "T4.product_id", |
| "WHERE", |
| "T4.product_name", |
| "=", |
| "``", |
| "keyboard", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "customer_name", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "join", |
| "order_items", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "order_id", |
| "=", |
| "t3", |
| ".", |
| "order_id", |
| "join", |
| "products", |
| "as", |
| "t4", |
| "on", |
| "t3", |
| ".", |
| "product_id", |
| "=", |
| "t4", |
| ".", |
| "product_id", |
| "where", |
| "t4", |
| ".", |
| "product_name", |
| "=", |
| "value" |
| ], |
| "question": "「keyboard」を購入した顧客の名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ], |
| "\"keyboard\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = \"red jeans\"", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.supplier_name", |
| ",", |
| "T1.supplier_phone", |
| "FROM", |
| "suppliers", |
| "AS", |
| "T1", |
| "JOIN", |
| "product_suppliers", |
| "AS", |
| "T2", |
| "ON", |
| "T1.supplier_id", |
| "=", |
| "T2.supplier_id", |
| "JOIN", |
| "products", |
| "AS", |
| "T3", |
| "ON", |
| "T2.product_id", |
| "=", |
| "T3.product_id", |
| "WHERE", |
| "T3.product_name", |
| "=", |
| "``", |
| "red", |
| "jeans", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "supplier_name", |
| ",", |
| "t1", |
| ".", |
| "supplier_phone", |
| "from", |
| "suppliers", |
| "as", |
| "t1", |
| "join", |
| "product_suppliers", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "supplier_id", |
| "=", |
| "t2", |
| ".", |
| "supplier_id", |
| "join", |
| "products", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "product_id", |
| "=", |
| "t3", |
| ".", |
| "product_id", |
| "where", |
| "t3", |
| ".", |
| "product_name", |
| "=", |
| "value" |
| ], |
| "question": "「red jeans」を供給するすべての個別のサプライヤーの名前と電話番号をリストします。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ], |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 6, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 7, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ], |
| "\"red jeans\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T1.supplier_name , T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = \"red jeans\"", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.supplier_name", |
| ",", |
| "T1.supplier_phone", |
| "FROM", |
| "suppliers", |
| "AS", |
| "T1", |
| "JOIN", |
| "product_suppliers", |
| "AS", |
| "T2", |
| "ON", |
| "T1.supplier_id", |
| "=", |
| "T2.supplier_id", |
| "JOIN", |
| "products", |
| "AS", |
| "T3", |
| "ON", |
| "T2.product_id", |
| "=", |
| "T3.product_id", |
| "WHERE", |
| "T3.product_name", |
| "=", |
| "``", |
| "red", |
| "jeans", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "supplier_name", |
| ",", |
| "t1", |
| ".", |
| "supplier_phone", |
| "from", |
| "suppliers", |
| "as", |
| "t1", |
| "join", |
| "product_suppliers", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "supplier_id", |
| "=", |
| "t2", |
| ".", |
| "supplier_id", |
| "join", |
| "products", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "product_id", |
| "=", |
| "t3", |
| ".", |
| "product_id", |
| "where", |
| "t3", |
| ".", |
| "product_name", |
| "=", |
| "value" |
| ], |
| "question": "「red jeans」をお持ちのサプライヤーの名前と電話番号は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 2 |
| ], |
| [ |
| "table_unit", |
| 12 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 6, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 47, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 46, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 7, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 8, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ], |
| "\"red jeans\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code", |
| "query_toks": [ |
| "SELECT", |
| "max", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "min", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "product_type_code", |
| "FROM", |
| "products", |
| "GROUP", |
| "BY", |
| "product_type_code", |
| "ORDER", |
| "BY", |
| "product_type_code" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "max", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "min", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "product_type_code", |
| "from", |
| "products", |
| "group", |
| "by", |
| "product_type_code", |
| "order", |
| "by", |
| "product_type_code" |
| ], |
| "question": "製品タイプごとにグループ化され、アルファベット順に並べられた、製品の最高価格と最低価格はどれくらいですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT max(product_price) , min(product_price) , product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code", |
| "query_toks": [ |
| "SELECT", |
| "max", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "min", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "product_type_code", |
| "FROM", |
| "products", |
| "GROUP", |
| "BY", |
| "product_type_code", |
| "ORDER", |
| "BY", |
| "product_type_code" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "max", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "min", |
| "(", |
| "product_price", |
| ")", |
| ",", |
| "product_type_code", |
| "from", |
| "products", |
| "group", |
| "by", |
| "product_type_code", |
| "order", |
| "by", |
| "product_type_code" |
| ], |
| "question": "各製品タイプの最大および最小製品価格を、製品タイプごとにグループ化して注文します。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 1, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 19, |
| false |
| ] |
| ], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = \"Cancelled\" ORDER BY order_date", |
| "query_toks": [ |
| "SELECT", |
| "order_id", |
| ",", |
| "customer_id", |
| "FROM", |
| "customer_orders", |
| "WHERE", |
| "order_status_code", |
| "=", |
| "``", |
| "Cancelled", |
| "''", |
| "ORDER", |
| "BY", |
| "order_date" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "order_id", |
| ",", |
| "customer_id", |
| "from", |
| "customer_orders", |
| "where", |
| "order_status_code", |
| "=", |
| "value", |
| "order", |
| "by", |
| "order_date" |
| ], |
| "question": "注文ID、「Cancelled」ステータスの注文の顧客IDを、注文日順にリストします。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Cancelled\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT order_id , customer_id FROM customer_orders WHERE order_status_code = \"Cancelled\" ORDER BY order_date", |
| "query_toks": [ |
| "SELECT", |
| "order_id", |
| ",", |
| "customer_id", |
| "FROM", |
| "customer_orders", |
| "WHERE", |
| "order_status_code", |
| "=", |
| "``", |
| "Cancelled", |
| "''", |
| "ORDER", |
| "BY", |
| "order_date" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "order_id", |
| ",", |
| "customer_id", |
| "from", |
| "customer_orders", |
| "where", |
| "order_status_code", |
| "=", |
| "value", |
| "order", |
| "by", |
| "order_date" |
| ], |
| "question": "「Cancelled」注文の注文IDと顧客IDは、注文日で並べ替えられていますか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 32, |
| false |
| ], |
| null |
| ], |
| "\"Cancelled\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "asc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 33, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 2", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T3.product_name", |
| "FROM", |
| "customer_orders", |
| "AS", |
| "T1", |
| "JOIN", |
| "order_items", |
| "AS", |
| "T2", |
| "ON", |
| "T1.order_id", |
| "=", |
| "T2.order_id", |
| "JOIN", |
| "products", |
| "AS", |
| "T3", |
| "ON", |
| "T2.product_id", |
| "=", |
| "T3.product_id", |
| "GROUP", |
| "BY", |
| "T3.product_id", |
| "HAVING", |
| "COUNT", |
| "(", |
| "DISTINCT", |
| "T1.customer_id", |
| ")", |
| ">", |
| "=", |
| "2" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t3", |
| ".", |
| "product_name", |
| "from", |
| "customer_orders", |
| "as", |
| "t1", |
| "join", |
| "order_items", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "order_id", |
| "=", |
| "t2", |
| ".", |
| "order_id", |
| "join", |
| "products", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "product_id", |
| "=", |
| "t3", |
| ".", |
| "product_id", |
| "group", |
| "by", |
| "t3", |
| ".", |
| "product_id", |
| "having", |
| "count", |
| "(", |
| "distinct", |
| "t1", |
| ".", |
| "customer_id", |
| ")", |
| ">", |
| "=", |
| "value" |
| ], |
| "question": "少なくとも2人の異なる顧客が購入した製品の名前を見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 18, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 5, |
| [ |
| 0, |
| [ |
| 3, |
| 31, |
| true |
| ], |
| null |
| ], |
| 2.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id JOIN products AS T3 ON T2.product_id = T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id) >= 2", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T3.product_name", |
| "FROM", |
| "customer_orders", |
| "AS", |
| "T1", |
| "JOIN", |
| "order_items", |
| "AS", |
| "T2", |
| "ON", |
| "T1.order_id", |
| "=", |
| "T2.order_id", |
| "JOIN", |
| "products", |
| "AS", |
| "T3", |
| "ON", |
| "T2.product_id", |
| "=", |
| "T3.product_id", |
| "GROUP", |
| "BY", |
| "T3.product_id", |
| "HAVING", |
| "COUNT", |
| "(", |
| "DISTINCT", |
| "T1.customer_id", |
| ")", |
| ">", |
| "=", |
| "2" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t3", |
| ".", |
| "product_name", |
| "from", |
| "customer_orders", |
| "as", |
| "t1", |
| "join", |
| "order_items", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "order_id", |
| "=", |
| "t2", |
| ".", |
| "order_id", |
| "join", |
| "products", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "product_id", |
| "=", |
| "t3", |
| ".", |
| "product_id", |
| "group", |
| "by", |
| "t3", |
| ".", |
| "product_id", |
| "having", |
| "count", |
| "(", |
| "distinct", |
| "t1", |
| ".", |
| "customer_id", |
| ")", |
| ">", |
| "=", |
| "value" |
| ], |
| "question": "少なくとも2人の異なる顧客が購入した製品の明確な名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ], |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 45, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 18, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 18, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 5, |
| [ |
| 0, |
| [ |
| 3, |
| 31, |
| true |
| ], |
| null |
| ], |
| 2.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.customer_name", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "JOIN", |
| "order_items", |
| "AS", |
| "T3", |
| "ON", |
| "T2.order_id", |
| "=", |
| "T3.order_id", |
| "GROUP", |
| "BY", |
| "T1.customer_id", |
| "HAVING", |
| "COUNT", |
| "(", |
| "DISTINCT", |
| "T3.product_id", |
| ")", |
| ">", |
| "=", |
| "3" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "customer_name", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "join", |
| "order_items", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "order_id", |
| "=", |
| "t3", |
| ".", |
| "order_id", |
| "group", |
| "by", |
| "t1", |
| ".", |
| "customer_id", |
| "having", |
| "count", |
| "(", |
| "distinct", |
| "t3", |
| ".", |
| "product_id", |
| ")", |
| ">", |
| "=", |
| "value" |
| ], |
| "question": "少なくとも3つの異なる製品で購入した顧客の名前を見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 11, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 5, |
| [ |
| 0, |
| [ |
| 3, |
| 45, |
| true |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id JOIN order_items AS T3 ON T2.order_id = T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id) >= 3", |
| "query_toks": [ |
| "SELECT", |
| "DISTINCT", |
| "T1.customer_name", |
| "FROM", |
| "customers", |
| "AS", |
| "T1", |
| "JOIN", |
| "customer_orders", |
| "AS", |
| "T2", |
| "ON", |
| "T1.customer_id", |
| "=", |
| "T2.customer_id", |
| "JOIN", |
| "order_items", |
| "AS", |
| "T3", |
| "ON", |
| "T2.order_id", |
| "=", |
| "T3.order_id", |
| "GROUP", |
| "BY", |
| "T1.customer_id", |
| "HAVING", |
| "COUNT", |
| "(", |
| "DISTINCT", |
| "T3.product_id", |
| ")", |
| ">", |
| "=", |
| "3" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "distinct", |
| "t1", |
| ".", |
| "customer_name", |
| "from", |
| "customers", |
| "as", |
| "t1", |
| "join", |
| "customer_orders", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "customer_id", |
| "=", |
| "t2", |
| ".", |
| "customer_id", |
| "join", |
| "order_items", |
| "as", |
| "t3", |
| "on", |
| "t2", |
| ".", |
| "order_id", |
| "=", |
| "t3", |
| ".", |
| "order_id", |
| "group", |
| "by", |
| "t1", |
| ".", |
| "customer_id", |
| "having", |
| "count", |
| "(", |
| "distinct", |
| "t3", |
| ".", |
| "product_id", |
| ")", |
| ">", |
| "=", |
| "value" |
| ], |
| "question": "少なくとも3つの異なる製品を購入した顧客の明確な名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ], |
| [ |
| "table_unit", |
| 8 |
| ], |
| [ |
| "table_unit", |
| 11 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 31, |
| false |
| ], |
| null |
| ], |
| "and", |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 30, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 44, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| true, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [], |
| "groupBy": [ |
| [ |
| 0, |
| 11, |
| false |
| ] |
| ], |
| "having": [ |
| [ |
| false, |
| 5, |
| [ |
| 0, |
| [ |
| 3, |
| 45, |
| true |
| ], |
| null |
| ], |
| 3.0, |
| null |
| ] |
| ], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Sales Person\" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Clerical Staff\"", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_name", |
| ",", |
| "T1.staff_gender", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "Staff_Department_Assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "WHERE", |
| "T2.job_title_code", |
| "=", |
| "``", |
| "Sales", |
| "Person", |
| "''", |
| "EXCEPT", |
| "SELECT", |
| "T1.staff_name", |
| ",", |
| "T1.staff_gender", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "Staff_Department_Assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "WHERE", |
| "T2.job_title_code", |
| "=", |
| "``", |
| "Clerical", |
| "Staff", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| ",", |
| "t1", |
| ".", |
| "staff_gender", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "where", |
| "t2", |
| ".", |
| "job_title_code", |
| "=", |
| "value", |
| "except", |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| ",", |
| "t1", |
| ".", |
| "staff_gender", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "where", |
| "t2", |
| ".", |
| "job_title_code", |
| "=", |
| "value" |
| ], |
| "question": "「Sales」の仕事を割り当てられているが、「Clerical Staff」は割り当てられていないスタッフの名前と性別を見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Sales Person\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Clerical Staff\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Sales Person\" EXCEPT SELECT T1.staff_name , T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = \"Clerical Staff\"", |
| "query_toks": [ |
| "SELECT", |
| "T1.staff_name", |
| ",", |
| "T1.staff_gender", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "Staff_Department_Assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "WHERE", |
| "T2.job_title_code", |
| "=", |
| "``", |
| "Sales", |
| "Person", |
| "''", |
| "EXCEPT", |
| "SELECT", |
| "T1.staff_name", |
| ",", |
| "T1.staff_gender", |
| "FROM", |
| "staff", |
| "AS", |
| "T1", |
| "JOIN", |
| "Staff_Department_Assignments", |
| "AS", |
| "T2", |
| "ON", |
| "T1.staff_id", |
| "=", |
| "T2.staff_id", |
| "WHERE", |
| "T2.job_title_code", |
| "=", |
| "``", |
| "Clerical", |
| "Staff", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| ",", |
| "t1", |
| ".", |
| "staff_gender", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "where", |
| "t2", |
| ".", |
| "job_title_code", |
| "=", |
| "value", |
| "except", |
| "select", |
| "t1", |
| ".", |
| "staff_name", |
| ",", |
| "t1", |
| ".", |
| "staff_gender", |
| "from", |
| "staff", |
| "as", |
| "t1", |
| "join", |
| "staff_department_assignments", |
| "as", |
| "t2", |
| "on", |
| "t1", |
| ".", |
| "staff_id", |
| "=", |
| "t2", |
| ".", |
| "staff_id", |
| "where", |
| "t2", |
| ".", |
| "job_title_code", |
| "=", |
| "value" |
| ], |
| "question": "「Sales」という肩書きを持っているが、「Clerical Staff」ではないスタッフの名前と性別は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Sales Person\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 1 |
| ], |
| [ |
| "table_unit", |
| 13 |
| ] |
| ], |
| "conds": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 3, |
| false |
| ], |
| null |
| ], |
| [ |
| 0, |
| 52, |
| false |
| ], |
| null |
| ] |
| ] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 5, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 4, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 55, |
| false |
| ], |
| null |
| ], |
| "\"Clerical Staff\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE \"%WY%\" AND payment_method_code != \"Credit Card\"", |
| "query_toks": [ |
| "SELECT", |
| "customer_id", |
| ",", |
| "customer_name", |
| "FROM", |
| "customers", |
| "WHERE", |
| "customer_address", |
| "LIKE", |
| "``", |
| "%", |
| "WY", |
| "%", |
| "''", |
| "AND", |
| "payment_method_code", |
| "!", |
| "=", |
| "``", |
| "Credit", |
| "Card", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "customer_id", |
| ",", |
| "customer_name", |
| "from", |
| "customers", |
| "where", |
| "customer_address", |
| "like", |
| "value", |
| "and", |
| "payment_method_code", |
| "!", |
| "=", |
| "value" |
| ], |
| "question": "住所に「WY」州が含まれ、支払いに「Credit Card」を使用しない顧客のIDと名前を見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ], |
| "\"%WY%\"", |
| null |
| ], |
| "and", |
| [ |
| false, |
| 7, |
| [ |
| 0, |
| [ |
| 0, |
| 12, |
| false |
| ], |
| null |
| ], |
| "\"Credit Card\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE \"%WY%\" AND payment_method_code != \"Credit Card\"", |
| "query_toks": [ |
| "SELECT", |
| "customer_id", |
| ",", |
| "customer_name", |
| "FROM", |
| "customers", |
| "WHERE", |
| "customer_address", |
| "LIKE", |
| "``", |
| "%", |
| "WY", |
| "%", |
| "''", |
| "AND", |
| "payment_method_code", |
| "!", |
| "=", |
| "``", |
| "Credit", |
| "Card", |
| "''" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "customer_id", |
| ",", |
| "customer_name", |
| "from", |
| "customers", |
| "where", |
| "customer_address", |
| "like", |
| "value", |
| "and", |
| "payment_method_code", |
| "!", |
| "=", |
| "value" |
| ], |
| "question": "「WY」を含み、支払いに「Credit Card」を使用しない、アドレス指定された顧客のIDと名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 4 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 11, |
| false |
| ], |
| null |
| ] |
| ], |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 14, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 9, |
| [ |
| 0, |
| [ |
| 0, |
| 15, |
| false |
| ], |
| null |
| ], |
| "\"%WY%\"", |
| null |
| ], |
| "and", |
| [ |
| false, |
| 7, |
| [ |
| 0, |
| [ |
| 0, |
| 12, |
| false |
| ], |
| null |
| ], |
| "\"Credit Card\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'", |
| "query_toks": [ |
| "SELECT", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| "WHERE", |
| "product_type_code", |
| "=", |
| "'Clothes", |
| "'" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| "where", |
| "product_type_code", |
| "=", |
| "value" |
| ], |
| "question": "すべての製品の「clothes」の平均価格を見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ], |
| "\"Clothes\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT avg(product_price) FROM products WHERE product_type_code = 'Clothes'", |
| "query_toks": [ |
| "SELECT", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "FROM", |
| "products", |
| "WHERE", |
| "product_type_code", |
| "=", |
| "'Clothes", |
| "'" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "avg", |
| "(", |
| "product_price", |
| ")", |
| "from", |
| "products", |
| "where", |
| "product_type_code", |
| "=", |
| "value" |
| ], |
| "question": "「clothes」の平均価格はいくらですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 5, |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ], |
| "\"Clothes\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [], |
| "limit": null, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "product_name", |
| "FROM", |
| "products", |
| "WHERE", |
| "product_type_code", |
| "=", |
| "'Hardware", |
| "'", |
| "ORDER", |
| "BY", |
| "product_price", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_name", |
| "from", |
| "products", |
| "where", |
| "product_type_code", |
| "=", |
| "value", |
| "order", |
| "by", |
| "product_price", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "最も高価な「hardware」製品の名前を見つけます。", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ], |
| "\"Hardware\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| }, |
| { |
| "db_id": "department_store", |
| "query": "SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1", |
| "query_toks": [ |
| "SELECT", |
| "product_name", |
| "FROM", |
| "products", |
| "WHERE", |
| "product_type_code", |
| "=", |
| "'Hardware", |
| "'", |
| "ORDER", |
| "BY", |
| "product_price", |
| "DESC", |
| "LIMIT", |
| "1" |
| ], |
| "query_toks_no_value": [ |
| "select", |
| "product_name", |
| "from", |
| "products", |
| "where", |
| "product_type_code", |
| "=", |
| "value", |
| "order", |
| "by", |
| "product_price", |
| "desc", |
| "limit", |
| "value" |
| ], |
| "question": "価格が最も高い「hardware」製品の名前は何ですか?", |
| "sql": { |
| "from": { |
| "table_units": [ |
| [ |
| "table_unit", |
| 5 |
| ] |
| ], |
| "conds": [] |
| }, |
| "select": [ |
| false, |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| [ |
| 0, |
| 20, |
| false |
| ], |
| null |
| ] |
| ] |
| ] |
| ], |
| "where": [ |
| [ |
| false, |
| 2, |
| [ |
| 0, |
| [ |
| 0, |
| 19, |
| false |
| ], |
| null |
| ], |
| "\"Hardware\"", |
| null |
| ] |
| ], |
| "groupBy": [], |
| "having": [], |
| "orderBy": [ |
| "desc", |
| [ |
| [ |
| 0, |
| [ |
| 0, |
| 21, |
| false |
| ], |
| null |
| ] |
| ] |
| ], |
| "limit": 1, |
| "intersect": null, |
| "union": null, |
| "except": null |
| } |
| } |
| ] |