Hi All,
I have the following query and its give a desired output like a matrix.
SELECT DEPTNO,
DECODE(DEPTNO,10,COUNT(*))TEN,
DECODE(DEPTNO,20,COUNT(*))TWO,
DECODE(DEPTNO,30,COUNT(*))THREE,
DECODE(DEPTNO,40,COUNT(*))FOUR
FROM EMP
GROUP BY DEPTNO
I want to have a output like the below format, can the pro's help me with the right query or give a approach for the same.
Deptno 10 20 30 40
Values 100 200 300 400
Thanks in advance