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 s.hacker_id, h.name from hackers as h
inner join submissions as s on h.hacker_id = s.hacker_id
inner join challenges as c on s.challenge_id = c.challenge_id
inner join difficulty as d on c.difficulty_level = d.difficulty_level
where s.score = d.score and c.difficulty_level = d.difficulty_level
group by h.hacker_id, h.name
having count(h.hacker_id) > 1
order by count(h.hacker_id) desc, h.hacker_id;
Top Competitors
You are viewing a single comment's thread. Return to all comments →
You can select from hacker too:
select s.hacker_id, h.name from hackers as h inner join submissions as s on h.hacker_id = s.hacker_id inner join challenges as c on s.challenge_id = c.challenge_id inner join difficulty as d on c.difficulty_level = d.difficulty_level where s.score = d.score and c.difficulty_level = d.difficulty_level group by h.hacker_id, h.name having count(h.hacker_id) > 1 order by count(h.hacker_id) desc, h.hacker_id;