Skip to content

Commit e3e48b2

Browse files
authored
Update top_competitors.sql
1 parent a8f8d8c commit e3e48b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hackerrank_sql_practice/top_competitors.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ select hackers.hacker_id, name
1515
from submissions inner join challenges on submissions.challenge_id = challenges.challenge_id
1616
inner join difficulty on difficulty.difficulty_level = challenges.difficulty_level
1717
inner join hackers on submissions.hacker_id = hackers.hacker_id
18-
where difficulty.score = submissions.score and difficulty.difficulty_level = challenges.difficulty_level
18+
where difficulty.score = submissions.score -- and difficulty.difficulty_level = challenges.difficulty_level - NOT NEEDED
1919
group by hackers.hacker_id, name
2020
having count( challenges.challenge_id)> 1
2121
order by count( challenges.challenge_id) desc, hackers.hacker_id

0 commit comments

Comments
 (0)