cleanup cohort/filtering for some queries

This commit is contained in:
Francis Cao
2025-08-12 16:13:44 -07:00
parent 6829d96862
commit 69aa4ca035
7 changed files with 17 additions and 20 deletions

View File

@@ -58,7 +58,7 @@ async function relationalQuery(
limit ${limit}
offset ${offset}
`,
queryParams,
{ ...queryParams, ...parameters },
);
}
@@ -80,15 +80,15 @@ async function clickhouseQuery(
`select ${column} x,
count(*) as y
from website_event
${cohortQuery}
${cohortQuery}
where website_id = {websiteId:UUID}
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
${filterQuery}
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
${filterQuery}
group by x
order by y desc
limit ${limit}
offset ${offset}
`,
queryParams,
{ ...queryParams, ...parameters },
);
}