Top Competitors 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 Top Competitors MediumSQL (Intermediate) HackerRank Solution
select
h.hacker_id,
h.name
from
hackers h
inner join
(
select
s.hacker_id,
count(*) as cnt
from
challenges c
inner join difficulty d
on c.difficulty_level = d.difficulty_level
inner join submissions s
on c.challenge_id = s.challenge_id
where
s.score = d.score
group by s.hacker_id
having count(*) > 1
) as ch
on h.hacker_id = ch.hacker_id
order by
ch.cnt 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