Q4 Med

 avatar
unknown
mysql
3 years ago
329 B
2
Indexable
SELECT h.hacker_id, h.name FROM Submissions AS s join Hackers AS h 
ON s.hacker_id = h.hacker_id 
JOIN Challenges AS c ON s.challenge_id = c.challenge_id
JOIN Difficulty AS d ON c.Difficulty_level = d.Difficulty_level
WHERE s.score = d.score 
GROUP BY h.hacker_id, h.name 
HAVING count(*) > 1
ORDER BY count(*) DESC, h.hacker_id;
Editor is loading...