0% found this document useful (0 votes)
87 views6 pages

Database Lab Assignment 3

This document contains instructions for 10 assignments involving analyzing and manipulating employee data from a database table. The assignments include deleting and adding columns to the table structure, querying data to display employee names with designation and department, counting auditors, listing departments and employee counts by city, calculating average salary by department, and more.

Uploaded by

Sameer Khowaja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views6 pages

Database Lab Assignment 3

This document contains instructions for 10 assignments involving analyzing and manipulating employee data from a database table. The assignments include deleting and adding columns to the table structure, querying data to display employee names with designation and department, counting auditors, listing departments and employee counts by city, calculating average salary by department, and more.

Uploaded by

Sameer Khowaja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

DATABASE SYSTEMS LAB

(BS-DS-2A)

NAME : SAMEER KHOWAJA


REG- NO : DS-221039
YEAR : SPRING 2022
ASSIGNMENT NO 3
1. DELETE THE COLUMNS FIRST_NAME AND LAST_NAME. SHOW THE TABLE STRUCTURE.
2. ADD A NEW COLUMN EMPLOYEE_NAME AS THE SECOND FIELD. SHOW THE TABLE
STRUCTURE.

3. DISPLAY THE NAME OF EMPLOYEES ALONG WITH THEIR DESIGNATION AND DEPARTMENTS.
THE OUTPUT SHOULD HAVE ONLY ONE COLUMN WITH COMMA SEPARATED VALUES.
4. COUNT THE TOTAL NUMBER OF AUDITORS IN THE ORGANIZATION. LABEL APPROPRIATELY.
5. LIST THE DEPARTMENTS IN EACH CITY ALONG WITH THEIR NUMBER OF EMPLOYEES.
6. LIST THE AVERAGE SALARY FOR EACH DEPARTMENT.

7. DISPLAY THE NUMBER OF EMPLOYEES WHO HAVE SERVED FOR OVER 8 YEARS IN EACH
DEPARTMENT.
8. CALCULATE THE TOTAL SALARY EXPENSE FOR EACH DESIGNATION. LIST FROM HIGHEST TO
LOWEST.

9. COUNT THE TOTAL NUMBER OF RECORDS. LABEL THE RESULT AS NUMBER OF EMPLOYEES.

10. . FOR EACH CITY, LIST THE DEPARTMENTS WITH AN AVERAGE SALARY OF 70,000 OR MORE.
THE AVERAGE SALARY FOR THESE DEPARTMENTS SHOULD HAVE A PRECISION OF TWO
DECIMAL PLACES. LABEL THE COLUMNS APPROPRIATELY.

You might also like