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