mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 21:57:16 +01:00
v3 prisma queries update
This commit is contained in:
parent
61b667c587
commit
2ffde37f5b
21 changed files with 119 additions and 108 deletions
|
|
@ -30,15 +30,15 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
|||
return rawQuery(
|
||||
`
|
||||
WITH prefix AS (
|
||||
select case when utm_medium LIKE 'p%' OR
|
||||
utm_medium LIKE '%ppc%' OR
|
||||
utm_medium LIKE '%retargeting%' OR
|
||||
utm_medium LIKE '%paid%' then 'paid' else 'organic' end prefix,
|
||||
referrer_domain,
|
||||
url_query,
|
||||
utm_medium,
|
||||
utm_source,
|
||||
session_id
|
||||
select case when website_event.utm_medium LIKE 'p%' OR
|
||||
website_event.utm_medium LIKE '%ppc%' OR
|
||||
website_event.utm_medium LIKE '%retargeting%' OR
|
||||
website_event.utm_medium LIKE '%paid%' then 'paid' else 'organic' end prefix,
|
||||
website_event.referrer_domain,
|
||||
website_event.url_query,
|
||||
website_event.utm_medium,
|
||||
website_event.utm_source,
|
||||
website_event.session_id
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
${joinSessionQuery}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue