0% found this document useful (0 votes)
54 views

Date: 11-12-2013 Database System Lab 4-BCSF11 (Afternoon) : Instructions

The document provides instructions for a database lab assignment. Students are instructed to work individually and are warned against plagiarism. The assignment involves 10 tasks to write SQL queries that analyze employee data, including finding maximum and minimum salaries, number of employees by job or manager, difference between highest and lowest salaries, and more. Queries must return labeled columns and format averages to two decimal places.

Uploaded by

bilo044
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views

Date: 11-12-2013 Database System Lab 4-BCSF11 (Afternoon) : Instructions

The document provides instructions for a database lab assignment. Students are instructed to work individually and are warned against plagiarism. The assignment involves 10 tasks to write SQL queries that analyze employee data, including finding maximum and minimum salaries, number of employees by job or manager, difference between highest and lowest salaries, and more. Queries must return labeled columns and format averages to two decimal places.

Uploaded by

bilo044
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Database

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.

Instructor: Fakhra Jabeen

Punjab University College Of Information and Technology (PUCIT)

You might also like