237504

 avatar
user_0537875676
mysql
2 years ago
445 B
4
Indexable
Never
SELECT HACKERS.hacker_id, HACKERS.name FROM SUBMISSIONS
JOIN HACKERS ON SUBMISSIONS.hacker_id = HACKERS.hacker_id
JOIN CHALLENGES ON CHALLENGES.challenge_id = SUBMISSIONS.challenge_id
JOIN DIFFICULTY ON CHALLENGES.difficulty_level = DIFFICULTY.difficulty_level
WHERE SUBMISSIONS.score = DIFFICULTY.score
GROUP BY HACKERS.hacker_id, HACKERS.name HAVING COUNT(SUBMISSIONS.score)>= 2
ORDER BY COUNT(SUBMISSIONS.score) DESC, HACKERS.hacker_id;