| Hi friends, We have to change the column into row like this.It is a pivoting table . For exampleDEPTNO COUNT(*)------- ---------- 10 3 20 5 30 4 40 DEPT_10 DEPT_20 DEPT_30 DEPT_40------- ---------- ---------- ---------- 3 5 4 select MAX( decode( deptno, 10, cnt, null ) ) dept_10, MAX( decode( deptno, 20, cnt, null ) ) dept_20, MAX( decode( deptno, 30, cnt, null ) ) dept_30, MAX( decode( deptno, 40, cnt, null ) ) dept_40 from ( select deptno, count(*) cnt from emp group by deptno ) group by deptno |