You are on page 1of 1

Set 1: Tables Emp, Dept, salgrade

1. Select the employees in department 30.


2. List name, job and salary of all employees in department 20 who earn more than 2000/-.
3. Find the details of all the managers (in any dept) and clerks in dept 20.
4. Find the employees who are clerks, analysts or salesmen.
5. If all the employees not receiving commission is entitles to a bonus of Rs. 250/- show the net
earnings of all the employees.
6. Display the names and jobs of all the employees separated by a space.
7. Show the first 3 and last 3 characters of the names of all the employees.
8. Show the names of all the employees and date on which they completed 3 years of service.
9. Display the names, jobs and salaries of employees, sorting on job and salary.
10. List all the department names along with the names of employees in them , irrespective of the
fact whether any employee is there or not.
11. List all the employee names along with the names of their bosses, irrespective of the fact
whether any employee has boss or not.
12. Display the difference between the highest and lowest salary.
13. Display department name and the difference between the highest and lowest salary for that
department.
14. Count distinct salary figures and number of employees receiving it.
15. Find all the department details in which at least one employee is working.
16. Display the job and the difference between the highest and the lowest salary for each job.
17. Display manager and the salary of lowest paid employee of the manager.
18. Display name , hire date and salary of all the employees who have both salary and commission
same as SCOTT. Do not include Scott in the list.
19. Find out earliest 3 employees who have joined the company. Display their rank as well.
20. * Display employees who joined in the last month(1st day of last month Last day of last
month). Do not hardcode the month name.
21. How much more salary does each person need to earn to go in the next grade?
22. Display employees who are in that same grade as Miller and do not belong to the place which
Miller belongs to.
23. Display the locations where total salary of grade 3 employees is greater than total salary of
grade 4 employees.
24. Find all duplicate records in STUDENT table.
25. Delete all duplicate records from STUDENT table.

You might also like