mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 10:25:23 +00:00
bug fix
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
WITH params AS (
|
WITH params AS (
|
||||||
SELECT
|
SELECT
|
||||||
TO_DATE(NULLIF($1, ''), 'YYYY-MM-DD') AS event_date,
|
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
|
occupied_seconds_per_day.occupancy_prct
|
||||||
FROM occupied_seconds_per_day
|
FROM occupied_seconds_per_day
|
||||||
join params p on true
|
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
|
and p.event_date = occupied_seconds_per_day.event_date
|
||||||
ORDER BY 1,2
|
ORDER BY 1,2
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user