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 h.hacker_id, h.name
FROM HACKERS h
JOIN (
(SELECT s.hacker_id, COUNT(s.challenge_id) as full_scores
FROM CHALLENGES ch
JOIN DIFFICULTY d ON ch.difficulty_level = d.difficulty_level
JOIN SUBMISSIONS s ON s.challenge_id = ch.challenge_id
WHERE s.score = d.score
GROUP BY s.hacker_id
HAVING COUNT(s.challenge_id) > 1)
) AS hs ON h.hacker_id = hs.hacker_id
ORDER BY hs.full_scores DESC, h.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 h.hacker_id, h.name FROM HACKERS h JOIN ( (SELECT s.hacker_id, COUNT(s.challenge_id) as full_scores FROM CHALLENGES ch JOIN DIFFICULTY d ON ch.difficulty_level = d.difficulty_level JOIN SUBMISSIONS s ON s.challenge_id = ch.challenge_id WHERE s.score = d.score GROUP BY s.hacker_id HAVING COUNT(s.challenge_id) > 1) ) AS hs ON h.hacker_id = hs.hacker_id ORDER BY hs.full_scores DESC, h.hacker_id;