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,name,sum(score) as total_score from(
Select * from(
Select h.hacker_id,h.name,s.submission_id,s.challenge_id,s.score,Row_number() over(partition by h.hacker_id,s.challenge_id order by s.score desc) as rno from Hackers h join submissions s on h.hacker_id = s.hacker_id order by h.hacker_id desc) where score <> 0 and rno=1
) group by Hacker_id,name order by total_score desc,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 Hacker_id,name,sum(score) as total_score from( Select * from( Select h.hacker_id,h.name,s.submission_id,s.challenge_id,s.score,Row_number() over(partition by h.hacker_id,s.challenge_id order by s.score desc) as rno from Hackers h join submissions s on h.hacker_id = s.hacker_id order by h.hacker_id desc) where score <> 0 and rno=1 ) group by Hacker_id,name order by total_score desc,hacker_id asc;