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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
How to rename an index?
Differentiate between post-database commit and post-form commit?
Explain the features of oracle?
Assuming that you are an End User How to find that in the payment Batch some of the Invoice was Missing To pay How to find That??
In the oracle version 9.3.0.5.0, what does each number shows?
How do I connect to oracle?
defination of bitmap index
How to define default values for formal parameters?
Define oracle database
How to use attributes of the implicit cursor in oracle?
i must get table name, constraint type, constrain name with using concads "||" and it must be in string type, then with join processes i need code please help immidiately
How to create a testing table in oracle?