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.
The order of joins is flexible, but some of the ON id-matching constraints refer to previous joins. So if you're referring to any of them then they do have to be in the order that they're declared/called.
Here is an alternate way to do this sort of joining. It makes more sense to me and eliminates a bit of the INNER JOIN repetition.
FROM Hackers H
JOIN (Submissions as S,
Challenges as C,
Difficulty as D)
ON (S.Hacker_ID = H.hacker_ID
AND S.Challenge_ID = C.Challenge_ID
AND C.Difficulty_Level = D.Difficulty_Level)
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 →
Yes, you're right that it is redundant.
The order of joins is flexible, but some of the ON id-matching constraints refer to previous joins. So if you're referring to any of them then they do have to be in the order that they're declared/called.
Here is an alternate way to do this sort of joining. It makes more sense to me and eliminates a bit of the INNER JOIN repetition.