Skip to content

Commit 445be17

Browse files
authored
Merge pull request #572 from 1AhmedYasser/Fix-Total-chat-queries-review
Fix: Total chat queries review
2 parents 5a57b9b + 652b4d6 commit 445be17

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎DSL/Resql/analytics/POST/overview-total-chats.sql‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
WITH latest_per_base AS (
2-
SELECT DISTINCT ON (c.base_id) c.*
2+
SELECT DISTINCT ON (c.base_id)
3+
DATE_TRUNC('day', c.ended) AS time,
4+
c.base_id,
5+
c.test,
6+
c.end_user_url,
7+
c.ended,
8+
c.updated
39
FROM chat c
10+
WHERE c.status = 'ENDED'
411
ORDER BY c.base_id, c.updated DESC
512
),
613
chats AS (

0 commit comments

Comments
 (0)