| [ | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_status_code FROM Ref_Document_Status;", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_status_code", | |
| "FROM", | |
| "Ref_Document_Status", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_status_code", | |
| "from", | |
| "ref_document_status" | |
| ], | |
| "question": "¿Qué códigos de estado de los documentos tenemos?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_status_description FROM Ref_Document_Status WHERE document_status_code = \"working\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_status_description", | |
| "FROM", | |
| "Ref_Document_Status", | |
| "WHERE", | |
| "document_status_code", | |
| "=", | |
| "``", | |
| "working", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_status_description", | |
| "from", | |
| "ref_document_status", | |
| "where", | |
| "document_status_code", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es la descripción del código de estado del documento \"working\"?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"working\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_type_code FROM Ref_Document_Types;", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_type_code", | |
| "FROM", | |
| "Ref_Document_Types", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_type_code", | |
| "from", | |
| "ref_document_types" | |
| ], | |
| "question": "¿Qué códigos de tipo de documento tenemos?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = \"Paper\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_type_description", | |
| "FROM", | |
| "Ref_Document_Types", | |
| "WHERE", | |
| "document_type_code", | |
| "=", | |
| "``", | |
| "Paper", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_type_description", | |
| "from", | |
| "ref_document_types", | |
| "where", | |
| "document_type_code", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es la descripción del tipo de documento \"Paper\"?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Paper\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT shipping_agent_name FROM Ref_Shipping_Agents;", | |
| "query_toks": [ | |
| "SELECT", | |
| "shipping_agent_name", | |
| "FROM", | |
| "Ref_Shipping_Agents", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "shipping_agent_name", | |
| "from", | |
| "ref_shipping_agents" | |
| ], | |
| "question": "¿Cuáles son los nombres de los agentes de transporte?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT shipping_agent_code FROM Ref_Shipping_Agents WHERE shipping_agent_name = \"UPS\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "shipping_agent_code", | |
| "FROM", | |
| "Ref_Shipping_Agents", | |
| "WHERE", | |
| "shipping_agent_name", | |
| "=", | |
| "``", | |
| "UPS", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "shipping_agent_code", | |
| "from", | |
| "ref_shipping_agents", | |
| "where", | |
| "shipping_agent_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es el código de agente de envío del agente de envío ''UPS''?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"UPS\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT role_code FROM ROLES;", | |
| "query_toks": [ | |
| "SELECT", | |
| "role_code", | |
| "FROM", | |
| "ROLES", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "role_code", | |
| "from", | |
| "roles" | |
| ], | |
| "question": "¿Qué son todos los códigos de función?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT role_description FROM ROLES WHERE role_code = \"ED\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "role_description", | |
| "FROM", | |
| "ROLES", | |
| "WHERE", | |
| "role_code", | |
| "=", | |
| "``", | |
| "ED", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "role_description", | |
| "from", | |
| "roles", | |
| "where", | |
| "role_code", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es la descripción del código de función ''ED''?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"ED\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT count(*) FROM Employees;", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Employees", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "employees" | |
| ], | |
| "question": "¿Cuántos empleados tenemos?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = \"Koby\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.role_description", | |
| "FROM", | |
| "ROLES", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Employees", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.role_code", | |
| "=", | |
| "T2.role_code", | |
| "WHERE", | |
| "T2.employee_name", | |
| "=", | |
| "``", | |
| "Koby", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "role_description", | |
| "from", | |
| "roles", | |
| "as", | |
| "t1", | |
| "join", | |
| "employees", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "role_code", | |
| "=", | |
| "t2", | |
| ".", | |
| "role_code", | |
| "where", | |
| "t2", | |
| ".", | |
| "employee_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es el rol del empleado llamado ''Koby''?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Koby\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_id , receipt_date FROM Documents;", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_id", | |
| ",", | |
| "receipt_date", | |
| "FROM", | |
| "Documents", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_id", | |
| ",", | |
| "receipt_date", | |
| "from", | |
| "documents" | |
| ], | |
| "question": "Enumere todos las identificaciones de documentos y las fechas de recepción de los documentos.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT T1.role_description , T2.role_code , count(*) FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code;", | |
| "query_toks": [ | |
| "SELECT", | |
| "T1.role_description", | |
| ",", | |
| "T2.role_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "ROLES", | |
| "AS", | |
| "T1", | |
| "JOIN", | |
| "Employees", | |
| "AS", | |
| "T2", | |
| "ON", | |
| "T1.role_code", | |
| "=", | |
| "T2.role_code", | |
| "GROUP", | |
| "BY", | |
| "T2.role_code", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "t1", | |
| ".", | |
| "role_description", | |
| ",", | |
| "t2", | |
| ".", | |
| "role_code", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "roles", | |
| "as", | |
| "t1", | |
| "join", | |
| "employees", | |
| "as", | |
| "t2", | |
| "on", | |
| "t1", | |
| ".", | |
| "role_code", | |
| "=", | |
| "t2", | |
| ".", | |
| "role_code", | |
| "group", | |
| "by", | |
| "t2", | |
| ".", | |
| "role_code" | |
| ], | |
| "question": "¿Cuántos empleados tiene cada puesto? Enumere la descripción de la función, la identificación y el número de empleados.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 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": "cre_Doc_Control_Systems", | |
| "query": "SELECT Roles.role_description , count(Employees.employee_id) FROM ROLES JOIN Employees ON Employees.role_code = Roles.role_code GROUP BY Employees.role_code HAVING count(Employees.employee_id) > 1;", | |
| "query_toks": [ | |
| "SELECT", | |
| "Roles.role_description", | |
| ",", | |
| "count", | |
| "(", | |
| "Employees.employee_id", | |
| ")", | |
| "FROM", | |
| "ROLES", | |
| "JOIN", | |
| "Employees", | |
| "ON", | |
| "Employees.role_code", | |
| "=", | |
| "Roles.role_code", | |
| "GROUP", | |
| "BY", | |
| "Employees.role_code", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "Employees.employee_id", | |
| ")", | |
| ">", | |
| "1", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "roles.role_description", | |
| ",", | |
| "count", | |
| "(", | |
| "employees.employee_id", | |
| ")", | |
| "from", | |
| "roles", | |
| "join", | |
| "employees", | |
| "on", | |
| "employees.role_code", | |
| "=", | |
| "roles.role_code", | |
| "group", | |
| "by", | |
| "employees.role_code", | |
| "having", | |
| "count", | |
| "(", | |
| "employees.employee_id", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "Enumere los roles que tienen más de un empleado. Enumere la descripción de la función y el número de empleados.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 19, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1;", | |
| "query_toks": [ | |
| "SELECT", | |
| "Ref_Document_Status.document_status_description", | |
| "FROM", | |
| "Ref_Document_Status", | |
| "JOIN", | |
| "Documents", | |
| "ON", | |
| "Documents.document_status_code", | |
| "=", | |
| "Ref_Document_Status.document_status_code", | |
| "WHERE", | |
| "Documents.document_id", | |
| "=", | |
| "1", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "ref_document_status.document_status_description", | |
| "from", | |
| "ref_document_status", | |
| "join", | |
| "documents", | |
| "on", | |
| "documents.document_status_code", | |
| "=", | |
| "ref_document_status.document_status_code", | |
| "where", | |
| "documents.document_id", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es la descripción del estado del documento del documento con id 1?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT count(*) FROM Documents WHERE document_status_code = \"done\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Documents", | |
| "WHERE", | |
| "document_status_code", | |
| "=", | |
| "``", | |
| "done", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "documents", | |
| "where", | |
| "document_status_code", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuántos documentos tiene el código de estado?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"done\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_type_code FROM Documents WHERE document_id = 2;", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_type_code", | |
| "FROM", | |
| "Documents", | |
| "WHERE", | |
| "document_id", | |
| "=", | |
| "2", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_type_code", | |
| "from", | |
| "documents", | |
| "where", | |
| "document_id", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Enumere el código de tipo de documento para el documento con la identificación 2.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_id FROM Documents WHERE document_status_code = \"done\" AND document_type_code = \"Paper\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_id", | |
| "FROM", | |
| "Documents", | |
| "WHERE", | |
| "document_status_code", | |
| "=", | |
| "``", | |
| "done", | |
| "''", | |
| "AND", | |
| "document_type_code", | |
| "=", | |
| "``", | |
| "Paper", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_id", | |
| "from", | |
| "documents", | |
| "where", | |
| "document_status_code", | |
| "=", | |
| "value", | |
| "and", | |
| "document_type_code", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Enumere las identificaciones de documento para cualquier documento con el código de estado hecho y el código de tipo de papel.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"done\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Paper\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2;", | |
| "query_toks": [ | |
| "SELECT", | |
| "Ref_Shipping_Agents.shipping_agent_name", | |
| "FROM", | |
| "Ref_Shipping_Agents", | |
| "JOIN", | |
| "Documents", | |
| "ON", | |
| "Documents.shipping_agent_code", | |
| "=", | |
| "Ref_Shipping_Agents.shipping_agent_code", | |
| "WHERE", | |
| "Documents.document_id", | |
| "=", | |
| "2", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "ref_shipping_agents.shipping_agent_name", | |
| "from", | |
| "ref_shipping_agents", | |
| "join", | |
| "documents", | |
| "on", | |
| "documents.shipping_agent_code", | |
| "=", | |
| "ref_shipping_agents.shipping_agent_code", | |
| "where", | |
| "documents.document_id", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es el nombre del agente de envío del documento con id 2?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT count(*) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = \"USPS\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Ref_Shipping_Agents", | |
| "JOIN", | |
| "Documents", | |
| "ON", | |
| "Documents.shipping_agent_code", | |
| "=", | |
| "Ref_Shipping_Agents.shipping_agent_code", | |
| "WHERE", | |
| "Ref_Shipping_Agents.shipping_agent_name", | |
| "=", | |
| "``", | |
| "USPS", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "ref_shipping_agents", | |
| "join", | |
| "documents", | |
| "on", | |
| "documents.shipping_agent_code", | |
| "=", | |
| "ref_shipping_agents.shipping_agent_code", | |
| "where", | |
| "ref_shipping_agents.shipping_agent_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuántos documentos fueron enviados por ''USPS''?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"USPS\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT Ref_Shipping_Agents.shipping_agent_name , count(Documents.document_id) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code GROUP BY Ref_Shipping_Agents.shipping_agent_code ORDER BY count(Documents.document_id) DESC LIMIT 1;", | |
| "query_toks": [ | |
| "SELECT", | |
| "Ref_Shipping_Agents.shipping_agent_name", | |
| ",", | |
| "count", | |
| "(", | |
| "Documents.document_id", | |
| ")", | |
| "FROM", | |
| "Ref_Shipping_Agents", | |
| "JOIN", | |
| "Documents", | |
| "ON", | |
| "Documents.shipping_agent_code", | |
| "=", | |
| "Ref_Shipping_Agents.shipping_agent_code", | |
| "GROUP", | |
| "BY", | |
| "Ref_Shipping_Agents.shipping_agent_code", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "Documents.document_id", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "ref_shipping_agents.shipping_agent_name", | |
| ",", | |
| "count", | |
| "(", | |
| "documents.document_id", | |
| ")", | |
| "from", | |
| "ref_shipping_agents", | |
| "join", | |
| "documents", | |
| "on", | |
| "documents.shipping_agent_code", | |
| "=", | |
| "ref_shipping_agents.shipping_agent_code", | |
| "group", | |
| "by", | |
| "ref_shipping_agents.shipping_agent_code", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "documents.document_id", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "¿Qué agente de envío envió la mayor cantidad de documentos? Indique el nombre del agente de envío y la cantidad de documentos.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT receipt_date FROM Documents WHERE document_id = 3;", | |
| "query_toks": [ | |
| "SELECT", | |
| "receipt_date", | |
| "FROM", | |
| "Documents", | |
| "WHERE", | |
| "document_id", | |
| "=", | |
| "3", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "receipt_date", | |
| "from", | |
| "documents", | |
| "where", | |
| "document_id", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es la fecha de recepción del documento con id 3?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| 3.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4;", | |
| "query_toks": [ | |
| "SELECT", | |
| "Addresses.address_details", | |
| "FROM", | |
| "Addresses", | |
| "JOIN", | |
| "Documents_Mailed", | |
| "ON", | |
| "Documents_Mailed.mailed_to_address_id", | |
| "=", | |
| "Addresses.address_id", | |
| "WHERE", | |
| "document_id", | |
| "=", | |
| "4", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "addresses.address_details", | |
| "from", | |
| "addresses", | |
| "join", | |
| "documents_mailed", | |
| "on", | |
| "documents_mailed.mailed_to_address_id", | |
| "=", | |
| "addresses.address_id", | |
| "where", | |
| "document_id", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿A qué dirección se envió el documento con id 4?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 10 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 34, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 33, | |
| false | |
| ], | |
| null | |
| ], | |
| 4.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7;", | |
| "query_toks": [ | |
| "SELECT", | |
| "mailing_date", | |
| "FROM", | |
| "Documents_Mailed", | |
| "WHERE", | |
| "document_id", | |
| "=", | |
| "7", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "mailing_date", | |
| "from", | |
| "documents_mailed", | |
| "where", | |
| "document_id", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es la fecha de envío del documento con id 7?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 10 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 35, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 33, | |
| false | |
| ], | |
| null | |
| ], | |
| 7.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_id FROM Documents WHERE document_status_code = \"done\" AND document_type_code = \"Paper\" EXCEPT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = \"USPS\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_id", | |
| "FROM", | |
| "Documents", | |
| "WHERE", | |
| "document_status_code", | |
| "=", | |
| "``", | |
| "done", | |
| "''", | |
| "AND", | |
| "document_type_code", | |
| "=", | |
| "``", | |
| "Paper", | |
| "''", | |
| "EXCEPT", | |
| "SELECT", | |
| "document_id", | |
| "FROM", | |
| "Documents", | |
| "JOIN", | |
| "Ref_Shipping_Agents", | |
| "ON", | |
| "Documents.shipping_agent_code", | |
| "=", | |
| "Ref_Shipping_Agents.shipping_agent_code", | |
| "WHERE", | |
| "Ref_Shipping_Agents.shipping_agent_name", | |
| "=", | |
| "``", | |
| "USPS", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_id", | |
| "from", | |
| "documents", | |
| "where", | |
| "document_status_code", | |
| "=", | |
| "value", | |
| "and", | |
| "document_type_code", | |
| "=", | |
| "value", | |
| "except", | |
| "select", | |
| "document_id", | |
| "from", | |
| "documents", | |
| "join", | |
| "ref_shipping_agents", | |
| "on", | |
| "documents.shipping_agent_code", | |
| "=", | |
| "ref_shipping_agents.shipping_agent_code", | |
| "where", | |
| "ref_shipping_agents.shipping_agent_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Enumere las identificaciones de documentos de los documentos con el estado hecho y el tipo ''Paper'', que no envió el agente de envío llamado ''USPS''.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"done\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Paper\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ], | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"USPS\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_id FROM Documents WHERE document_status_code = \"done\" AND document_type_code = \"Paper\" INTERSECT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = \"USPS\";", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_id", | |
| "FROM", | |
| "Documents", | |
| "WHERE", | |
| "document_status_code", | |
| "=", | |
| "``", | |
| "done", | |
| "''", | |
| "AND", | |
| "document_type_code", | |
| "=", | |
| "``", | |
| "Paper", | |
| "''", | |
| "INTERSECT", | |
| "SELECT", | |
| "document_id", | |
| "FROM", | |
| "Documents", | |
| "JOIN", | |
| "Ref_Shipping_Agents", | |
| "ON", | |
| "Documents.shipping_agent_code", | |
| "=", | |
| "Ref_Shipping_Agents.shipping_agent_code", | |
| "WHERE", | |
| "Ref_Shipping_Agents.shipping_agent_name", | |
| "=", | |
| "``", | |
| "USPS", | |
| "''", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_id", | |
| "from", | |
| "documents", | |
| "where", | |
| "document_status_code", | |
| "=", | |
| "value", | |
| "and", | |
| "document_type_code", | |
| "=", | |
| "value", | |
| "intersect", | |
| "select", | |
| "document_id", | |
| "from", | |
| "documents", | |
| "join", | |
| "ref_shipping_agents", | |
| "on", | |
| "documents.shipping_agent_code", | |
| "=", | |
| "ref_shipping_agents.shipping_agent_code", | |
| "where", | |
| "ref_shipping_agents.shipping_agent_name", | |
| "=", | |
| "value" | |
| ], | |
| "question": "La identificación del documento de lista del estado de los documentos está lista y el tipo de documento es Papel y el documento es enviado por un agente de envío llamado ''USPS''.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"done\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Paper\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ], | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"USPS\"", | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| }, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT draft_details FROM Document_Drafts WHERE document_id = 7;", | |
| "query_toks": [ | |
| "SELECT", | |
| "draft_details", | |
| "FROM", | |
| "Document_Drafts", | |
| "WHERE", | |
| "document_id", | |
| "=", | |
| "7", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "draft_details", | |
| "from", | |
| "document_drafts", | |
| "where", | |
| "document_id", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuál es el detalle del borrador del documento con id 7?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 7 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 23, | |
| false | |
| ], | |
| null | |
| ], | |
| 7.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT count(*) FROM Draft_Copies WHERE document_id = 2;", | |
| "query_toks": [ | |
| "SELECT", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Draft_Copies", | |
| "WHERE", | |
| "document_id", | |
| "=", | |
| "2", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "draft_copies", | |
| "where", | |
| "document_id", | |
| "=", | |
| "value" | |
| ], | |
| "question": "¿Cuántos borradores tiene el documento con id 2?", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 8 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_id , count(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY count(copy_number) DESC LIMIT 1;", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_id", | |
| ",", | |
| "count", | |
| "(", | |
| "copy_number", | |
| ")", | |
| "FROM", | |
| "Draft_Copies", | |
| "GROUP", | |
| "BY", | |
| "document_id", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "copy_number", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_id", | |
| ",", | |
| "count", | |
| "(", | |
| "copy_number", | |
| ")", | |
| "from", | |
| "draft_copies", | |
| "group", | |
| "by", | |
| "document_id", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "copy_number", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "¿Qué documento tiene la mayor cantidad de borradores? Indique su identificación de documento y el número de borradores.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 8 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 28, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_id , count(*) FROM Draft_Copies GROUP BY document_id HAVING count(*) > 1;", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_id", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Draft_Copies", | |
| "GROUP", | |
| "BY", | |
| "document_id", | |
| "HAVING", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "1", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_id", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "draft_copies", | |
| "group", | |
| "by", | |
| "document_id", | |
| "having", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| ">", | |
| "value" | |
| ], | |
| "question": "¿Qué documentos tienen más de 1 borrador? Enumere la identificación del documento y el número de borradores.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 8 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id WHERE Circulation_History.document_id = 1;", | |
| "query_toks": [ | |
| "SELECT", | |
| "Employees.employee_name", | |
| "FROM", | |
| "Employees", | |
| "JOIN", | |
| "Circulation_History", | |
| "ON", | |
| "Circulation_History.employee_id", | |
| "=", | |
| "Employees.employee_id", | |
| "WHERE", | |
| "Circulation_History.document_id", | |
| "=", | |
| "1", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "employees.employee_name", | |
| "from", | |
| "employees", | |
| "join", | |
| "circulation_history", | |
| "on", | |
| "circulation_history.employee_id", | |
| "=", | |
| "employees.employee_id", | |
| "where", | |
| "circulation_history.document_id", | |
| "=", | |
| "value" | |
| ], | |
| "question": "Enumere todos los empleados en el historial de circulación del documento con la identificación 1. Indique el nombre del empleado.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ], | |
| [ | |
| "table_unit", | |
| 9 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 32, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id", | |
| "query_toks": [ | |
| "SELECT", | |
| "employee_name", | |
| "FROM", | |
| "Employees", | |
| "EXCEPT", | |
| "SELECT", | |
| "Employees.employee_name", | |
| "FROM", | |
| "Employees", | |
| "JOIN", | |
| "Circulation_History", | |
| "ON", | |
| "Circulation_History.employee_id", | |
| "=", | |
| "Employees.employee_id" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "employee_name", | |
| "from", | |
| "employees", | |
| "except", | |
| "select", | |
| "employees.employee_name", | |
| "from", | |
| "employees", | |
| "join", | |
| "circulation_history", | |
| "on", | |
| "circulation_history.employee_id", | |
| "=", | |
| "employees.employee_id" | |
| ], | |
| "question": "Enumere los empleados que no han aparecido en ningún historial de circulación de documentos. Indique el nombre del empleado.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ], | |
| [ | |
| "table_unit", | |
| 9 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 32, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT Employees.employee_name , count(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id , Circulation_History.draft_number , Circulation_History.copy_number ORDER BY count(*) DESC LIMIT 1;", | |
| "query_toks": [ | |
| "SELECT", | |
| "Employees.employee_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "FROM", | |
| "Employees", | |
| "JOIN", | |
| "Circulation_History", | |
| "ON", | |
| "Circulation_History.employee_id", | |
| "=", | |
| "Employees.employee_id", | |
| "GROUP", | |
| "BY", | |
| "Circulation_History.document_id", | |
| ",", | |
| "Circulation_History.draft_number", | |
| ",", | |
| "Circulation_History.copy_number", | |
| "ORDER", | |
| "BY", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "DESC", | |
| "LIMIT", | |
| "1", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "employees.employee_name", | |
| ",", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "from", | |
| "employees", | |
| "join", | |
| "circulation_history", | |
| "on", | |
| "circulation_history.employee_id", | |
| "=", | |
| "employees.employee_id", | |
| "group", | |
| "by", | |
| "circulation_history.document_id", | |
| ",", | |
| "circulation_history.draft_number", | |
| ",", | |
| "circulation_history.copy_number", | |
| "order", | |
| "by", | |
| "count", | |
| "(", | |
| "*", | |
| ")", | |
| "desc", | |
| "limit", | |
| "value" | |
| ], | |
| "question": "Qué empleado ha aparecido en la mayoría de los documentos del historial de circulación. Indique el nombre del empleado y el número de borradores y copias.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ], | |
| [ | |
| "table_unit", | |
| 9 | |
| ] | |
| ], | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 32, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| [ | |
| 0, | |
| 30, | |
| false | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "limit": 1, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| }, | |
| { | |
| "db_id": "cre_Doc_Control_Systems", | |
| "query": "SELECT document_id , count(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id;", | |
| "query_toks": [ | |
| "SELECT", | |
| "document_id", | |
| ",", | |
| "count", | |
| "(", | |
| "DISTINCT", | |
| "employee_id", | |
| ")", | |
| "FROM", | |
| "Circulation_History", | |
| "GROUP", | |
| "BY", | |
| "document_id", | |
| ";" | |
| ], | |
| "query_toks_no_value": [ | |
| "select", | |
| "document_id", | |
| ",", | |
| "count", | |
| "(", | |
| "distinct", | |
| "employee_id", | |
| ")", | |
| "from", | |
| "circulation_history", | |
| "group", | |
| "by", | |
| "document_id" | |
| ], | |
| "question": "Para cada documento, enumere la cantidad de empleados que han aparecido en el historial de circulación de ese documento. Enumere las identificaciones de documentos y el número de empleados.", | |
| "sql": { | |
| "from": { | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 9 | |
| ] | |
| ], | |
| "conds": [] | |
| }, | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 32, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "where": [], | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "orderBy": [], | |
| "limit": null, | |
| "intersect": null, | |
| "union": null, | |
| "except": null | |
| } | |
| } | |
| ] |