This commit is contained in:
Dona Maria Absi
2025-05-14 14:11:36 +03:00
parent c06be4736c
commit 92ee6ee951

View File

@ -1,3 +1,4 @@
WITH params AS (
SELECT
TO_DATE(NULLIF($1, ''), 'YYYY-MM-DD') AS event_date,
@ -98,7 +99,7 @@ SELECT occupied_seconds_per_day.space_id,
occupied_seconds_per_day.occupancy_prct
FROM occupied_seconds_per_day
join params p on true
and p.space_uuid = occupied_seconds_per_day.space_id
and p.space_id = occupied_seconds_per_day.space_id
and p.event_date = occupied_seconds_per_day.event_date
ORDER BY 1,2
)