摘要: --查询出各类排名SELECT orderid,qty, ROW_NUMBER() OVER(ORDER BY qty) AS rownumber,--序号 RANK() OVER(ORDER BY qty) AS [rank],--断开的排名 DENSE_RANK() OVER(ORDER BY qty) AS denserank ,--连续的排名 NTILE(4) OVER(ORDER BY qty) AS [NTILE]--均分成四个数组FROM rankorderORDER BY qty 阅读全文
posted @ 2013-07-17 21:00 Tom Fan 阅读(194) 评论(0) 推荐(0) 编辑