728x90
select h.hacker_id, h.name
from submissions as s
join hackers as h on s.hacker_id = h.hacker_id
join challenges as c on s.challenge_id = c.challenge_id
join difficulty as d on c.difficulty_level = d.difficulty_level
where d.score = s.score
group by h.hacker_id, h.name
having count(s.hacker_id) > 1
order by count(s.hacker_id) desc, s.hacker_id asc
728x90
'데이터 분석 > [SQL] 기초' 카테고리의 다른 글
[HackerRank] MySQL - Ollivander's Inventory (0) | 2025.03.23 |
---|---|
[HackerRank] MySQL - Occupations (0) | 2025.03.20 |
[hackerrank] MySQL - The Report (0) | 2025.03.20 |
[hackerrank] MySQL - Contest Leaderboard (0) | 2025.03.20 |
[hackerrank] MySQL - Challenges (0) | 2025.03.20 |