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...

Given two table employee and department
EMP
----------------
empid deptid(fk)


Dept
---------------------
deptid(pk) deptname


que-Write a query to find count of employee in each
department.


Expected Output-
deptid countofEmployee
---------------------------
10 57
20 20
30 15

Answer Posted / ajit

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

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is reindexing?

1678


What are ddl statements in oracle?

1075


What is SQL Tuning Advisor in Oracle?

1181


Can a parameter be passed to a cursor?

1126


definition of cluster and non-clustered index?

3035


Differentiate between pre-select and pre-query?

1107


How can we create the complete backup of data in the oracle.

2161


When do you get a .pll extension in oracle? Explain its importance

1042


What is the data type of dual table?

995


How will you differentiate between varchar & varchar2?

1044


What is different types of joins?

1022


How can I convert single byte kana characters into multi byte kana characters and vice-versa.

2397


what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?

2468


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

1039


What is the purpose of save points in oracle database?

1119