Date: 11-12-2013 Database System Lab 4-BCSF11 (Afternoon) : Instructions
Date: 11-12-2013 Database System Lab 4-BCSF11 (Afternoon) : Instructions
Date: 11-12-2013
Database System
Lab 4-BCSF11 (Afternoon)
Instructions:
Work on this lab individually. Discussion is not allowed.
Evaluation of tasks will be conducted in lab.
Anyone caught being indulged in the act of plagiarism would be awarded
an F grade in this lab.
Perform the following Tasks:
1. Display the maximum, minimum, sum and average salary of the entire
employees, Label the column MAX, MIN, SUM, and AVG.
2. Write a query that displays the number of people with same job.
3. Write a query that displays the number of managers in the employee table.
4. Write a query that displays the difference of highest and lowest salaries. Label
the column DIFFERENCE.
5. Display the manager name and manager number and the lowest salary paid
employee for that manager. Exclude that person who dont have manager and
also exclude whose salary is less than 6000. Sort the output in ascending order.
6. Write a query that display the departments name, location, number of employees
and the average salary for all the employees in that department. Label the
columns NAME, LOCATION, NUMBER OF PEOPLE and SALARY. Round the
average salary upto two decimal places.
7. Create a query that display the total number of employees and the number of
employee hired in 1981, 1982, 1983. Create the appropriate column name.
8. Create a query that displays the 4 highest salaries.
9. Create a query that displays the 4 lowest salaries.
10. Create a query that displays the salary of those employees who earn more than
average salary.