This question shows research effort; it is useful and clear
-1
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
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
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