摘要:
--查询出各类排名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 阅读全文