use uuid
This commit is contained in:
@@ -22,8 +22,9 @@ async function relationalQuery(websiteId, { startDate, endDate, column, table, f
|
||||
return rawQuery(
|
||||
`select ${column} x, count(*) y
|
||||
from ${table}
|
||||
${` join website on ${table}.website_id = website.website_id`}
|
||||
${joinSession}
|
||||
where ${table}.website_id=$1
|
||||
where website.website_uuid='${websiteId}'
|
||||
and ${table}.created_at between $2 and $3
|
||||
${pageviewQuery}
|
||||
${joinSession && sessionQuery}
|
||||
|
||||
@@ -22,8 +22,9 @@ async function relationalQuery(websiteId, start_at, end_at, column, table, filte
|
||||
`select url x,
|
||||
count(*) y
|
||||
from ${table}
|
||||
${` join website on ${table}.website_id = website.website_id`}
|
||||
${joinSession}
|
||||
where ${table}.website_id=$1
|
||||
where website.website_uuid='${websiteId}'
|
||||
and ${table}.created_at between $2 and $3
|
||||
and ${table}.url like '%?%'
|
||||
${pageviewQuery}
|
||||
|
||||
@@ -34,8 +34,10 @@ async function relationalQuery(
|
||||
`select ${getDateQuery('pageview.created_at', unit, timezone)} t,
|
||||
count(${count !== '*' ? `${count}${sessionKey}` : count}) y
|
||||
from pageview
|
||||
join website
|
||||
on pageview.website_id = website.website_id
|
||||
${joinSession}
|
||||
where pageview.website_id=$1
|
||||
where website.website_uuid='${websiteId}'
|
||||
and pageview.created_at between $2 and $3
|
||||
${pageviewQuery}
|
||||
${sessionQuery}
|
||||
|
||||
Reference in New Issue
Block a user