We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
SELECT
A.hacker_id,
A.name
FROM
Hackers A
INNER JOIN Submissions B ON A.hacker_id = B.hacker_id
INNER JOIN Challenges C ON B.challenge_id = C.challenge_id
INNER JOIN Difficulty D ON C.difficulty_level = D.difficulty_level
AND B.score = D.score
GROUP BY
A.hacker_id,
A.name
HAVING
COUNT() > 1
ORDER BY
COUNT() DESC,
A.hacker_id;
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Top Competitors
You are viewing a single comment's thread. Return to all comments →
SELECT A.hacker_id, A.name FROM Hackers A INNER JOIN Submissions B ON A.hacker_id = B.hacker_id INNER JOIN Challenges C ON B.challenge_id = C.challenge_id INNER JOIN Difficulty D ON C.difficulty_level = D.difficulty_level AND B.score = D.score GROUP BY A.hacker_id, A.name HAVING COUNT() > 1 ORDER BY COUNT() DESC, A.hacker_id;