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 h.hacker_id, h.name, sum(t1.max_score) as total_score
from (
select s.hacker_id, s.challenge_id, max(s.score) as max_score
from Submissions as s
group by s.hacker_id, s.challenge_id
) as t1
join Hackers as h
on h.hacker_id = t1.hacker_id
group by h.hacker_id, h.name
having sum(t1.max_score) > 0
order by total_score desc, h.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 h.hacker_id, h.name, sum(t1.max_score) as total_score from ( select s.hacker_id, s.challenge_id, max(s.score) as max_score from Submissions as s group by s.hacker_id, s.challenge_id ) as t1 join Hackers as h on h.hacker_id = t1.hacker_id group by h.hacker_id, h.name having sum(t1.max_score) > 0 order by total_score desc, h.hacker_id asc;