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.
with max_scores as (
select s.hacker_id, h.name, max(s.score) as max_scores from submissions s
inner join hackers h on s.hacker_id = h.hacker_id
group by s.hacker_id, h.name, s.challenge_id)
select hacker_id, name, sum(max_scores) from max_scores
group by hacker_id, name
having sum(max_scores) > 0
order by 3 desc, 1 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 →
with max_scores as ( select s.hacker_id, h.name, max(s.score) as max_scores from submissions s inner join hackers h on s.hacker_id = h.hacker_id group by s.hacker_id, h.name, s.challenge_id) select hacker_id, name, sum(max_scores) from max_scores group by hacker_id, name having sum(max_scores) > 0 order by 3 desc, 1 asc;