what if i have dynamic set of columns like this?
SELECT *
FROM monthly_sales
PIVOT(SUM(amount) FOR MONTH IN (select distinct month from monthly_sales))
ORDER BY EMP_ID_renamed;
the output looks like this:
EMP_ID_RENAMED 'JAN' 'FEB' 'MAR' 'APR'
1 10400 8000 11000 18000
2 39500 90700 12000 5300