






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 e.EMPNO,e.ENAME,d.DNAME from EMP e,DEPT d where e.DEPTNO=d.DEPTNO
Task 2:
Select e.*, d.DEPTNO, d.LOC from EMP e,DEPT d where e.DEPTNO=d.DEPTNO
Task 3:
from EMP e INNER JOIN DEPT d ON e.DEPTNO=d.DEPTNO where d.DNAME='SALES'
Task 5:
SELECT d.DNAME FROM EMP e INNER JOIN DEPT d
ON e.DEPTNO =d.DEPTNO GROUP BY d.DNAME HAVING COUNT(*) >= 5 order by d.DNAME ASC
Task 6:
select d.DNAME, sum(sal) AS TOTALSAL from EMP e INNER JOIN DEPT d on e.DEPTNO=d.DEPTNO GROUP by d.DNAME
Task 8:
select e.EMPNO,ENAME,JOB from EMP e where job='MANAGER'
Task 9:
select a.ENAME, a.SAL from EMP a, EMP b where a.SAL > b.SAL and a.MGR = b.MGR
Task 11:
Select c.CUS_LNAME, i.INV_INT, i.INV_DATE,P_DESCRIPT from CUSTOMER c, INVOICE i, PRODUCT p, Line l where c.CUS_CODE=i.CUS_CODE and i.INV_INT=l.INV_INT and l.P_CODE=p.P_CODE order by c.CUS_LNAME DESC
Task 12:
select p.P_DESCRIPT,i.INV_INT,i.inv_date from product p,invoice i,line l where p.p_code=l.p_code AND l.inv_int=i.inv_int order by p.p_descript asc