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 @ 2020-07-23 17:16  #不归路#。。。。  阅读(248)  评论(0编辑  收藏  举报