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.
What's wrong with this query? I kept getting errors:
select h.name, h.hacker_id,h2.total_score from hackers h inner join (select hacker_id, (sum(score)-min(score)) as total_score from submissions
group by hacker_id) h2
on h.hacker_id = h2.hacker_id
where score >> 0
order by h2.total_score desc, h.hacker_id 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 →
What's wrong with this query? I kept getting errors:
select h.name, h.hacker_id,h2.total_score from hackers h inner join (select hacker_id, (sum(score)-min(score)) as total_score from submissions group by hacker_id) h2 on h.hacker_id = h2.hacker_id where score >> 0 order by h2.total_score desc, h.hacker_id asc;