Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*SELECT MIN(sal+NVL(comm,0)) "minimalna pensja", MAX(sal+NVL(comm,0)) "maksymalna pensja"
- FROM emp, dept
- where emp.deptno=dept.deptno and dname = 'RESEARCH'; */
- /*select count(*)
- from emp,salgrade
- where emp.sal between losal and hisal and grade=1 */
- /*select count(*), sum(comm)
- from emp,dept
- where emp.deptno=dept.deptno and comm is not null */
- /*select min(sal) minimalna, max(sal) maksymalna, dname departament
- from emp E, dept D
- where E.deptno = D.deptno
- group by D.deptno, dname */
- /*select count(*), dname departament
- from emp E, dept D
- where E.deptno=D.deptno and comm is null
- group by D.deptno, dname */
- /*select count(*), job stanowisko
- from emp
- group by job*/
- /*select count(distinct(job)), dname
- from emp, dept
- where emp.deptno=dept.deptno
- group by dname, dept.deptno*/
- /*select max(sal)-min(sal) roznica, job
- from emp
- group by job
- having max(sal)-min(sal)>100*/
- /*select sum(sal) suma, dname departament
- from emp, dept
- where emp.deptno=dept.deptno
- group by dept.deptno, dname
- having sum(sal)>9000*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement