Skip to content

Commit b6cd6a5

Browse files
authored
Update server-utilization-time.sql
1 parent 12a1848 commit b6cd6a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MySQL/server-utilization-time.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WITH diff_cte AS (
66
SELECT TIMESTAMPDIFF(SECOND, status_time, (LEAD(status_time) OVER w)) AS diff,
77
session_status
88
FROM servers
9-
WINDOW w AS (PARTITION BY server_id ORDER BY status_time, session_status)
9+
WINDOW w AS (PARTITION BY server_id ORDER BY status_time)
1010
)
1111

1212
SELECT FLOOR(SUM(diff) / 86400) AS total_uptime_days

0 commit comments

Comments
 (0)