[ { "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": "Welche Dokumentstatuscodes haben wir?", "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": "Wie lautet die Beschreibung des Dokumentstatuscodes \"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": "Welche Dokumenttypcodes haben wir?", "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": "Wie lautet die Beschreibung des Dokumenttyps \"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": "Wie heißen die Spediteure?", "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": "Wie lautet der Code des Spediteurs von \"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": "Was sind alle Rollencodes?", "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": "Was ist die Beschreibung des Rollencodes \"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": "Wie viele Mitarbeiter haben wir?", "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": "Welche Rolle spielt der Mitarbeiter namens \"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": "Listen Sie alle Dokument-IDs und Empfangsdaten von Dokumenten auf.", "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": "Wie viele Mitarbeiter hat jede Rolle? Rollenbeschreibung, ID und Anzahl der Mitarbeiter auflisten.", "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": "Listen Sie Rollen mit mehr als einem Mitarbeiter auf. Listen Sie die Rollenbeschreibung und die Anzahl der Mitarbeiter auf.", "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": "Wie lautet die Dokumentstatusbeschreibung des Dokuments mit der 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": "Wie viele Dokumente hat der Statuscode erstellt?", "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": "Listen Sie den Dokumenttypcode für das Dokument mit der ID 2 auf.", "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": "Listen Sie die Dokument-IDs für alle Dokumente mit dem Statuscode und dem Typcode-Papier auf.", "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": "Wie heißt der Spediteur des Dokuments mit der 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": "Wie viele Dokumente wurden von \"USPS\" versendet?", "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": "Welcher Spediteur hat die meisten Dokumente verschickt? Geben Sie den Namen des Spediteurs und die Anzahl der Dokumente an.", "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": "Was ist das Eingangsdatum des Dokuments mit 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": "An welche Adresse wurde das Dokument mit der ID 4 gesendet?", "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": "Was ist das Versanddatum des Dokuments mit der 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": "Listen Sie die Dokument-IDs von Dokumenten mit dem Status Fertig auf und geben Sie \"Paper\" ein, das nicht vom Versandagenten mit dem Namen \"USPS\" versendet wurde.", "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": "Die Liste der Dokument-IDs des Dokumentenstatus ist abgeschlossen und der Dokumenttyp ist \"Paper\". Das Dokument wird vom Versandagenten mit dem Namen \"USPS\" versendet.", "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": "Was ist der Detailentwurf des Dokuments mit der 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": "Wie viele Entwurfskopien hat das Dokument mit der 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": "Welches Dokument hat die meisten Entwurfskopien? Listen Sie die Dokument-ID und die Anzahl der Entwurfskopien auf.", "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": "Welche Dokumente haben mehr als 1 Entwurfskopien? Listen Sie die Dokument-ID und die Anzahl der Entwurfskopien auf.", "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": "Listen Sie alle Mitarbeiter in der Auflagenhistorie des Dokuments mit der ID 1 auf. Geben Sie den Namen des Mitarbeiters an.", "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": "Listen Sie die Mitarbeiter auf, die in keiner Auflagenhistorie von Dokumenten aufgetaucht sind. Listen Sie den Namen des Mitarbeiters auf.", "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": "Welcher Mitarbeiter ist in den meisten Dokumenten zur Auflagenhistorie aufgetaucht? Listen Sie den Namen des Mitarbeiters und die Anzahl der Entwürfe und Kopien auf.", "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": "Geben Sie für jedes Dokument die Anzahl der Mitarbeiter an, die in der Auflagenhistorie dieses Dokuments aufgetaucht sind. Listen Sie die Dokument-IDs und die Anzahl der Mitarbeiter auf.", "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 } } ]