来源:https://stackoverflow.com/questions/64619087/sql-convert-time-series-events-into-on-off-pairs-handling-potential-missing-o 标签 sql sql-server tsql datetime gaps-and-islands