SQL Server分数排序

1、并列排名

1 select 
2 IRID, 
3 ModelID,
4 mingci=DENSE_RANK() over(order by ModelID) 
5 from QuestionaryResult 
6 where MODELID is not null

 

 

2、顺序排名

1 SELECT 
2 ROW_NUMBER() OVER (ORDER BY MODELID)AS Number ,
3 ModelID
4 FROM QuestionaryResult WHERE MODELID=98

 

posted @   #不归路#。。。。  阅读(248)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示