Note that the result table has 13 columns (1 for the department id + 12 for the months). MAX(CASE WHEN month = 'Jan' THEN revenue END) AS Jan_Revenue, MAX(CASE WHEN month = 'Feb' THEN revenue END) AS ...
MAX(CASE WHEN OCCUPATION = 'Doctor' THEN NAME END) AS DOCTOR, MAX(CASE WHEN OCCUPATION = 'Professor' THEN NAME END) AS PROFESSOR, MAX(CASE WHEN OCCUPATION = 'Singer' THEN NAME END) AS SINGER, MAX(CASE ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results