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 as h
inner join Challenges as c on h.hacker_id = c.hacker_id
inner join Submissions as s on c.challenge_id = s.challenge_id
inner 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(distinct(c.challenge_id)) > 1
order by count(distinct(c.challenge_id)) desc, h.hacker_id;' --- why does this query give wrong output, does the order of joins matter here ??
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 as h inner join Challenges as c on h.hacker_id = c.hacker_id inner join Submissions as s on c.challenge_id = s.challenge_id inner 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(distinct(c.challenge_id)) > 1 order by count(distinct(c.challenge_id)) desc, h.hacker_id;' --- why does this query give wrong output, does the order of joins matter here ??