| [ | |
| { | |
| "db_id": "customer_complaints", | |
| "query": "SELECT count(*) FROM customers", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "customers" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "customers" | |
| ], | |
| "question": "¿Cuántos clientes hay?", | |
| "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": "Cuente el número de clientes.", | |
| "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": "Encuentre los correos electrónicos y números de móvi de todos los clientes, ordenados por dirección de correo electrónico y número de teléfono.", | |
| "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": "¿Cuáles son los correos electrónicos y números de móvil de todos los clientes, ordenados por dirección de correo electrónico y número de teléfono?", | |
| "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": "¿Qué ciudad tiene la menor cantidad de clientes cuyo código de tipo es \"Good Credit Rating\"?", | |
| "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": "Devuelva la ciudad con el código de tipo de cliente \"Good Credit Rating\" que tuvo la menor cantidad de clientes.", | |
| "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": "Indique el nombre de todos los productos junto con el número de quejas que han recibido.", | |
| "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": "¿Cuáles son los diferentes nombres de productos y cuántas quejas ha recibido cada uno?", | |
| "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": "Encuentre los correos electrónicos de los clientes que han presentado quejas sobre el producto con más quejas.", | |
| "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": "¿Cuáles son los correos electrónicos de los clientes que han presentado quejas sobre el producto que ha tenido el mayor número de quejas?", | |
| "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": "¿Qué productos ha sido objeto de reclamaciones por parte del cliente que ha presentado la menor cantidad de reclamaciones?", | |
| "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": "Devuelva los nombres de los productos que han presentado quejas por parte del cliente que ha presentado la menor cantidad de quejas.", | |
| "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": "¿Cuál es el número de móvil del cliente que ha presentado la queja más reciente?", | |
| "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": "Devuelva el número de móvil del cliente que presentó la queja que se planteó más recientemente.", | |
| "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": "Busque el correo electrónico y el número de móvil de los clientes que nunca antes presentaron una queja.", | |
| "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": "¿Cuáles son los correos electrónicos y números de móvil de los clientes que nunca han presentado una queja?", | |
| "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": "Encuentre el número de móvil de todos los clientes y el personal.", | |
| "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": "¿Cuáles son los números de móvil de todos los clientes y todos los miembros del personal?", | |
| "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": "¿Cuál es la descripción del producto denominado \"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": "Devuelva la descripción del producto llamado \"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": "Busque el nombre y la categoría del producto más caro.", | |
| "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": "¿Cuál es el nombre y el código de categoría del producto con el precio más alto?", | |
| "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": "Encuentre los precios de los productos que nunca ha recibido una sola queja.", | |
| "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": "¿Cuáles son los precios de los productos que nunca han recibido una queja?", | |
| "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": "¿Cuál es el precio medio de los productos de cada categoría?", | |
| "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": "Devuelva el precio medio de los productos que tienen cada código de categoría.", | |
| "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": "Busque el apellido del miembro del personal que procesó la queja del producto más barato.", | |
| "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": "¿Cuál es el apellido del funcionario encargado de la denuncia sobre el producto de menor precio?", | |
| "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": "¿Qué estado de queja tiene más de 3 registros archivados?", | |
| "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": "¿Los códigos de estado de quejas de devolución tienen más de 3 quejas correspondientes?", | |
| "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": "Busque el apellido del personal cuya dirección de correo electrónico contiene \"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": "¿Cuáles son los apellidos del personal cuya dirección de correo electrónico contiene \"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": "¿Cuántos clientes hay en el tipo de cliente con más clientes?", | |
| "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": "Cuente el número de clientes que tienen el tipo de cliente más común.", | |
| "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": "¿Cuál es el apellido del personal que tramitó la primera queja?", | |
| "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": "Devuelva el apellido del miembro del personal que manejó la queja con la fecha más temprana en que se presentó.", | |
| "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": "¿Cuántos códigos distintos de tipos de reclamaciones hay en la base de datos?", | |
| "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": "Cuente la cantidad de códigos de tipo de queja diferentes.", | |
| "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": "Busque la línea de dirección 1 y 2 del cliente con el correo electrónico \"vbogisich@example.org\".", | |
| "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": "¿Cuáles son las líneas 1 y 2 de la dirección del cliente con el correo electrónico \"vbogisich@example.org\"?", | |
| "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": "Encuentre el número de quejas con el tipo de ''Product Failure'' para cada estado de queja.", | |
| "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": "De las quejas con el código de tipo ''Product Failure'', ¿cuántas tenían cada código de estado diferente?", | |
| "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": "¿Cuáles son los nombres de los 5 miembros principales del personal que han manejado el mayor número de quejas?", | |
| "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": "Devuelva los nombres de los 5 miembros del personal que han manejado la mayoría de las quejas.", | |
| "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": "¿Qué estado tiene más clientes?", | |
| "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": "Indique el estado que tiene más clientes.", | |
| "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 | |
| } | |
| } | |
| ] |