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.
- Prepare
- SQL
- Basic Join
- Contest Leaderboard
- Discussions
Contest Leaderboard
Contest Leaderboard
Sort by
recency
|
1888 Discussions
|
Please Login in order to post a comment
Can anyone please explain me why below doesn't work?
MYSQL:
select sub.hacker_id, h.name, sum(sub.MaxScore) as totalScore from ( select hacker_id, challenge_id, max(score) as MaxScore from submissions group by hacker_id, challenge_id ) as sub join hackers h on sub.hacker_id = h.hacker_id group by sub.hacker_id, h.name Having totalScore > 0 order by totalScore DESC, sub.hacker_id
Oracle SQL with CTE
MySQL query
MySQL version: