sql查询连续三天之内都有记录的人员!!

select name from
testB a where
exists
(
   select * from testB b
   where b.InsertTime = DATEADD(D,1,a.InsertTime) and a.name=b.name
)
and
exists
(
   select * from testB b
   where b.InsertTime = DATEADD(D,2,a.InsertTime) and a.name=b.name
)
group by name

相关文章:

  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-16
  • 2021-12-16
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
相关资源
相似解决方案