We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
SELECT
hacker_id
,NAME
, SUM(MAX_SCORE) AS total_score
FROM
(
SELECT
S.hacker_id
,H.NAME
,S.challenge_id
,MAX(S.SCORE) AS MAX_SCORE
FROM
Submissions S
INNER JOIN
Hackers H
ON
S.hacker_id = H.hacker_id
GROUP BY
S.hacker_id
,H.NAME
,S.challenge_id
) AS VIN
GROUP BY
hacker_id
,NAME
HAVING
SUM(MAX_SCORE) > 0
ORDER BY
3 DESC,1
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Contest Leaderboard
You are viewing a single comment's thread. Return to all comments →
SELECT hacker_id ,NAME , SUM(MAX_SCORE) AS total_score FROM ( SELECT S.hacker_id ,H.NAME ,S.challenge_id ,MAX(S.SCORE) AS MAX_SCORE FROM Submissions S INNER JOIN Hackers H ON S.hacker_id = H.hacker_id GROUP BY S.hacker_id ,H.NAME ,S.challenge_id ) AS VIN
GROUP BY hacker_id ,NAME HAVING SUM(MAX_SCORE) > 0 ORDER BY 3 DESC,1