Day3 Assignment

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 3

Exercise :

2. List deptno, dname along with total salary in each department.


3. List details from emp, dept and salgrade table excluding clerks and
employees with grade 1. Order on their names.
4. List employee with grade 3 or 4
5. List employees located in dallas.
6. List ename, job, sal, grade, dname with annual renumeration greater
than 36000 or any clerks.
7. List employee and department details for department 30 and 40.
8. List all employees who earn less than their managers. List their
managers details also.
9. Find the job that was filled in first half of 1981 and the same job that
was filled during second half of 1981
9. Find all employees who joined the company before their manager
Exercise :
2. List employee working under KING
3. List department with maximum average salary.
4. Find employees who earn highest salary in each job type.
5. Find employees who earn minimum salary for each job type
excluding clerks. Sort on their salary.
6. Find most recently hired employee in each department. Order by
hiredate.
7. List departments for which no employees exists.
8. Analyze following query :
SELECT ENAME,SAL FROM EMP E
WHERE 3 > (SELECT COUNT(*) FROM EMP
WHERE SAL > E.SAL)
8. In which year did most people join the company. Display the year and
no of employees
9. Display department with maximum average salary.

You might also like