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

How to use like conditions in oracle?

993


How to select some rows from a table in oracle?

1005


How to assign a table row to a record variable?

965


How to load data through external tables?

1070


What is oracle used for?

967


What are the differences between char and nchar in oracle?

1020


how to handle exceptions in post production

1358


Will you be able to store pictures in the database?

1061


What is a server parameter file in oracle?

1000


What is dynamic proxy?

958


What is a lookup table in oracle?

929


what is dynamic SGA and static SGA

4327


Explain the use of analyse option in exp command.

1063


what are steps for interface? where is exchange rate defined in which table?

2054


Explain the use of indexes option in exp command.

1063