select userip,count(*) from UserLogInfo_tbl
where usercreatedate between dateadd(minute,-10,getdate()) and getdate()
group by userip

解决方案 »

  1.   

    select count(*) from UserLogInfo_tbl where userip='10.10.1.1' and datediff(mi,usercreatedate,getdate())<10
      

  2.   

    select userip userip,count(userip) 数目 from UserLogInfo_tbl
    where usercreatedate between dateadd(minute,-10,getdate()) and getdate()
    group by userip
      

  3.   

    select count(*) as  个数 from UserLogInfo_tbl where userip = '' and 
    usercreatedate >= convert(convert(usercreatedate,int)-10,datetime)
      

  4.   

    select count(*) from userloginto_tbl where usercreatedate between @starttime and @endtime
      

  5.   


    select ip,count(*) from UserLogInfo_tbl
    where datediff(minute,usercreatedate,getdate())<=10
    group by ip