| [ | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(*) FROM customers", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "customers" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "customers" | |
| ], | |
| "question": "何人の顧客がいますか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(*) FROM customers", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "customers" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "customers" | |
| ], | |
| "question": "顧客の数を数えます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number", | |
| "query_toks": [ | |
| "SELECT", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "ORDER", | |
| "BY", | |
| "email_address", | |
| ",", | |
| "phone_number" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "order", | |
| "by", | |
| "email_address", | |
| ",", | |
| "phone_number" | |
| ], | |
| "question": "すべての顧客の電子メールと電話番号を、電子メールアドレスと電話番号の順に検索します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT email_address , phone_number FROM customers ORDER BY email_address , phone_number", | |
| "query_toks": [ | |
| "SELECT", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "ORDER", | |
| "BY", | |
| "email_address", | |
| ",", | |
| "phone_number" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "order", | |
| "by", | |
| "email_address", | |
| ",", | |
| "phone_number" | |
| ], | |
| "question": "電子メールアドレスと電話番号でソートされた、すべての顧客の電子メールと電話番号は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT town_city FROM customers WHERE customer_type_code = \"Good Credit Rating\" GROUP BY town_city ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "town_city", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "customer_type_code", | |
| "=", | |
| "``", | |
| "Good", | |
| "Credit", | |
| "Rating", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "town_city", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "town_city", | |
| "from", | |
| "customers", | |
| "where", | |
| "customer_type_code", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "town_city", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "タイプコードが「GoodCreditRating」の顧客数が最も少ない都市はどれですか。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Good Credit Rating\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT town_city FROM customers WHERE customer_type_code = \"Good Credit Rating\" GROUP BY town_city ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "town_city", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "customer_type_code", | |
| "=", | |
| "``", | |
| "Good", | |
| "Credit", | |
| "Rating", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "town_city", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "town_city", | |
| "from", | |
| "customers", | |
| "where", | |
| "customer_type_code", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "town_city", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "顧客数が最も少ない顧客タイプコード「GoodCreditRating」で都市を返します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Good Credit Rating\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 11, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.product_name , count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.product_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "products", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.product_id", | |
| "=", | |
| "t2.product_id", | |
| "GROUP", | |
| "BY", | |
| "t1.product_name" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "product_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "products", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "product_name" | |
| ], | |
| "question": "すべての製品の名前と、受け取った苦情の数をリストします。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.product_name , count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.product_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "products", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.product_id", | |
| "=", | |
| "t2.product_id", | |
| "GROUP", | |
| "BY", | |
| "t1.product_name" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "product_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "products", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "product_name" | |
| ], | |
| "question": "すべての異なる製品名は何ですか、そしてそれぞれが受け取った苦情の数は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.email_address", | |
| "FROM", | |
| "customers", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.customer_id", | |
| "=", | |
| "t2.customer_id", | |
| "GROUP", | |
| "BY", | |
| "t1.customer_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "email_address", | |
| "from", | |
| "customers", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "customer_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "製品の苦情を最も多く苦情を申し立てた顧客の電子メールを見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.email_address", | |
| "FROM", | |
| "customers", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.customer_id", | |
| "=", | |
| "t2.customer_id", | |
| "GROUP", | |
| "BY", | |
| "t1.customer_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "email_address", | |
| "from", | |
| "customers", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "customer_id", | |
| "group", | |
| "by", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "苦情件数が最も多い商品について苦情を申し立てたお客様のメールは何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "t1.product_name", | |
| "FROM", | |
| "products", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.product_id", | |
| "=", | |
| "t2.product_id", | |
| "JOIN", | |
| "customers", | |
| "AS", | |
| "t3", | |
| "GROUP", | |
| "BY", | |
| "t3.customer_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "product_name", | |
| "from", | |
| "products", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "join", | |
| "customers", | |
| "as", | |
| "t3", | |
| "group", | |
| "by", | |
| "t3", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "苦情の申し立てが最も少ない顧客から苦情を受けた製品はどれですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "DISTINCT", | |
| "t1.product_name", | |
| "FROM", | |
| "products", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.product_id", | |
| "=", | |
| "t2.product_id", | |
| "JOIN", | |
| "customers", | |
| "AS", | |
| "t3", | |
| "GROUP", | |
| "BY", | |
| "t3.customer_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "distinct", | |
| "t1", | |
| ".", | |
| "product_name", | |
| "from", | |
| "products", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "join", | |
| "customers", | |
| "as", | |
| "t3", | |
| "group", | |
| "by", | |
| "t3", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "苦情が最も少ない顧客から苦情があった製品の名前を返します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| true, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.phone_number", | |
| "FROM", | |
| "customers", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.customer_id", | |
| "=", | |
| "t2.customer_id", | |
| "ORDER", | |
| "BY", | |
| "t2.date_complaint_raised", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "date_complaint_raised", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最近苦情を申し立てた顧客の電話番号は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id = t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.phone_number", | |
| "FROM", | |
| "customers", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.customer_id", | |
| "=", | |
| "t2.customer_id", | |
| "ORDER", | |
| "BY", | |
| "t2.date_complaint_raised", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "customer_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "customer_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "date_complaint_raised", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最近提起された苦情を提出した顧客の電話番号を返します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT email_address , phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)", | |
| "query_toks": [ | |
| "SELECT", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "customer_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "customer_id", | |
| "FROM", | |
| "complaints", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "where", | |
| "customer_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "customer_id", | |
| "from", | |
| "complaints", | |
| ")" | |
| ], | |
| "question": "これまでに苦情を申し立てたことがない顧客の電子メールと電話番号を見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 25, | |
| 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": "customer_complaints", | |
| "query": "SELECT email_address , phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)", | |
| "query_toks": [ | |
| "SELECT", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "customer_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "customer_id", | |
| "FROM", | |
| "complaints", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "email_address", | |
| ",", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "where", | |
| "customer_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "customer_id", | |
| "from", | |
| "complaints", | |
| ")" | |
| ], | |
| "question": "苦情を申し立てたことがない顧客のメールアドレスと電話番号は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 25, | |
| 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": "customer_complaints", | |
| "query": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", | |
| "query_toks": [ | |
| "SELECT", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "UNION", | |
| "SELECT", | |
| "phone_number", | |
| "FROM", | |
| "staff" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "union", | |
| "select", | |
| "phone_number", | |
| "from", | |
| "staff" | |
| ], | |
| "question": "すべての顧客とスタッフの電話番号を見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT phone_number FROM customers UNION SELECT phone_number FROM staff", | |
| "query_toks": [ | |
| "SELECT", | |
| "phone_number", | |
| "FROM", | |
| "customers", | |
| "UNION", | |
| "SELECT", | |
| "phone_number", | |
| "FROM", | |
| "staff" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "phone_number", | |
| "from", | |
| "customers", | |
| "union", | |
| "select", | |
| "phone_number", | |
| "from", | |
| "staff" | |
| ], | |
| "question": "すべての顧客とすべてのスタッフの電話番号は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_description FROM products WHERE product_name = \"Chocolate\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_description", | |
| "FROM", | |
| "products", | |
| "WHERE", | |
| "product_name", | |
| "=", | |
| "``", | |
| "Chocolate", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_description", | |
| "from", | |
| "products", | |
| "where", | |
| "product_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "「Chocolate」という商品の説明は?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Chocolate\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_description FROM products WHERE product_name = \"Chocolate\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_description", | |
| "FROM", | |
| "products", | |
| "WHERE", | |
| "product_name", | |
| "=", | |
| "``", | |
| "Chocolate", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_description", | |
| "from", | |
| "products", | |
| "where", | |
| "product_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "「Chocolate」という商品の説明を返します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Chocolate\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_name", | |
| ",", | |
| "product_category_code", | |
| "FROM", | |
| "products", | |
| "ORDER", | |
| "BY", | |
| "product_price", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_name", | |
| ",", | |
| "product_category_code", | |
| "from", | |
| "products", | |
| "order", | |
| "by", | |
| "product_price", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最も高価な製品の名前とカテゴリを見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_name , product_category_code FROM products ORDER BY product_price DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_name", | |
| ",", | |
| "product_category_code", | |
| "FROM", | |
| "products", | |
| "ORDER", | |
| "BY", | |
| "product_price", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_name", | |
| ",", | |
| "product_category_code", | |
| "from", | |
| "products", | |
| "order", | |
| "by", | |
| "product_price", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "価格が最も高い製品の名前とカテゴリコードは何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_price", | |
| "FROM", | |
| "products", | |
| "WHERE", | |
| "product_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "product_id", | |
| "FROM", | |
| "complaints", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_price", | |
| "from", | |
| "products", | |
| "where", | |
| "product_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "product_id", | |
| "from", | |
| "complaints", | |
| ")" | |
| ], | |
| "question": "一度も苦情を受けたことのない製品の価格を見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 24, | |
| 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": "customer_complaints", | |
| "query": "SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)", | |
| "query_toks": [ | |
| "SELECT", | |
| "product_price", | |
| "FROM", | |
| "products", | |
| "WHERE", | |
| "product_id", | |
| "NOT", | |
| "IN", | |
| "(", | |
| "SELECT", | |
| "product_id", | |
| "FROM", | |
| "complaints", | |
| ")" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "product_price", | |
| "from", | |
| "products", | |
| "where", | |
| "product_id", | |
| "not", | |
| "in", | |
| "(", | |
| "select", | |
| "product_id", | |
| "from", | |
| "complaints", | |
| ")" | |
| ], | |
| "question": "苦情を受けたことのない商品の価格はいくらですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| true, | |
| 8, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 24, | |
| 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": "customer_complaints", | |
| "query": "SELECT avg(product_price) , product_category_code FROM products GROUP BY product_category_code", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "product_price", | |
| ")", | |
| ",", | |
| "product_category_code", | |
| "FROM", | |
| "products", | |
| "GROUP", | |
| "BY", | |
| "product_category_code" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "product_price", | |
| ")", | |
| ",", | |
| "product_category_code", | |
| "from", | |
| "products", | |
| "group", | |
| "by", | |
| "product_category_code" | |
| ], | |
| "question": "各カテゴリーの製品の平均価格はいくらですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT avg(product_price) , product_category_code FROM products GROUP BY product_category_code", | |
| "query_toks": [ | |
| "SELECT", | |
| "avg", | |
| "(", | |
| "product_price", | |
| ")", | |
| ",", | |
| "product_category_code", | |
| "FROM", | |
| "products", | |
| "GROUP", | |
| "BY", | |
| "product_category_code" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "avg", | |
| "(", | |
| "product_price", | |
| ")", | |
| ",", | |
| "product_category_code", | |
| "from", | |
| "products", | |
| "group", | |
| "by", | |
| "product_category_code" | |
| ], | |
| "question": "各カテゴリコードを持つ製品の平均価格を返します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 5, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 17, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.last_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "JOIN", | |
| "products", | |
| "AS", | |
| "t3", | |
| "ON", | |
| "t2.product_id", | |
| "=", | |
| "t3.product_id", | |
| "ORDER", | |
| "BY", | |
| "t3.product_price", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "join", | |
| "products", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t3", | |
| ".", | |
| "product_id", | |
| "order", | |
| "by", | |
| "t3", | |
| ".", | |
| "product_price", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最も安い製品の苦情を処理したスタッフの名前を見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id JOIN products AS t3 ON t2.product_id = t3.product_id ORDER BY t3.product_price LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.last_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "JOIN", | |
| "products", | |
| "AS", | |
| "t3", | |
| "ON", | |
| "t2.product_id", | |
| "=", | |
| "t3.product_id", | |
| "ORDER", | |
| "BY", | |
| "t3.product_price", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "join", | |
| "products", | |
| "as", | |
| "t3", | |
| "on", | |
| "t2", | |
| ".", | |
| "product_id", | |
| "=", | |
| "t3", | |
| ".", | |
| "product_id", | |
| "order", | |
| "by", | |
| "t3", | |
| ".", | |
| "product_price", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最低価格の商品に対する苦情を担当するスタッフの名前は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 2 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 24, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 22, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*) > 3", | |
| "query_toks": [ | |
| "SELECT", | |
| "complaint_status_code", | |
| "FROM", | |
| "complaints", | |
| "GROUP", | |
| "BY", | |
| "complaint_status_code", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "3" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "complaint_status_code", | |
| "from", | |
| "complaints", | |
| "group", | |
| "by", | |
| "complaint_status_code", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "どの苦情ステータスに3つ以上のレコードが登録されていますか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 3.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*) > 3", | |
| "query_toks": [ | |
| "SELECT", | |
| "complaint_status_code", | |
| "FROM", | |
| "complaints", | |
| "GROUP", | |
| "BY", | |
| "complaint_status_code", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "3" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "complaint_status_code", | |
| "from", | |
| "complaints", | |
| "group", | |
| "by", | |
| "complaint_status_code", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "返品苦情ステータスコードには、3つ以上の対応する苦情がありますか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 3.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT last_name FROM staff WHERE email_address LIKE \"%wrau%\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "last_name", | |
| "FROM", | |
| "staff", | |
| "WHERE", | |
| "email_address", | |
| "LIKE", | |
| "``", | |
| "%", | |
| "wrau", | |
| "%", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "where", | |
| "email_address", | |
| "like", | |
| "value" | |
| ], | |
| "question": "メールアドレスに「wrau」が含まれているスタッフの姓を検索します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 9, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"%wrau%\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT last_name FROM staff WHERE email_address LIKE \"%wrau%\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "last_name", | |
| "FROM", | |
| "staff", | |
| "WHERE", | |
| "email_address", | |
| "LIKE", | |
| "``", | |
| "%", | |
| "wrau", | |
| "%", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "where", | |
| "email_address", | |
| "like", | |
| "value" | |
| ], | |
| "question": "部分文字列「wrau」を含む電子メールアドレスを持つスタッフの姓は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 9, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"%wrau%\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "customers", | |
| "GROUP", | |
| "BY", | |
| "customer_type_code", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "customers", | |
| "group", | |
| "by", | |
| "customer_type_code", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最も多くの顧客を抱える顧客タイプには、何人の顧客がいますか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "customers", | |
| "GROUP", | |
| "BY", | |
| "customer_type_code", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "customers", | |
| "group", | |
| "by", | |
| "customer_type_code", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最も一般的な顧客タイプを持つ顧客の数を数えます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.last_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "ORDER", | |
| "BY", | |
| "t2.date_complaint_raised", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "date_complaint_raised", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最初の苦情を処理したスタッフの姓は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.last_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "ORDER", | |
| "BY", | |
| "t2.date_complaint_raised", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "last_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "order", | |
| "by", | |
| "t2", | |
| ".", | |
| "date_complaint_raised", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "苦情を処理したスタッフの名前を、最も早い日付で返送してください。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(DISTINCT complaint_type_code) FROM complaints", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "DISTINCT", | |
| "complaint_type_code", | |
| ")", | |
| "FROM", | |
| "complaints" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "distinct", | |
| "complaint_type_code", | |
| ")", | |
| "from", | |
| "complaints" | |
| ], | |
| "question": "データベースにはいくつの異なる苦情タイプコードがありますか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(DISTINCT complaint_type_code) FROM complaints", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "DISTINCT", | |
| "complaint_type_code", | |
| ")", | |
| "FROM", | |
| "complaints" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "distinct", | |
| "complaint_type_code", | |
| ")", | |
| "from", | |
| "complaints" | |
| ], | |
| "question": "さまざまな苦情タイプコードの数を数えます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = \"vbogisich@example.org\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "address_line_1", | |
| ",", | |
| "address_line_2", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "email_address", | |
| "=", | |
| "``", | |
| "vbogisich", | |
| "@", | |
| "example.org", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "address_line_1", | |
| ",", | |
| "address_line_2", | |
| "from", | |
| "customers", | |
| "where", | |
| "email_address", | |
| "=", | |
| "value" | |
| ], | |
| "question": "メール「vbogisich@example.org」で顧客の住所1行目と2行目を見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"vbogisich@example.org\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT address_line_1 , address_line_2 FROM customers WHERE email_address = \"vbogisich@example.org\"", | |
| "query_toks": [ | |
| "SELECT", | |
| "address_line_1", | |
| ",", | |
| "address_line_2", | |
| "FROM", | |
| "customers", | |
| "WHERE", | |
| "email_address", | |
| "=", | |
| "``", | |
| "vbogisich", | |
| "@", | |
| "example.org", | |
| "''" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "address_line_1", | |
| ",", | |
| "address_line_2", | |
| "from", | |
| "customers", | |
| "where", | |
| "email_address", | |
| "=", | |
| "value" | |
| ], | |
| "question": "電子メール「vbogisich@example.org」で顧客のアドレスの1行目と2行目は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"vbogisich@example.org\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = \"Product Failure\" GROUP BY complaint_status_code", | |
| "query_toks": [ | |
| "SELECT", | |
| "complaint_status_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "complaints", | |
| "WHERE", | |
| "complaint_type_code", | |
| "=", | |
| "``", | |
| "Product", | |
| "Failure", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "complaint_status_code" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "complaint_status_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "complaints", | |
| "where", | |
| "complaint_type_code", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "complaint_status_code" | |
| ], | |
| "question": "各苦情ステータスについて、「ProductFailure」タイプの苦情の数を見つけます。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Product Failure\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT complaint_status_code , count(*) FROM complaints WHERE complaint_type_code = \"Product Failure\" GROUP BY complaint_status_code", | |
| "query_toks": [ | |
| "SELECT", | |
| "complaint_status_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "complaints", | |
| "WHERE", | |
| "complaint_type_code", | |
| "=", | |
| "``", | |
| "Product", | |
| "Failure", | |
| "''", | |
| "GROUP", | |
| "BY", | |
| "complaint_status_code" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "complaint_status_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "complaints", | |
| "where", | |
| "complaint_type_code", | |
| "=", | |
| "value", | |
| "group", | |
| "by", | |
| "complaint_status_code" | |
| ], | |
| "question": "タイプコード「ProductFailure」に関する苦情のうち、ステータスコードがそれぞれ異なるものはいくつありますか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Product Failure\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 27, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.first_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "GROUP", | |
| "BY", | |
| "t2.staff_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "5" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "first_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "group", | |
| "by", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最も多くの苦情を処理した上位5人のスタッフの名は何ですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 5, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY count(*) LIMIT 5", | |
| "query_toks": [ | |
| "SELECT", | |
| "t1.first_name", | |
| "FROM", | |
| "staff", | |
| "AS", | |
| "t1", | |
| "JOIN", | |
| "complaints", | |
| "AS", | |
| "t2", | |
| "ON", | |
| "t1.staff_id", | |
| "=", | |
| "t2.staff_id", | |
| "GROUP", | |
| "BY", | |
| "t2.staff_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "5" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "first_name", | |
| "from", | |
| "staff", | |
| "as", | |
| "t1", | |
| "join", | |
| "complaints", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "staff_id", | |
| "=", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "group", | |
| "by", | |
| "t2", | |
| ".", | |
| "staff_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "最も多くの苦情を処理した5人のスタッフの名を返します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ], | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 5, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "state", | |
| "FROM", | |
| "customers", | |
| "GROUP", | |
| "BY", | |
| "state", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "state", | |
| "from", | |
| "customers", | |
| "group", | |
| "by", | |
| "state", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "顧客が最も多い州はどれですか?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1", | |
| "query_toks": [ | |
| "SELECT", | |
| "state", | |
| "FROM", | |
| "customers", | |
| "GROUP", | |
| "BY", | |
| "state", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "LIMIT", | |
| "1" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "state", | |
| "from", | |
| "customers", | |
| "group", | |
| "by", | |
| "state", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "顧客が最も多い州を示します。", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "asc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| } | |
| ] |