Contest Leaderboard

  • + 0 comments

    with cte_sub as ( select hacker_id,challenge_id,max(score) as max_score from submissions group by hacker_id,challenge_id ) select a.hacker_id, a.name,sum(max_score) as tot_score FROM hackers a join cte_sub b on a.hacker_id = b.hacker_id group by a.hacker_id,a.name having sum(max_score)>0 order by tot_score desc,a.hacker_id