Skip to content

Commit

Permalink
Revert session stats change.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Aug 22, 2024
1 parent 8f934d2 commit 60f1b7b
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/queries/analytics/sessions/getSessionStats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,14 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
return rawQuery(
`
select
${getDateSQL('g.created_at', unit, timezone)} as x,
count(distinct g.session_id) as y
from (
select
website_event.session_id,
min(website_event.created_at) as created_at,
count(*) y
from website_event
${getDateSQL('website_event.created_at', unit, timezone)} x,
count(distinct website_event.session_id) y
from website_event
${joinSession}
where website_event.website_id = {{websiteId::uuid}}
where website_event.website_id = {{websiteId::uuid}}
and website_event.created_at between {{startDate}} and {{endDate}}
and event_type = {{eventType}}
and event_type = {{eventType}}
${filterQuery}
group by website_event.session_id, website_event.created_at
) as g
group by 1
`,
params,
Expand Down

0 comments on commit 60f1b7b

Please sign in to comment.