728x90
https://www.hackerrank.com/challenges/challenges/problem?isFullScreen=true
Challenges | HackerRank
Print the total number of challenges created by hackers.
www.hackerrank.com
with cnt as(
select h.hacker_id
, h.name
, count(challenge_id) challenges_created
from hackers h left join challenges c
on h.hacker_id = c.hacker_id
group by h.hacker_id, h.name
order by 3 desc, 1
)
select *
from cnt
where challenges_created in (
select max(challenges_created)
from cnt
union
select challenges_created
from cnt
group by challenges_created
having count(*) = 1
)
728x90
'𝙎𝙌𝙇' 카테고리의 다른 글
[HackerRank] SQL Project Planning (0) | 2023.07.26 |
---|---|
[HackerRank] Contest Leaderboard (0) | 2023.07.13 |
[HackerRank] Olivander's Inventory (0) | 2023.07.10 |
[HackerRank] Top Competitors (0) | 2023.07.10 |
[HackerRank] The Report (0) | 2023.07.07 |