根据天数统计不同IP登陆次数

select convert(varchar(100),dtime,23)  as dtime,count(distinct dip) as number

from oplog where dtime between '2010-05-06' and '2010-08-07'

group by convert(varchar(100),dtime,23) order by dtime asc

 

oplog 日志表 dtime 日期字段 dip IP字段

你可能感兴趣的:(2010)