Top Competitors

  • + 0 comments
    Select so.hacker_id, h.name from (Select s.challenge_id, s.hacker_id FROM Submissions s INNER JOIN (Select c.challenge_id,c.difficulty_level, d.score from Challenges c INNER JOIN Difficulty d ON c.difficulty_level=d.difficulty_level) co ON s.challenge_id = co.challenge_id where s.score = co.score) so INNER JOIN Hackers h ON so.hacker_id = h.hacker_id GROUP BY so.hacker_id, h.name HAVING count(so.hacker_id) > 1 ORDER BY count(so.hacker_id) DESC, so.hacker_id ASC;