3.1 relational bug fixes
This commit is contained in:
@@ -82,6 +82,7 @@ async function relationalQuery(
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
and website_event.created_at between {{startDate}} and {{endDate}}
|
||||
and website_event.event_type NOT IN (2, 5)
|
||||
and ${column} != ''
|
||||
${excludeDomain}
|
||||
${filterQuery}
|
||||
group by 1
|
||||
@@ -142,6 +143,7 @@ async function clickhouseQuery(
|
||||
where website_id = {websiteId:UUID}
|
||||
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
|
||||
and event_type NOT IN (2, 5)
|
||||
and ${column} != ''
|
||||
${excludeDomain}
|
||||
${filterQuery}
|
||||
group by x
|
||||
|
||||
@@ -25,11 +25,11 @@ async function relationalQuery(websiteId: string, filters: QueryFilters, session
|
||||
|
||||
const joinQuery =
|
||||
filterQuery || cohortQuery
|
||||
? `join (select distinct website_id, session_id, visit_id
|
||||
? `join (select distinct website_event.website_id, website_event.session_id, website_event.visit_id
|
||||
from website_event
|
||||
${cohortQuery}
|
||||
where website_id = {{websiteId::uuid}}
|
||||
and created_at between {{startDate}} and {{endDate}}
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
and website_event.created_at between {{startDate}} and {{endDate}}
|
||||
${filterQuery}) website_event
|
||||
on website_event.website_id = sr.website_id
|
||||
and website_event.session_id = sr.session_id
|
||||
|
||||
@@ -58,8 +58,9 @@ async function relationalQuery(
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
and website_event.created_at between {{startDate}} and {{endDate}}
|
||||
and website_event.event_type NOT IN (2, 5)
|
||||
and ${column} != ''
|
||||
${filterQuery}
|
||||
group by 1
|
||||
group by 1
|
||||
${includeCountry ? ', 3' : ''}
|
||||
order by 2 desc
|
||||
limit ${limit}
|
||||
@@ -102,8 +103,9 @@ async function clickhouseQuery(
|
||||
where website_id = {websiteId:UUID}
|
||||
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
|
||||
and event_type NOT IN (2, 5)
|
||||
and ${column} != ''
|
||||
${filterQuery}
|
||||
group by x
|
||||
group by x
|
||||
${includeCountry ? ', country' : ''}
|
||||
order by y desc
|
||||
limit ${limit}
|
||||
@@ -121,6 +123,7 @@ async function clickhouseQuery(
|
||||
where website_id = {websiteId:UUID}
|
||||
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
|
||||
and event_type NOT IN (2, 5)
|
||||
and ${column} != ''
|
||||
${filterQuery}
|
||||
group by x
|
||||
${includeCountry ? ', country' : ''}
|
||||
|
||||
Reference in New Issue
Block a user