Merge pull request #2981 from pinkli/master

bugfix: events count amend #2980
This commit is contained in:
Mike Cao 2024-09-26 16:46:57 -07:00 committed by GitHub
commit 214396f4b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,7 +47,7 @@ async function relationalQuery(websiteId: string, sessionId: string) {
min(website_event.created_at) as min_time,
max(website_event.created_at) as max_time,
sum(case when website_event.event_type = 1 then 1 else 0 end) as views,
sum(case when website_event.event_type = 1 then 1 else 0 end) as events
sum(case when website_event.event_type = 2 then 1 else 0 end) as events
from session
join website_event on website_event.session_id = session.session_id
where session.website_id = {{websiteId::uuid}}