Skip to content
RED SAGSkills
hard20 pts · first answer countswindow-functionssqlgaps-and-islands

Runs of the same machine status

Statuses by minute are UP, UP, DOWN, DOWN, UP. You compute ROW_NUMBER() OVER (ORDER BY ts) - ROW_NUMBER() OVER (PARTITION BY status ORDER BY ts). What does grouping by status and this difference give?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions