Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show analytics only for ended conversations #321

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DSL/Resql/chat-count-only-chatbot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions DSL/Resql/chat-count-with-csa-and-chatbot.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion DSL/Resql/chat-count-with-csa.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down