select 会员号 from 表where datediff(dd,消费时间, getdate() )<=90 and datediff(dd,消费时间, getdate() )>=0 group by 会员号 having count(1)=2
select 会员号 from 表where 消费时间 between dateadd(day,-90,getdate()) and getdate() group by 会员号 having count(*)>=2