You are viewing a single comment's thread. Return to all comments →
Here is my solution in MS SQL Server:
SELECT [Doctor], [Professor], [Singer], [Actor] FROM ( SELECT ROW_NUMBER() OVER (PARTITION BY OCCUPATION ORDER BY NAME) [RowNumber], * FROM OCCUPATIONS ) AS tempTable PIVOT ( MAX(NAME) FOR OCCUPATION IN ([Doctor], [Professor], [Singer], [Actor]) ) AS pivotTable
Seems like cookies are disabled on this browser, please enable them to open this website
Occupations
You are viewing a single comment's thread. Return to all comments →
Here is my solution in MS SQL Server: