HackerRank Occupations SQL Server solution

Problem 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. Input FormatThe OCCUPATIONS table is described as follows: Column Type Name String Occupation String Occupation will only contain one of the following values: Doctor, Professor, Singer or Actor. Sample Input Name …

HackerRank Occupations SQL Server solution Devamı »