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 is reindexing?
What are ddl statements in oracle?
What is SQL Tuning Advisor in Oracle?
Can a parameter be passed to a cursor?
definition of cluster and non-clustered index?
Differentiate between pre-select and pre-query?
How can we create the complete backup of data in the oracle.
When do you get a .pll extension in oracle? Explain its importance
What is the data type of dual table?
How will you differentiate between varchar & varchar2?
What is different types of joins?
How can I convert single byte kana characters into multi byte kana characters and vice-versa.
what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?
List out the components of logical database structure of oracle database.
What is the purpose of save points in oracle database?