how to get the no employee in each department including the
dept which has 0 employee
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Answer / priti
select count(emp_id) from employee group by dept_id;
Is This Answer Correct ? | 0 Yes | 3 No |
material view and view disadvantages?
Select all the employees who were hired in last 2 years and who works in dept where max managers are working.
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??
What is the difference between $oracle_base and $oracle_home?
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.
How to create a new user account in oracle?
Write query to fetch second maximum salary from employee table.
4 Answers Bravura Solutions, HCL,
Which is better Oracle or MS SQL? Why?
How to convert csv to table in oracle?
What is an oracle?
How to start instance with a minimal initialization parameter file?
Explain the use of indexes option in exp command.