Skip to content

Commit

Permalink
Show analytics only for ended conversations (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
Minwasko authored Oct 23, 2024
1 parent 32bf9be commit 8f06ba8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
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

0 comments on commit 8f06ba8

Please sign in to comment.