





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






select * from EMP where SAL = (select max(SAL) from EMP)
select e.EMPNO,e.ENAME from EMP e where e.deptno = (select deptno from DEPT where DNAME = 'SALES') SCREENSHOT:
select e.EMPNO,e.ENAME
select EMPNO,ENAME,SAL from EMP where sal > ALL ( select sal from EMP where DEPTNO= 30 )
select EMPNO,ENAME, SAL from EMP where sal > ( select MIN(sal) from EMP where DEPTNO= 30 ) SCREENSHOT:
select DNAME, DEPTNO from DEPT where DEPTNO NOT IN ( select DEPTNO from EMP)
FROM EMP e WHERE SAL > (select avg(SAL) from EMP e1 where e1.DEPTNO = e.DEPTNO);
SELECT name,region,population,area from bbc where area = (select min(area) from bbc) SCREENSHOT:
SELECT name,gdp from bbc where gdp > ANY (select gdp from bbc where region='Europe') and gdp =ANY(select gdp from bbc where region <> 'Europe')