mirror of
https://github.com/SyncrowIOT/data.git
synced 2025-08-25 11:39:39 +00:00
name change
This commit is contained in:
@ -86,7 +86,7 @@ WITH start_date AS (
|
|||||||
GREATEST(0, LEAST(86400, SUM(EXTRACT(EPOCH FROM (t.end_time - t.start_time))) -
|
GREATEST(0, LEAST(86400, SUM(EXTRACT(EPOCH FROM (t.end_time - t.start_time))) -
|
||||||
COALESCE(SUM(e.missing_seconds), 0))) AS total_presence_seconds,
|
COALESCE(SUM(e.missing_seconds), 0))) AS total_presence_seconds,
|
||||||
TO_CHAR(INTERVAL '1 second' * GREATEST(0, LEAST(86400, SUM(EXTRACT(EPOCH FROM (t.end_time - t.start_time))) -
|
TO_CHAR(INTERVAL '1 second' * GREATEST(0, LEAST(86400, SUM(EXTRACT(EPOCH FROM (t.end_time - t.start_time))) -
|
||||||
COALESCE(SUM(e.missing_seconds), 0))), 'HH24:MI:SS') AS total_presence_duration
|
COALESCE(SUM(e.missing_seconds), 0))), 'HH24:MI:SS') AS total_presence_formatted
|
||||||
FROM time_intervals t
|
FROM time_intervals t
|
||||||
LEFT JOIN expanded_overlapping_none_presence e
|
LEFT JOIN expanded_overlapping_none_presence e
|
||||||
ON t.space_id = e.space_id
|
ON t.space_id = e.space_id
|
||||||
|
Reference in New Issue
Block a user