mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
v3 prisma queries update
This commit is contained in:
parent
61b667c587
commit
2ffde37f5b
21 changed files with 119 additions and 108 deletions
|
|
@ -42,26 +42,26 @@ async function relationalQuery(
|
|||
|
||||
return rawQuery(
|
||||
`
|
||||
select count(*) as num,
|
||||
select count(distinct website_event.session_id) as num,
|
||||
(
|
||||
select count(distinct session_id)
|
||||
select count(distinct website_event.session_id)
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
${joinSessionQuery}
|
||||
where website_id = {{websiteId::uuid}}
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
${dateQuery}
|
||||
${filterQuery}
|
||||
) as total
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
${joinSessionQuery}
|
||||
where website_id = {{websiteId::uuid}}
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
and ${column} = {{value}}
|
||||
${dateQuery}
|
||||
${filterQuery}
|
||||
`,
|
||||
queryParams,
|
||||
);
|
||||
).then(results => results?.[0]);
|
||||
}
|
||||
|
||||
async function clickhouseQuery(
|
||||
|
|
@ -84,7 +84,7 @@ async function clickhouseQuery(
|
|||
|
||||
return rawQuery(
|
||||
`
|
||||
select count(*) as num,
|
||||
select count(distinct session_id) as num,
|
||||
(
|
||||
select count(distinct session_id)
|
||||
from website_event
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue