SELECT a.team,MIN(Y),MAX(Y) from (SELECT ROW_NUMBER() OVER(ORDER BY team,Y) AS RN,* FROM t) AS a GROUP BY a.team,Y-a.RN HAVING COUNT(Y)>1
2024-01-01 23:47:10
SELECT a.team,MIN(Y),MAX(Y) from (SELECT ROW_NUMBER() OVER(ORDER BY team,Y) AS RN,* FROM t) AS a GROUP BY a.team,Y-a.RN HAVING COUNT(Y)>1