Bhagwan Parshuram Institute of Technology
B.Tech (IT) 4th Semester
Subject: CIC-256: DBMS Lab.
List of Practical Exercises
Set 2: Querying Single Table
Note: Consider the EMP and DEPT tables created in Set 1 for the following queries.
1. List the name and salary of the employees whose salary is more than 1000.
2. List the names of clerks working in the department 20.
3. List the names of analysts and salesman.
4. List the names of employees who are not manager.
5. List the details of the employees who have joined before the end of september’81.
6. List the names of the employees whose employee numbers are 7369,7521,7566,7782.
7. List the names of the employees not belonging to the department 10 and 20.
8. List the employees name and salary, whose salary is between 1000 and 2000.
9. List the different jobs available in the employee table.
10. List the employees who are eligible for commission.
11. List the employees who are not eligible for commission.
12. List the details of the employees whose salary is greater than 2000 and commission is
null.
13. List the employees whose name start with ’S’.
14. List the employee names having ‘I’ as the second character.
15. List the name, salary, and PF amount of all the employees.
16. List the employee ID, name and salary in ascending order of salary.
17. List the employees name and date of joining in descending order of date of joining.
18. List the employees name, salary, job, and department number in ascending order of the
department number and then on descending order of salary.
19. List the employees name, salary, PF, HRA, DA, and GROSS, order the result in
ascending order of gross. (HRA is 50% of salary, DA is 30% of salary, PF is 10% of
salary)
20. List the number of employees working with the company.
21. List the number of jobs available in the emp table.
22. List the total salary payable to employees.
23. List the maximum salary of employee working as a salesman.
24. List the minimum salary.
25. List the average salary and number of employees working in the department 20.
26. List the department number and number of employees in each department.
27. List the job and the number employees in each job. The result should be in descending
order of the number of employees.
28. List the total salary, maximum and minimum salary of employee job wise.
29. List the average salary for all the departments employing more than 2 people.
30. List the jobs of all the employees where maximum salary is greater than or equal to 1000.