103)Display name and salary of ford if his salary
is equal to hisal of
his grade
a)select ename,sal,grade from emp,salgrade
where sal between losal and
hisal
and ename ='FORD' AND HISAL=SAL;
104)Display employee name,job,depart name,manager name,his grade andmake out an under department wise?
a)SELECT
E.ENAME,E.JOB,DNAME,EMP.ENAME,GRADE FROM
EMP,EMP
E,SALGRADE,DEPT
WHERE EMP.SAL BETWEEN LOSAL AND HISAL
AND EMP.EMPNO=E.MGR AND
EMP.DEPTNO=DEPT.DEPTNO ORDER BY DNAME
105)List out all employees name,job,salary,gradeand depart name for every one in the companyexcept 'CLERK'.Sort on salary display the highestsalary?
a)SELECT ENAME,JOB,DNAME,SAL,GRADE FROM
EMP,SALGRADE,DEPT WHERE
SAL BETWEEN LOSAL AND HISAL AND
EMP.DEPTNO=DEPT.DEPTNO AND JOB NOT
IN('CLERK')ORDER BY SAL ASC;
106)Display the employee name,job and hismanager.Display also employee who are withoutmanager?
a)select e.ename,e.job,eMP.ename AS Manager
from emp,emp e where emp.empno(+)=e.mgr
107)Find out the top 5 earners of company?
a)SELECT DISTINCT SAL FROM EMP E WHERE
5>=(SELECT COUNT(DISTINCT SAL)
FROM EMP A WHERE A.SAL>=E.SAL)ORDER BY
SAL DESC;
108)Display name of those employee who aregetting the highest salary?
a)select ename from emp where sal=(select
max(sal) from emp);
109)Display those employee whose salary isequal to average of maximumand minimum?
a)select ename from emp where sal=(select
max(sal)+min(sal)/2 from
emp);
110)Select count of employee in each departmentwhere count greater than 3?
a)select count(*) from emp group by deptno
having count(deptno)>3
111)Display dname where at least 3 are workingand display onlydepartment name?
a)select distinct d.dname from dept d,emp e
