| [ | |
| { | |
| "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": "Cho biết mã của tất cả các trạng thái tài liệu .", | |
| "question_toks": [ | |
| "What", | |
| "document", | |
| "status", | |
| "codes", | |
| "do", | |
| "we", | |
| "have", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Tìm mô tả về tài liệu có mã trạng thái là ' đang được xử lý ' .", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "description", | |
| "of", | |
| "document", | |
| "status", | |
| "code", | |
| "'working", | |
| "'", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"working\"", | |
| 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": "Cho biết mã của tất cả các loại tài liệu .", | |
| "question_toks": [ | |
| "What", | |
| "document", | |
| "type", | |
| "codes", | |
| "do", | |
| "we", | |
| "have", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Tìm mô tả về tài liệu có loại là ' Giấy ' .", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "description", | |
| "of", | |
| "document", | |
| "type", | |
| "'Paper", | |
| "'", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 0 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 2, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 1, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Paper\"", | |
| 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": "Cho biết tên của tất cả các đại lý vận chuyển .", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "the", | |
| "shipping", | |
| "agent", | |
| "names", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Cho biết mã đại lý vận chuyển của đại lý vận chuyển UPS .", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "shipping", | |
| "agent", | |
| "code", | |
| "of", | |
| "shipping", | |
| "agent", | |
| "UPS", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"UPS\"", | |
| 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": "Liệt kê mã của tất cả các vai trò .", | |
| "question_toks": [ | |
| "What", | |
| "are", | |
| "all", | |
| "role", | |
| "codes", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Cho biết mô tả về mã vai trò ED .", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "description", | |
| "of", | |
| "role", | |
| "code", | |
| "ED", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"ED\"", | |
| 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": "Có bao nhiêu nhân viên ?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "employees", | |
| "do", | |
| "we", | |
| "have", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Cho biết mô tả về vai trò của nhân viên có tên Koby .", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "role", | |
| "of", | |
| "the", | |
| "employee", | |
| "named", | |
| "Koby", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Koby\"", | |
| 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": "Liệt kê id của tất cả các tài liệu và ngày lập biên lai của từng tài liệu .", | |
| "question_toks": [ | |
| "List", | |
| "all", | |
| "document", | |
| "ids", | |
| "and", | |
| "receipt", | |
| "dates", | |
| "of", | |
| "documents", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Mỗi vai trò có bao nhiêu nhân viên ? Liệt kê mô tả về vai trò , id và số lượng nhân viên của từng vai trò .", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "employees", | |
| "does", | |
| "each", | |
| "role", | |
| "have", | |
| "?", | |
| "List", | |
| "role", | |
| "description", | |
| ",", | |
| "id", | |
| "and", | |
| "number", | |
| "of", | |
| "employees", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Liệt kê các vai trò có nhiều hơn một nhân viên . Liệt kê mô tả về các vai trò này cũng như là số lượng các nhân viên thuộc từng vai trò .", | |
| "question_toks": [ | |
| "List", | |
| "roles", | |
| "that", | |
| "have", | |
| "more", | |
| "than", | |
| "one", | |
| "employee", | |
| ".", | |
| "List", | |
| "the", | |
| "role", | |
| "description", | |
| "and", | |
| "number", | |
| "of", | |
| "employees", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 3, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 1 | |
| ], | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 20, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 19, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 4, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Cho biết mô tả về trạng thái của tài liệu có id 1 .", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "document", | |
| "status", | |
| "description", | |
| "of", | |
| "the", | |
| "document", | |
| "with", | |
| "id", | |
| "1", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 7, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 3 | |
| ], | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 8, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| 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": "Có bao nhiêu tài liệu có mã trạng thái là ' Đã được hoàn thành ' ?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "documents", | |
| "have", | |
| "the", | |
| "status", | |
| "code", | |
| "done", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"done\"", | |
| 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": "Liệt kê mã loại tài liệu của tài liệu có id là 2 .", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "document", | |
| "type", | |
| "code", | |
| "for", | |
| "the", | |
| "document", | |
| "with", | |
| "the", | |
| "id", | |
| "2", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| 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": "Liệt kê id của các tài liệu có mã trạng thái là ' Đã được hoàn thành ' và mã loại là ' Giấy ' .", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "document", | |
| "ids", | |
| "for", | |
| "any", | |
| "documents", | |
| "with", | |
| "the", | |
| "status", | |
| "code", | |
| "done", | |
| "and", | |
| "the", | |
| "type", | |
| "code", | |
| "paper", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"done\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Paper\"", | |
| 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": "Cho biết tên của đại lý vận chuyển hiện đang nắm giữ tài liệu có id là 2 .", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "name", | |
| "of", | |
| "the", | |
| "shipping", | |
| "agent", | |
| "of", | |
| "the", | |
| "document", | |
| "with", | |
| "id", | |
| "2", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| 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": "USPS đã vận chuyển bao nhiêu tài liệu ?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "documents", | |
| "were", | |
| "shipped", | |
| "by", | |
| "USPS", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"USPS\"", | |
| 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": "Đại lý vận chuyển nào vận chuyển nhiều tài liệu nhất ? Cho biết tên của đại lý vận chuyển này và số lượng tài liệu đã được vận chuyển .", | |
| "question_toks": [ | |
| "Which", | |
| "shipping", | |
| "agent", | |
| "shipped", | |
| "the", | |
| "most", | |
| "documents", | |
| "?", | |
| "List", | |
| "the", | |
| "shipping", | |
| "agent", | |
| "name", | |
| "and", | |
| "the", | |
| "number", | |
| "of", | |
| "documents", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 4 | |
| ], | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Ngày lập biên lai của tài liệu có id 3 là ngày nào ?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "receipt", | |
| "date", | |
| "of", | |
| "the", | |
| "document", | |
| "with", | |
| "id", | |
| "3", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 16, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ], | |
| 3.0, | |
| 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": "Tài liệu có id là 4 được gửi đến địa chỉ nào ? Cho biết chi tiết về địa chỉ này", | |
| "question_toks": [ | |
| "What", | |
| "address", | |
| "was", | |
| "the", | |
| "document", | |
| "with", | |
| "id", | |
| "4", | |
| "mailed", | |
| "to", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 34, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 5, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 2 | |
| ], | |
| [ | |
| "table_unit", | |
| 10 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 6, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 33, | |
| false | |
| ], | |
| null | |
| ], | |
| 4.0, | |
| 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": "Ngày mà tài liệu có id 7 được gửi đến là ngày nào ?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "the", | |
| "mail", | |
| "date", | |
| "of", | |
| "the", | |
| "document", | |
| "with", | |
| "id", | |
| "7", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 10 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 35, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 33, | |
| false | |
| ], | |
| null | |
| ], | |
| 7.0, | |
| 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": "Liệt kê id của các tài liệu có trạng thái là ' Đã được hoàn thành ' , loại tài liệu là ' Giấy ' và đồng thời không được vận chuyển bởi đại lý vận chuyển có tên là USPS .", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "document", | |
| "ids", | |
| "of", | |
| "documents", | |
| "with", | |
| "the", | |
| "status", | |
| "done", | |
| "and", | |
| "type", | |
| "Paper", | |
| ",", | |
| "which", | |
| "not", | |
| "shipped", | |
| "by", | |
| "the", | |
| "shipping", | |
| "agent", | |
| "named", | |
| "USPS", | |
| "." | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ], | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"USPS\"", | |
| null | |
| ] | |
| ] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"done\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Paper\"", | |
| 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": "Liệt kê id của tài liệu có trạng thái là ' Đã được hoàn thành ' và loại tài liệu là ' Giấy ' , hơn nữa tài liệu này đã được vận chuyển bởi đại lý vận chuyển có tên là USPS .", | |
| "question_toks": [ | |
| "List", | |
| "document", | |
| "id", | |
| "of", | |
| "documents", | |
| "status", | |
| "is", | |
| "done", | |
| "and", | |
| "document", | |
| "type", | |
| "is", | |
| "Paper", | |
| "and", | |
| "the", | |
| "document", | |
| "is", | |
| "shipped", | |
| "by", | |
| "shipping", | |
| "agent", | |
| "named", | |
| "USPS", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 15, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 9, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 5 | |
| ], | |
| [ | |
| "table_unit", | |
| 4 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 10, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"USPS\"", | |
| null | |
| ] | |
| ] | |
| }, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 12, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 13, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"done\"", | |
| null | |
| ], | |
| "and", | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 14, | |
| false | |
| ], | |
| null | |
| ], | |
| "\"Paper\"", | |
| 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": "Chi tiết về dự thảo của tài liệu có id 7 ?", | |
| "question_toks": [ | |
| "What", | |
| "is", | |
| "draft", | |
| "detail", | |
| "of", | |
| "the", | |
| "document", | |
| "with", | |
| "id", | |
| "7", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 7 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 25, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 23, | |
| false | |
| ], | |
| null | |
| ], | |
| 7.0, | |
| 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": "Tài liệu có id 2 có bao nhiêu bản sao dự thảo ?", | |
| "question_toks": [ | |
| "How", | |
| "many", | |
| "draft", | |
| "copies", | |
| "does", | |
| "the", | |
| "document", | |
| "with", | |
| "id", | |
| "2", | |
| "have", | |
| "?" | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 8 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ], | |
| null | |
| ], | |
| 2.0, | |
| 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": "Tài liệu nào có nhiều bản sao nhất ? Liệt kê id của tài liệu này và số lượng bản sao nó có .", | |
| "question_toks": [ | |
| "Which", | |
| "document", | |
| "has", | |
| "the", | |
| "most", | |
| "draft", | |
| "copies", | |
| "?", | |
| "List", | |
| "its", | |
| "document", | |
| "id", | |
| "and", | |
| "number", | |
| "of", | |
| "draft", | |
| "copies", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 8 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 28, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 28, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Những tài liệu nào có nhiều hơn 1 bản sao dự thảo ? Liệt kê id của những tài liệu này và số lượng bản sao dự thảo tương ứng .", | |
| "question_toks": [ | |
| "Which", | |
| "documents", | |
| "have", | |
| "more", | |
| "than", | |
| "1", | |
| "draft", | |
| "copies", | |
| "?", | |
| "List", | |
| "document", | |
| "id", | |
| "and", | |
| "number", | |
| "of", | |
| "draft", | |
| "copies", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 8 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ] | |
| ], | |
| "having": [ | |
| [ | |
| false, | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| null | |
| ] | |
| ], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 26, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Liệt kê tên của tất cả các nhân viên được ghi lại trong lịch sử lưu hành của tài liệu có id 1 .", | |
| "question_toks": [ | |
| "List", | |
| "all", | |
| "employees", | |
| "in", | |
| "the", | |
| "circulation", | |
| "history", | |
| "of", | |
| "the", | |
| "document", | |
| "with", | |
| "id", | |
| "1", | |
| ".", | |
| "List", | |
| "the", | |
| "employee", | |
| "'s", | |
| "name", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 32, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ], | |
| [ | |
| "table_unit", | |
| 9 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ], | |
| 1.0, | |
| 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": "Liệt kê các nhân viên chưa xuất hiện trong lịch sử lưu hành của bất kỳ tài liệu nào . Cho biết tên của các nhân viên này .", | |
| "question_toks": [ | |
| "List", | |
| "the", | |
| "employees", | |
| "who", | |
| "have", | |
| "not", | |
| "showed", | |
| "up", | |
| "in", | |
| "any", | |
| "circulation", | |
| "history", | |
| "of", | |
| "documents", | |
| ".", | |
| "List", | |
| "the", | |
| "employee", | |
| "'s", | |
| "name", | |
| "." | |
| ], | |
| "sql": { | |
| "except": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 32, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ], | |
| [ | |
| "table_unit", | |
| 9 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| }, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Những nhân viên nào đã xuất hiện nhiều lần nhất trong lịch sử lưu hành của từng tài liệu ? Liệt kê tên của các nhân viên này và số lần từng nhân viên xuất hiện trong lịch sử lưu hành của tài liệu tương ứng .", | |
| "question_toks": [ | |
| "Which", | |
| "employee", | |
| "has", | |
| "showed", | |
| "up", | |
| "in", | |
| "most", | |
| "circulation", | |
| "history", | |
| "documents", | |
| ".", | |
| "List", | |
| "the", | |
| "employee", | |
| "'s", | |
| "name", | |
| "and", | |
| "the", | |
| "number", | |
| "of", | |
| "drafts", | |
| "and", | |
| "copies", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [ | |
| [ | |
| false, | |
| 2, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 32, | |
| false | |
| ], | |
| null | |
| ], | |
| [ | |
| 0, | |
| 19, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 6 | |
| ], | |
| [ | |
| "table_unit", | |
| 9 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| [ | |
| 0, | |
| 30, | |
| false | |
| ], | |
| [ | |
| 0, | |
| 31, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": 1, | |
| "orderBy": [ | |
| "desc", | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 3, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 21, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 0, | |
| false | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| }, | |
| { | |
| "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": "Liệt kê id của các tài liệu và số lượng nhân viên xuất hiện trong lịch sử lưu hành của từng tài liệu .", | |
| "question_toks": [ | |
| "For", | |
| "each", | |
| "document", | |
| ",", | |
| "list", | |
| "the", | |
| "number", | |
| "of", | |
| "employees", | |
| "who", | |
| "have", | |
| "showed", | |
| "up", | |
| "in", | |
| "the", | |
| "circulation", | |
| "history", | |
| "of", | |
| "that", | |
| "document", | |
| ".", | |
| "List", | |
| "the", | |
| "document", | |
| "ids", | |
| "and", | |
| "number", | |
| "of", | |
| "employees", | |
| "." | |
| ], | |
| "sql": { | |
| "except": null, | |
| "from": { | |
| "conds": [], | |
| "table_units": [ | |
| [ | |
| "table_unit", | |
| 9 | |
| ] | |
| ] | |
| }, | |
| "groupBy": [ | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ] | |
| ], | |
| "having": [], | |
| "intersect": null, | |
| "limit": null, | |
| "orderBy": [], | |
| "select": [ | |
| false, | |
| [ | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 29, | |
| false | |
| ], | |
| null | |
| ] | |
| ], | |
| [ | |
| 3, | |
| [ | |
| 0, | |
| [ | |
| 0, | |
| 32, | |
| true | |
| ], | |
| null | |
| ] | |
| ] | |
| ] | |
| ], | |
| "union": null, | |
| "where": [] | |
| } | |
| } | |
| ] |