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.
ORACLE:
select
hacker_id,
name
from
(
select
s.hacker_id,
h.name,
count(1) cnt
from
submissions s
inner join
hackers h
on s.hacker_id = h.hacker_id
inner join
challenges c
on
s.challenge_id = c.challenge_id
inner join
difficulty d
on c.difficulty_level = d.difficulty_level
and s.score = d.score
group by
s.hacker_id,
h.name)a
where
cnt > 1
order by
cnt desc,
hacker_id;
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Top Competitors
You are viewing a single comment's thread. Return to all comments →
ORACLE: select hacker_id, name from ( select s.hacker_id, h.name, count(1) cnt from submissions s inner join hackers h on s.hacker_id = h.hacker_id inner join challenges c on s.challenge_id = c.challenge_id inner join difficulty d on c.difficulty_level = d.difficulty_level and s.score = d.score group by s.hacker_id, h.name)a where cnt > 1 order by cnt desc, hacker_id;