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.
If we run the inner subquery, then it would return following result set
Since we want all the peoples for specific row_number() to appear in the same row, we are using group by. And, when using group by, we can either select the columns in the group by list, or use aggregate function. So, in my case I used MIN, but in this case doing, MAX would have given the same result.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Occupations
You are viewing a single comment's thread. Return to all comments →
If we run the inner subquery, then it would return following result set
Since we want all the peoples for specific row_number() to appear in the same row, we are using group by. And, when using group by, we can either select the columns in the group by list, or use aggregate function. So, in my case I used MIN, but in this case doing, MAX would have given the same result.