I want to display the department no. and the no. of employee in each department from EMP Table.(in a Single Row). Pls help me how to write the query for that.
I had one query which display the result in 3 rows.
select deptno, count(*) from emp
group by deptno;
I want to display this 3 rows in a single-row.
Dpt10 Count(*) Dpt20 Count(*) Dpt30 Count(*)
10 5 20 3 30 4
The output in this forum is not proper but try to understand that the no. 5,3 & 4 should be below count(*) column and 10,20 & 30 should be below deptno.