how to get the no employee in each department including the
dept which has 0 employee

Answers were Sorted based on User's Feedback



how to get the no employee in each department including the dept which has 0 employee..

Answer / mahesh madala

select d.deptno,count(ename)no_of_emps from emp e,dept d
where d.deptno = e.deptno(+)
group by d.deptno

Is This Answer Correct ?    5 Yes 0 No

how to get the no employee in each department including the dept which has 0 employee..

Answer / shailesh

select d.department_id,count(e.employee_id) from
departments d
left outer join employees e
on(e.department_id=d.department_id)
group by d.department_id;

Is This Answer Correct ?    1 Yes 0 No

how to get the no employee in each department including the dept which has 0 employee..

Answer / sanjay pradhan

select d.deptno,count(ename)employees from emp e,dept d
where d.deptno = e.deptno(+)
group by d.deptno

Is This Answer Correct ?    0 Yes 0 No

how to get the no employee in each department including the dept which has 0 employee..

Answer / sudipta santra

select distinct dept_no, nvl(count(emp_no),0) from dept
group by dept_no;

Is This Answer Correct ?    0 Yes 3 No

how to get the no employee in each department including the dept which has 0 employee..

Answer / priti

select count(emp_id) from employee group by dept_id;

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Oracle General Interview Questions

material view and view disadvantages?

0 Answers  


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

0 Answers   ESS,


Assuming that you are an End User How to find that in the payment Batch some of the Invoice was  Missing To pay How to find That??

0 Answers  


What is the difference between $oracle_base and $oracle_home?

0 Answers  


A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.

3 Answers  






How to create a new user account in oracle?

0 Answers  


Write query to fetch second maximum salary from employee table.

4 Answers   Bravura Solutions, HCL,


Which is better Oracle or MS SQL? Why?

2 Answers   Bally Technologies,


How to convert csv to table in oracle?

0 Answers  


What is an oracle?

0 Answers  


How to start instance with a minimal initialization parameter file?

0 Answers  


Explain the use of indexes option in exp command.

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)