SELECT * FROM pivot_data PIVOT XML (SUM(sal) FOR deptno IN (ANY));
select * from (select to_char(hiredate,'yyyy') yea from emp) pivot (count(*) for yea in (1987,2017,1980,1982,1981));
SELECT * FROM pivot_data PIVOT XML (SUM(sal) FOR deptno IN (ANY));
select * from (select to_char(hiredate,'yyyy') yea from emp) pivot (count(*) for yea in (1987,2017,1980,1982,1981));