Top Competitors

  • + 2 comments

    MySQL

    select h.hacker_id, h.name
    from difficulty as d
        join challenges as c on c.difficulty_level=d.difficulty_level
        join submissions as s on s.challenge_id=c.challenge_id
        join hackers as h on s.hacker_id=h.hacker_id
    where s.score=d.score
    group by 1,2
    having count(s.score)>1
    order by count(s.score) desc, 1;