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 tscore as(
select h.hacker_id as hck, h.name as nm, s.challenge_id as chl, max(s.score) as scr
from Hackers h join Submissions s on h.hacker_id = s.hacker_id
group by h.hacker_id, h.name, s.challenge_id
)
select hck, nm, sum(scr) as tscr
from tscore
group by hck, nm
having sum(scr) !=0
order by tscr desc, hck
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 tscore as( select h.hacker_id as hck, h.name as nm, s.challenge_id as chl, max(s.score) as scr from Hackers h join Submissions s on h.hacker_id = s.hacker_id group by h.hacker_id, h.name, s.challenge_id )
select hck, nm, sum(scr) as tscr from tscore group by hck, nm having sum(scr) !=0 order by tscr desc, hck