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 newtable.a,newtable.d,sum(newtable.maxscore)
from(
select hackers.hacker_id as a ,submissions.challenge_ID as b,max(submissions.score) as maxscore,hackers.name as d
from hackers join submissions on hackers.hacker_ID=submissions.hacker_id
group by hackers.hacker_id,submissions.challenge_id,hackers.name) as newtable
group by newtable.a,newtable.d
having sum(newtable.maxscore)>0
order by sum(newtable.maxscore) desc ,newtable.a asc
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Contest Leaderboard
You are viewing a single comment's thread. Return to all comments →
select newtable.a,newtable.d,sum(newtable.maxscore) from( select hackers.hacker_id as a ,submissions.challenge_ID as b,max(submissions.score) as maxscore,hackers.name as d from hackers join submissions on hackers.hacker_ID=submissions.hacker_id group by hackers.hacker_id,submissions.challenge_id,hackers.name) as newtable group by newtable.a,newtable.d having sum(newtable.maxscore)>0 order by sum(newtable.maxscore) desc ,newtable.a asc