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 do clean up if create database failed?
Describe the types of sub query?
How to change user password in oracle?
WHEN CURSOR MOVES FROM ONE FORM TO ANOTHER FORM, HOW MANY TRIGGER WILL BE FIRED AND WHAT ARE THEIR SEQUENCE?
Is java required for oracle client?
Give the constructs of a package, function or a procedure.
Explain an extent?
Define 'view' advantage ?
Design database draw er diagram for a certain scenario ?
0 Answers Keane India Ltd, TATA,
What are joins, explain all types of joins?
What are the basic element of Base configuration of an oracle Database ?
normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi