mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +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
|
|
@ -40,7 +40,7 @@ async function relationalQuery(
|
|||
filters: QueryFilters,
|
||||
): Promise<ChannelExpandedMetricsData[]> {
|
||||
const { rawQuery, parseFilters } = prisma;
|
||||
const { queryParams, filterQuery, cohortQuery, dateQuery } = parseFilters({
|
||||
const { queryParams, filterQuery, joinSessionQuery, cohortQuery, dateQuery } = parseFilters({
|
||||
...filters,
|
||||
websiteId,
|
||||
eventType: EVENT_TYPE.pageView,
|
||||
|
|
@ -65,8 +65,8 @@ async function relationalQuery(
|
|||
count(distinct session_id) y
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
${joinSessionQuery}
|
||||
where website_id = {{websiteId::uuid}}
|
||||
and event_type = {{eventType}}
|
||||
${dateQuery}
|
||||
${filterQuery}
|
||||
group by 1, 2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue