Untitled

 avatar
user_1196610317
mysql
2 years ago
327 B
0
Indexable
Never
SELECT h.hacker_id, h.name FROM hackers h, difficulty d, challenges c, submissions s
WHERE h.hacker_id = s.hacker_id AND s.challenge_id = c.challenge_id AND c.difficulty_level = d.difficulty_level AND s.score = d.score
GROUP BY h.hacker_id, h.name
HAVING count(h.hacker_id) > 1
ORDER BY count(h.hacker_id) DESC, h.hacker_id ASC