Обновить hardwareAvailabilityReport.sql
This commit is contained in:
@@ -54,7 +54,7 @@ checks_with_prev AS (
|
|||||||
SELECT
|
SELECT
|
||||||
*,
|
*,
|
||||||
LAG(status) OVER (PARTITION BY host_name ORDER BY check_time) AS prev_status,
|
LAG(status) OVER (PARTITION BY host_name ORDER BY check_time) AS prev_status,
|
||||||
coalesce(lead(check_time) OVER (PARTITION BY host_name ORDER BY check_time), date_trunc('day', check_time) + interval '1 day') AS next_check_time
|
coalesce(lead(check_time) OVER (PARTITION BY host_name ORDER BY check_time), now()) AS next_check_time
|
||||||
FROM checks
|
FROM checks
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user