We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8f8d8c commit e3e48b2Copy full SHA for e3e48b2
hackerrank_sql_practice/top_competitors.sql
@@ -15,7 +15,7 @@ select hackers.hacker_id, name
15
from submissions inner join challenges on submissions.challenge_id = challenges.challenge_id
16
inner join difficulty on difficulty.difficulty_level = challenges.difficulty_level
17
inner join hackers on submissions.hacker_id = hackers.hacker_id
18
-where difficulty.score = submissions.score and difficulty.difficulty_level = challenges.difficulty_level
+where difficulty.score = submissions.score -- and difficulty.difficulty_level = challenges.difficulty_level - NOT NEEDED
19
group by hackers.hacker_id, name
20
having count( challenges.challenge_id)> 1
21
order by count( challenges.challenge_id) desc, hackers.hacker_id
0 commit comments