Top Competitors

  • + 0 comments
    select
        a.hacker_id
        , d.name
    from submissions a
    join challenges b
        on a.challenge_id = b.challenge_id
    join difficulty c
        on b.difficulty_level = c.difficulty_level
        and a.score = c.score
    left join hackers d
        on a.hacker_id = d.hacker_id
    where a.score = c.score
    group by 1,2
    having count(distinct a.challenge_id) > 1
    order by count(distinct a.challenge_id) desc,a.hacker_id