鸟寅

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

编辑器加载中...

 alter view V_OnlineCountArg
 as 
 select  avg(count) count , xDate
  from (select a.[count],convert(nvarchar(100),a.gettime,23) xDate,
               row_number() over(partition by convert(nvarchar(100),a.gettime,23) order by a.[count] desc, convert(nvarchar(100),a.gettime,23)) rn
          from playersCountlog a) tbl
 where tbl.rn <= 72 group by xDate

  

posted on 2011-12-09 10:02  nywd  阅读(200)  评论(0编辑  收藏  举报