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,
SUM(max_score) AS sumscore
FROM (
SELECT
hacker_id,
challenge_id,
MAX(score) AS max_score
FROM submissions
GROUP BY hacker_id, challenge_id
) AS max_scores
GROUP BY hacker_id
HAVING SUM(max_score) > 0
) AS h1
JOIN hackers AS h2 ON h1.hacker_id = h2.hacker_id
order by h1.sumscore DESC, h1.hacker_id ASC;
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 h1.hacker_id, h2.name, h1.sumscore
FROM (
) AS max_scores
) AS h1 JOIN hackers AS h2 ON h1.hacker_id = h2.hacker_id order by h1.sumscore DESC, h1.hacker_id ASC;