Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

What is a SNAPSHOT ?

1 Answers  


Does oracle database need java?

0 Answers  


1. Display all the rows and columns in the CLIENT table. Sort by client name in reverse alphabetical order.

2 Answers   Wipro,


I just want to maintain data like an employee can belongs to 3 or more departments . We can resolve this by using composite key but it avoids normalization rules. So Can anyone tell me how can I maintain data.

0 Answers   IBM,


What is the difference between view and materialized view in Oracle?

0 Answers   MCN Solutions,


How to export data to a csv file?

0 Answers  


What is raw datatype?

0 Answers  


Give the various rollback segment states.

0 Answers  


There are n numbers of flatfile of exactly same format are placed in a folder.Can we load these flatfile's data one by one to a single relational table by a single session??

0 Answers  


How to Identify the previously inserted/updated records in already populated table.

0 Answers  


How to drop a stored procedure in oracle?

0 Answers  


2. Display the post code and the total number of purchase orders placed with creditors in that post code.

0 Answers   Wipro,


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • 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)