mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 09:05:36 +01:00
implement filtering and cohorts to all relevant queries
This commit is contained in:
parent
789b8b36d8
commit
2f1f704728
34 changed files with 311 additions and 167 deletions
|
|
@ -27,7 +27,7 @@ async function relationalQuery(
|
|||
const { column, startDate, endDate } = parameters;
|
||||
const { parseFilters, rawQuery } = prisma;
|
||||
|
||||
const { filterQuery, cohortQuery, queryParams } = parseFilters({
|
||||
const { filterQuery, joinSessionQuery, cohortQuery, queryParams } = parseFilters({
|
||||
...filters,
|
||||
websiteId,
|
||||
startDate,
|
||||
|
|
@ -40,6 +40,7 @@ async function relationalQuery(
|
|||
select ${column} utm, count(*) as views
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
${joinSessionQuery}
|
||||
where website_id = {{websiteId::uuid}}
|
||||
and created_at between {{startDate}} and {{endDate}}
|
||||
and coalesce(${column}, '') != ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue