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.
In this particular query, you don't need to use DISTINCT to avoid duplicates. For some reason, you do need to use distinct to have it marked as a correct answer. However, in reality, it doesn't make a difference in this query. There are cases in other types of queries when you can end up with duplicates (especially from joins and such) but in this case distinct should not be required.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Weather Observation Station 3
You are viewing a single comment's thread. Return to all comments →
In this particular query, you don't need to use DISTINCT to avoid duplicates. For some reason, you do need to use distinct to have it marked as a correct answer. However, in reality, it doesn't make a difference in this query. There are cases in other types of queries when you can end up with duplicates (especially from joins and such) but in this case distinct should not be required.