
SQL | HackerRank MAX(CASE WHEN…)을 활용한 피벗(Pivot) 쿼리

·
Computer Science/SQL
Pivot the Occupation column in OCCUPATIONS so that each Name is sorted alphabetically and displayed underneath its corresponding Occupation. The output should consist of four columns (Doctor, Professor, Singer, and Actor) in that specific order, with their respective names listed alphabetically under each column.Note: Print NULL when there are no more names corresponding to an occupation.Input F..