Medium - Q4

mail@pastecode.io avatar
unknown
sql
2 years ago
446 B
5
Indexable
Never
select hackers.hacker_id, hackers.name from submissions join hackers on hackers.hacker_id = submissions.hacker_id join challenges on submissions.challenge_id = challenges.challenge_id join difficulty on challenges.difficulty_level = difficulty.difficulty_level where difficulty.score = submissions.score group by hackers.hacker_id, hackers.name having count(submissions.hacker_id)>=2 order by count(submissions.hacker_id) desc, hackers.hacker_id;