We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
c.difficulty_level = d.difficulty_level is needed because d.score = s.score by itself is not enough to guarantee the score is full. For example, if difficulty level 2 has max score 40 and difficulty level 1 has max score 20 then d.score = s.score would return a hit on a submitted score of 20 for a difficulty level 2 question, even though that's not a max score for difficulty level 2.
However, the commenting out as you did is still fine because what you commented out is redundant. It's already being handled in the join clause.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Top Competitors
You are viewing a single comment's thread. Return to all comments →
c.difficulty_level = d.difficulty_level is needed because d.score = s.score by itself is not enough to guarantee the score is full. For example, if difficulty level 2 has max score 40 and difficulty level 1 has max score 20 then d.score = s.score would return a hit on a submitted score of 20 for a difficulty level 2 question, even though that's not a max score for difficulty level 2.
However, the commenting out as you did is still fine because what you commented out is redundant. It's already being handled in the join clause.