group 2


1) Find all people working as CLERK and employed after ADAMS.

Display results ordered by hire dates.

2) Find all jobs which appear both in department 10 and in department 20.

3) Find people who earn the lowest salary for their job and grade.

4) How many people earn less than the maximal salary for the department

located in NEW YORK

5) For each manager find the number of his subordinate. Display name of

the manager and the number of people working under his supervision.

6) Find all employees (personal number, name, profession and salary),

who earn less than the average salary for people with salaries in the third

grade. Display results order by salaries ascending.

7) For each job in each grade find the average yearly incomes.

Order result by jobs.

8) Display names, jobs and hire dates for all employees working in DALLAS.

Order results by names.

9) Show all values of salaries from the 3-rd grade earned by people from

Dallas (don't repeat the same values)

10) Find the number of people who don't supervise the others.

1) select ename from EMP where job='CLERK' and hiredate>(select hiredate from EMP where ename='ADAMS');

2) select job from EMP where deptno=10 INTERSECT select job from EMP where deptno=20;

3) select distinct E1.empno,E1.ename,E1.sal,E1.job from EMP E1, SALGRADE S1

where E1.sal=(select min(E2.sal) from EMP E2

where E1.job=E2.job) order by E1.sal;

4) select count(empno) from EMP where sal<(select max(sal) from EMP where

deptno=(select D.deptno from DEPT D where D.loc='NEW YORK'));

6) select empno,ename,job,sal from EMP where

sal<(select avg(sal) from EMP,SALGRADE where sal between losal and hisal

and grade=3) order by sal asc;

7) select distinct job,avg(sal*12+NVL(comm,0)),grade from EMP,SALGRADE

where sal between losal and hisal

group by job,grade;

8) select ename,job,hiredate from EMP,DEPT where EMP.deptno=DEPT.deptno

and DEPT.loc='DALLAS' order by ename;

9) select distinct sal from EMP,DEPT,SALGRADE where sal between losal and hisal

and EMP.deptno=DEPT.deptno

and DEPT.loc='DALLAS'

and SALGRADE.grade>=3;

10) select count(*) from EMP M

where not exists ( select null from EMP E where E.mgr = M.empno );

5)



Wyszukiwarka

Podobne podstrony:
Lista odpowiedników FM Group
FEDERICO MAHORA-katalog, PRASA, FM Group
pedagogika Piaget i Wygotski, 2009-2012 (Graduates), GROUP 6, Pedagogika
Golden Delicious Group Payback 2007 12
Grammar Test Group?iE
Group 02 Specifications
group 3
Gale Group Encyclopedia of World Religions Almanac Edition Vol 6
pisanie1 txt, 2009-2012 (Graduates), GROUP 4, PISANIE
E faktura zgoda Flavon Group Polska sp z o o
group 4 PRINT
group 2 PRINT
81 Group tactics using sweepers and screen player using zon
The Group Souls of Animals
Produkty FM GROUP for home
Posterior Cervical Muscle Group KT method
end-group analysis
CCI Job Interview Workbook 20 w PassItOn and Not For Group Use

więcej podobnych podstron