可以使用以下语句来实现: SELECT MIN(date), MAX(date) FROM table GROUP BY date - ROW_NUMBER() OVER (ORDER BY date)