sql 通过group by、sum聚合查询结果的排序

SELECT PeopleID,People,

  sum(Score) as Score,

   'Rank' =dense_rank() over(order by SUM(Score) desc)

FROM [dbo].[IntegralInputDetail]

GROUP BY PeopleID,People
ORDER BY Score desc

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