sql2005增加伪序列号

select zhongjie,num,ROW_NUMBER()over(order by num desc) as rn from ( select zhongjie,count(zhongjie) as num from table1 where signdate>='2013-2-1 0:00:00' and signdate<='2013-2-28 23:59:59' group by zhongjie  )as t1 where zhongjie<>'www' order by num desc

posted @ 2013-03-25 10:07  冰城小菜刀  阅读(170)  评论(0编辑  收藏  举报