Fix null and string return types from getWebsiteStats
This commit is contained in:
@@ -36,11 +36,11 @@ async function relationalQuery(
|
|||||||
return rawQuery(
|
return rawQuery(
|
||||||
`
|
`
|
||||||
select
|
select
|
||||||
sum(t.c) as "pageviews",
|
cast(coalesce(sum(t.c), 0) as bigint) as "pageviews",
|
||||||
count(distinct t.session_id) as "visitors",
|
count(distinct t.session_id) as "visitors",
|
||||||
count(distinct t.visit_id) as "visits",
|
count(distinct t.visit_id) as "visits",
|
||||||
sum(case when t.c = 1 then 1 else 0 end) as "bounces",
|
coalesce(sum(case when t.c = 1 then 1 else 0 end), 0) as "bounces",
|
||||||
sum(${getTimestampDiffSQL('t.min_time', 't.max_time')}) as "totaltime"
|
cast(coalesce(sum(${getTimestampDiffSQL('t.min_time', 't.max_time')}), 0) as bigint) as "totaltime"
|
||||||
from (
|
from (
|
||||||
select
|
select
|
||||||
website_event.session_id,
|
website_event.session_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user