Contest Leaderboard MediumSQL (Intermediate) – HackerRank Solution SQL, Best and Optimal Solutions , All you need.
Solutions of SQL all HackerRank:
Here are all the Solutions of All of SQL of Hacker Rank , Leave a comment for similar posts
SQL Contest Leaderboard MediumSQL (Intermediate) HackerRank Solution
select
h.hacker_id,
h.name,
sum(s.score)
from
hackers h
inner join
(
select
hacker_id,
challenge_id,
max(score) as score
from
submissions
group by
hacker_id,
challenge_id
) as s
on h.hacker_id = s.hacker_id
group by
h.hacker_id,
h.name
having
sum(s.score) <> 0
order by
sum(s.score) desc,
h.hacker_id
SQL (Basic)
SQL (Intermediate)
SQL (Advanced)
Basic Select
Advanced Select
Aggregation
Basic Join
Advanced Join
Alternative Queries
Leave a comment below