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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why oracle is used?

578


How to loop through data rows in the implicit cursor?

539


How does one get the view definition of fixed views/tables?

596


Explain the blob datatype?

613


How to rename an index?

587






Which is faster join or subquery in oracle?

535


What does sharding mean?

538


Can I create users through internet explorer in oracle 10g?

566


How to connect to a local oracle 10g xe server?

529


For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?

1555


Which are the five query types available in oracle?

527


Explain the use of indexes option in imp command.

563


List out the components of logical database structure of oracle database.

582


What is a connect identifier?

536


What is a system tablespace?

598