Can any one tell how can we write a query which will fetch the data in matrix format..
Question asked by visitor Sethu Murugan
Can any one tell how can we write a query which will fetch the data in matrix format..
Question asked by visitor Sethu Murugan
try this sample code
u might get what u are looking for
Code:SELECT job, sum(decode(deptno,10,sal)) DEPT10, sum(decode(deptno,20,sal)) DEPT20, sum(decode(deptno,30,sal)) DEPT30, sum(decode(deptno,40,sal)) DEPT40 FROM emp GROUP BY job ORDER BY job