update time blocks to hour instead of day

This commit is contained in:
Francis Cao 2024-01-08 11:42:38 -08:00
parent a13856d325
commit 37f6102ce2

View File

@ -31,7 +31,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
from ( from (
select select
website_event.session_id, website_event.session_id,
${getDateQuery('website_event.created_at', 'day')}, ${getDateQuery('website_event.created_at', 'hour')},
count(*) as "c", count(*) as "c",
min(website_event.created_at) as "min_time", min(website_event.created_at) as "min_time",
max(website_event.created_at) as "max_time" max(website_event.created_at) as "max_time"
@ -70,7 +70,7 @@ async function clickhouseQuery(
from ( from (
select select
session_id, session_id,
${getDateQuery('created_at', 'day')} time_series, ${getDateQuery('created_at', 'hour')} time_series,
count(*) c, count(*) c,
min(created_at) min_time, min(created_at) min_time,
max(created_at) max_time max(created_at) max_time