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