Обновить hardwareAvailabilityReport.sql

This commit is contained in:
2026-06-29 15:40:21 +00:00
parent b7d56e7b52
commit 0b1540238a
+1 -1
View File
@@ -54,7 +54,7 @@ checks_with_prev AS (
SELECT
*,
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
),