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 / anithaletchumi

select d.deptid,count(e.empid) as countofEmployee from
department d left outer join employee e on
d.deptid=e.deptid group by d.deptid

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hi friends i completed b.com 2004.i have 3y accounting exp. in manufacturing company.now i have completed oracle finance.pls suggest me how will get job in oracle.can i get job in oracle.

2370


How to define a data source name (dsn) in odbc manager?

1035


List out the difference between commit, rollback, and savepoint?

1037


What is MTTR advisor in Oracle?

1090


What suggestions do you have to reduce the network traffic?

965


How to get a list of all background sessions in the database?

993


What is a sub query? Describe its types?

1020


What is the sid in oracle?

969


What is the difference between sharding and partitioning?

987


What is recovery manager(rman) backup in Oracle?

1185


What are the differences between number and binary_float in oracle?

1105


How to find out what oracle odbc drivers are installed?

1043


How to divide query output into groups in oracle?

992


What do you understand by database schema and what does it hold?

1231


How to drop a stored function?

1139