我目前拥有的数据类似于下面的表格:
UserId VisitDate
1 2012-01-01 00:15:00.000
1 2012-01-01 00:16:00.000
1 2012-01-12 00:15:00.000
1 2012-01-12 00:16:00.000
1 2012-01-24 00:15:00.000
1 2012-01-24 00:16:00.000
我想只返回相隔 10 天或更长时间的结果,看起来像这样:
UserId VisitDate
1 2012-01-01 00:15:00.000
1 2012-01-12 00:15:00.000
1 2012-01-24 00:15:00.000
也许比我做的更简单,但是如何在 transact-sql 中这样做呢?