Top Competitors

  • + 0 comments

    ORACLE

    Select
        h.hacker_id,
        h.name
    From hackers h
    Join submissions s
        on h.hacker_id = s.hacker_id
    Join challenges c
        on s.challenge_id = c.challenge_id
    Join difficulty d
        on c.difficulty_level = d.difficulty_level
    Where s.score = d.score
    Group by h.hacker_id, h.name
    Having count(distinct(s.challenge_id)) > 1
    Order by count(distinct(c.challenge_id)) desc, h.hacker_id asc;