Top Competitors

  • + 0 comments

    For MySQL Platform

    SELECT hackers.hacker_id, hackers.name FROM hackers
    JOIN submissions ON submissions.hacker_id = hackers.hacker_id
    JOIN challenges ON challenges.challenge_id = submissions.challenge_id
    JOIN difficulty ON difficulty.difficulty_level = challenges.difficulty_level
    WHERE difficulty.score = submissions.score
    GROUP BY 1, 2
    HAVING COUNT(*) > 1
    ORDER BY COUNT(*) DESC, hackers.hacker_id;