Fix date, we need whole day

This commit is contained in:
Jan Kvetina 2021-12-24 11:44:22 +01:00
parent 6d7419875c
commit bea8980457

View File

@ -20,7 +20,7 @@ l AS (
FROM logs l FROM logs l
JOIN s JOIN s
ON l.created_at >= s.today ON l.created_at >= s.today
AND l.created_at < s.today AND l.created_at < s.today + 1
AND s.app_id = l.app_id AND s.app_id = l.app_id
GROUP BY l.session_id GROUP BY l.session_id
), ),
@ -31,7 +31,7 @@ b AS (
FROM logs_events l FROM logs_events l
JOIN s JOIN s
ON l.created_at >= s.today ON l.created_at >= s.today
AND l.created_at < s.today AND l.created_at < s.today + 1
AND s.app_id = l.app_id AND s.app_id = l.app_id
GROUP BY l.session_id GROUP BY l.session_id
) )