Contest Leaderboard

  • + 0 comments

    select hacker_id,name,sum(total) from (select h.hacker_id,name,challenge_id,max(score) as total from Hackers h left join submissions s on s.hacker_id = h.hacker_id group by h.hacker_id,name,challenge_id ) as N group by hacker_id,name having sum(total) > 0 order by sum(total) desc,hacker_id asc