Contest Leaderboard

  • + 1 comment

    Can someone explain what am I doing wrong? Code:-

    select h.hacker_id,h.name,sum(s.score)
    from hackers h join Submissions s on h.hacker_id=s.hacker_id 
    where 
    score in (select max(score) from Submissions group by hacker_id,challenge_id)
    group by h.hacker_id,h.name,s.challenge_id
    having sum(s.score)>0
    order by sum(s.score) desc, h.hacker_id asc``