mirror of
https://github.com/SyncrowIOT/data.git
synced 2025-11-26 08:14:56 +00:00
minor fixes, that caused errors during import
This commit is contained in:
@ -35,7 +35,7 @@ time_differences AS (
|
||||
event_time::date AS event_date,
|
||||
EXTRACT(EPOCH FROM (event_time - COALESCE(prev_timestamp, event_time))) AS time_diff_in_seconds
|
||||
FROM start_date
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
duration as (
|
||||
|
||||
@ -17,7 +17,7 @@ WITH device_logs AS (
|
||||
ORDER BY "device-status-log".event_time) AS prev_value
|
||||
FROM device
|
||||
LEFT JOIN "device-status-log"
|
||||
ON device.uuid::text = "device-status-log".device_id
|
||||
ON device.uuid = "device-status-log".device_id::uuid
|
||||
LEFT JOIN product
|
||||
ON product.uuid = device.product_device_uuid
|
||||
WHERE product.cat_name = 'hps'
|
||||
@ -56,7 +56,7 @@ SELECT
|
||||
COUNT(DISTINCT device.uuid) AS count_device
|
||||
FROM device
|
||||
INNER JOIN "device-status-log"
|
||||
ON device.uuid::text = "device-status-log".device_id::text
|
||||
ON device.uuid = "device-status-log".device_id::uuid
|
||||
LEFT JOIN product
|
||||
ON product.uuid = device.product_device_uuid
|
||||
left join presence_detection_summary as pds
|
||||
|
||||
Reference in New Issue
Block a user