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.
Finally the code aggregates the rows together using the group by RowNumber and the min statement. As stated below 'min()/max() will return a name for specific index and specific occupation. If there is a name, it will return it, if not, return NULL'.
Occupations
You are viewing a single comment's thread. Return to all comments →
This one was difficult but your code is awesome. I am going to explain this code the best way I know how to help the next guy/gal.
First the code orders rows by name:
Then the code creates the rows labeled with a row #, and the columns filled in with a Name or NULL value:
Finally the code aggregates the rows together using the group by RowNumber and the min statement. As stated below 'min()/max() will return a name for specific index and specific occupation. If there is a name, it will return it, if not, return NULL'.
I hope these queries help everyone better understand this great code!