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
From the following identify the non schema object: packages, triggers, public synonyms, tables and indexes.
Explain rename?
What is the purpose of tables, private synonyms and public synonyms in Oracle?
Can we use oracle pl/sql block in core java? if so how? pls get back to me .....
How to retrieve data from an cursor to a record?
Is there a function to split a string in plsql?
What privilege is needed for a user to connect to oracle server?
How to start an oracle instance?
How to run queries on external tables?
What is a synonym? What are its various types?
What is the difference between a user and a schema in oracle?
How to invoke the data pump import utility?
In not less than 100 words what's the main difference between Rolap and Molap in ORACLE ?
What is ordinary table in oracle?
How do we get field details of a table?