diff --git a/DSL/Resql/chat-count-only-chatbot.sql b/DSL/Resql/chat-count-only-chatbot.sql index fdd677b1..0b415993 100644 --- a/DSL/Resql/chat-count-only-chatbot.sql +++ b/DSL/Resql/chat-count-only-chatbot.sql @@ -2,7 +2,7 @@ SELECT DATE_TRUNC(:period, created) AS time, COUNT(DISTINCT base_id) AS count FROM chat -WHERE created::date BETWEEN :start::date AND :end::date +WHERE created::date BETWEEN :start::date AND :end::date AND status = 'ENDED' AND NOT EXISTS ( SELECT 1 FROM message diff --git a/DSL/Resql/chat-count-with-csa-and-chatbot.sql b/DSL/Resql/chat-count-with-csa-and-chatbot.sql index 72bfe151..3d8b059e 100644 --- a/DSL/Resql/chat-count-with-csa-and-chatbot.sql +++ b/DSL/Resql/chat-count-with-csa-and-chatbot.sql @@ -3,7 +3,7 @@ WITH chatbot_chats AS ( DATE_TRUNC(:period, created) AS time, COUNT(DISTINCT base_id) AS count FROM chat - WHERE created::date BETWEEN :start::date AND :end::date + WHERE created::date BETWEEN :start::date AND :end::date AND status = 'ENDED' AND NOT EXISTS ( SELECT 1 FROM message @@ -17,7 +17,7 @@ csa_chats AS ( DATE_TRUNC(:period, created) AS time, COUNT(DISTINCT base_id) AS count FROM chat - WHERE created::date BETWEEN :start::date AND :end::date + WHERE created::date BETWEEN :start::date AND :end::date AND status = 'ENDED' AND EXISTS ( SELECT 1 FROM message diff --git a/DSL/Resql/chat-count-with-csa.sql b/DSL/Resql/chat-count-with-csa.sql index ace73bb9..e89391f3 100644 --- a/DSL/Resql/chat-count-with-csa.sql +++ b/DSL/Resql/chat-count-with-csa.sql @@ -2,7 +2,7 @@ SELECT DATE_TRUNC(:period, created) AS time, COUNT(DISTINCT base_id) AS count FROM chat -WHERE created::date BETWEEN :start::date AND :end::date +WHERE created::date BETWEEN :start::date AND :end::date AND status = 'ENDED' AND EXISTS ( SELECT 1 FROM message diff --git a/README.md b/README.md index 64a47e4d..40d8f6f1 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ Currently, Header and Main Navigation used as external components, they are defi ``` curl -X POST -H "Content-Type: application/json" -d '{ "login": "EE30303039914", - "password": "" + "password": "OK" }' http://localhost:8080/auth/login ```