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.
Based on what I think (I am a newbie), for MySQL, you need to change the group_by in main Query to :
groupbyc.hacker_id,h.name
The reason for this is that when you group only c.hacker_id, SQL doesn't know that c.hacker_id and h.name are unique to eachother. Had same issue on some other questions.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Challenges
You are viewing a single comment's thread. Return to all comments →
Based on what I think (I am a newbie), for MySQL, you need to change the group_by in main Query to :
The reason for this is that when you group only c.hacker_id, SQL doesn't know that c.hacker_id and h.name are unique to eachother. Had same issue on some other questions.