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
What happens if you set the sga too low in oracle?
Explain the blob datatype?
How to convert csv to table in oracle?
What is a connect identifier?
Why do we need integrity constraints in a database?
interview questions with answer for cts
How to create a table index in oracle?
What is a lookup table in oracle?
What is the difference between I and G in Oracle?
Explain table?
Does oracle charge for java?
How do you find current date and time in oracle?
How to create a table interactively?
How to select an oracle system id (sid)?
Explain a synonym?