-1
select max(a.totalgoal)as 'MAXIMUM goles',p_id
from 
(select playerperform.p_id, SUM (playerperform.score)as totalgoal from playerperform  
Group by p_id)as a
4

1 に答える 1

1

RANK()SQL Server では、次の関数を使用できます。

SELECT *
from (select playerperform.p_id, SUM (playerperform.score)as totalgoal, RANK() OVER(ORDER BY SUM(playerperform.score)DESC) Rnk
      from playerperform  
      Group by p_id
      )as a
WHERE Rnk = 1
于 2013-10-24T19:46:10.187 に答える