You are viewing a single comment's thread. Return to all comments →
with pr as ( select h.name, s.hacker_id, s.challenge_id, s.score, ROW_NUMBER() over (partition by h.hacker_id, s.challenge_id order by score desc) as crnk from hackers h join submissions s on h.hacker_id = s.hacker_id ), dr as ( select name, hacker_id, SUM(score) as scr from pr where crnk = 1 group by name, hacker_id ) select hacker_id, name, scr from dr where scr <> 0 order by scr desc, hacker_id asc
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 →