Today's coding challenge was tough and advanced for me. I ended up relying a lot on the discussion thread in #hackerrank to figure out the solution to the problem. It took me two hours of looking up different functions, learning the logic, understanding the concepts and piecing together new information. The research helped me learn about some new functions I needed to use in my solution and I have shared them with some links to resources for further learning (please let me know in the comments if you have additional resources):
1. ROW_NUMBER- https://lnkd.in/gjSSzXZ
2. PARTITION BY- https://lnkd.in/gV4St_W
3. PIVOT- https://lnkd.in/gh564zd
4. MIN/MAX -https://lnkd.in/gZHRebQ
Today's coding challenge (https://bit.ly/36MzrXr) : Pivot the Occupation column in OCCUPATIONS so that each Name is sorted alphabetically and displayed underneath its corresponding Occupation. The output column headers should be Doctor, Professor, Singer, and Actor, respectively.
Note: Print NULL when there are no more names corresponding to an occupation.
![](https://static.wixstatic.com/media/2d9ab2_9964f9ef4f954b8aa48bab1341920db7~mv2.jpeg/v1/fill/w_800,h_374,al_c,q_80,enc_auto/2d9ab2_9964f9ef4f954b8aa48bab1341920db7~mv2.jpeg)
Comments