I have one table :EID,Depid,ename,sal
I want to have max(sal) in each department.
Answer Posted / narasimha
select e.eid,e.sal,e.depid,e.ename,e.sal from emp e
where 1>(select count(*) from emp w where e.sal<w.sal and
e.depid=w.depid) order by e.deptno asc
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
Briefly explain what is literal? Give an example where it can be used?
ur a sql devoloper...what is the process in ur company for finding the database BUGS .. seperate DB testers are there? or devr.s are manage? if DB TESTERS in there what is the process
can u send the sql dumps to sivakumarr1987@gmail.com plz help me
What is a sub query and what are the different types of subqueries?
What is the usage of save points in oracle database?
What is meant by recursive hints in oracle?
Explain the difference between a procedure and a function? What do you understand by those terms?
How do I start tns listener?
What is a subquery in oracle?
What is a server parameter file in oracle?
Explain the characteristics of oracle dba?
How to use an explicit cursor without open statements?
What is Segment Advisor in Oracle?
State all possible different index configurations a table can possibly have?
What is Virtual Private Database in Oracle?