Beruflich Dokumente
Kultur Dokumente
Delete from EMP where rowid not in (select min (rowid) from EMP
Group by empno);
Select * from EMP where rowid= (select max (rowid) from EMP);
Select * from EMP a where & n = (select count (*) from EMP b where a.sal <
b.sal);
(or)
Select min (sal) from (select sal from EMP order by sal desc)
Group by deptno;
Select rownum as rank, ename, sal from (select ename, sal from EMP order
by sal desc)
Where rownum<=3;
13) To find all the Employees Who earns more than the Average Sal in their
Dept:
Select ename, sal, deptno from EMP outer where sal > (select avg (sal) from
EMP
Where deptno=outer.deptno)
Select * from (select ename, sal, rownum as rnum from EMP where rownum
<14)
Where rnum between 10 and 13;
Select * from (select ename, rownum as rnm from EMP where rownum<13)
Where rnm=9;