Skip to content

Commit cbf47d5

Browse files
committed
use website_event_stats_hourly view for excludeBounceQuery
1 parent 5267222 commit cbf47d5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib/clickhouse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ function getExcludeBounceQuery(filters: Record<string, any>) {
138138

139139
return `join
140140
(select distinct session_id, visit_id
141-
from website_event
141+
from website_event_stats_hourly
142142
where website_id = {websiteId:UUID}
143143
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
144144
and event_type = 1
145145
group by session_id, visit_id
146-
having count(*) > 1
146+
having sum(views) > 1
147147
) excludeBounce
148148
on excludeBounce.session_id = website_event.session_id
149149
and excludeBounce.visit_id = website_event.visit_id

0 commit comments

Comments
 (0)