Cohort selection.

This commit is contained in:
Mike Cao committed 2025-08-28 23:29:42 -07:00
1 parent 05f9a67727
commit bab4f8ebcc
32 files changed
+841 -655

No files matched your search

@@ -106,7 +106,7 @@ async function clickhouseQuery(websiteId: string, filters: QueryFilters) {
${getDateStringSQL('min(created_at)')} as firstAt,
${getDateStringSQL('max(created_at)')} as lastAt,
uniq(visit_id) as visits,
sumIf(views, event_type = 1) as views,
sumIf(1, event_type = 1) as views,
lastAt as createdAt
from website_event
${cohortQuery}