0% found this document useful (0 votes)
36 views7 pages

Database Lab Assignment 2

The document outlines an assignment to create an EMPLOYEES table with fields including EMPLOYEE_ID, NAME, DESIGNATION, SALARY, and more. It provides instructions to insert sample employee records, display employee names and details based on various criteria like department, date of hiring, salary, location, and job role. Queries are also listed to find departments, cities, and employees within certain conditions and sort orders.

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)
36 views7 pages

Database Lab Assignment 2

The document outlines an assignment to create an EMPLOYEES table with fields including EMPLOYEE_ID, NAME, DESIGNATION, SALARY, and more. It provides instructions to insert sample employee records, display employee names and details based on various criteria like department, date of hiring, salary, location, and job role. Queries are also listed to find departments, cities, and employees within certain conditions and sort orders.

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/ 7

DATABASE SYSTEMS LAB

(BS-DS-2A)

NAME : SAMEER KHOWAJA


REG- NO : DS-221039
YEAR : SPRING 2022
ASSIGNMENT NO 2
1. CREATE A TABLE EMPLOYEES WITH FOLLOWING FIELDS: EMPLOYEE_ID, FIRST_NAME,
LAST_NAME, DESIGNATION, SALARY, BIRTH_DATE, HIRE_DATE, DEPARTMENT AND CITY.

2. ADD AT LEAST 8 UNIQUE EMPLOYEES’ RECORDS (INSERT RELEVANT DATA). ALSO, SHOW
STRUCTURE OF THE TABLE.
2.1 STRUCTURE OF THE TABLE

3. DISPLAY THE NAMES OF ALL THE EMPLOYEES ALONG WITH THEIR DESIGNATION AND
DEPARTMENT
4. DISPLAY THE NAME, SALARY AND DATE OF HIRING OF ALL THE EMPLOYEES SORTED BY THE
DATE OF HIRING IN DESCENDING ORDER.

5. DISPLAY A LIST OF ALL THE DEPARTMENTS IN THE ORGANIZATION (WITHOUT ANY


REPETITIONS)
6. LIST ALL EMPLOYEES HAVING A SALARY LESS THAN 40,000 AND HIRED IN 2018.

7. LIST ALL CITIES HAVING THE LETTER ‘R’ OR ‘I’ IN THEIR NAME.
8. LIST ALL THE DEPARTMENTS WITH EMPLOYEES WHO HAVE JOINED BETWEEN FEBRUARY
2016 AND OCTOBER 2018 SORTED BY THEIR DATE OF HIRING IN DESCENDING ORDER. FOR
EMPLOYEES HAVING THE SAME HIRING DATES, SORT RECORDS BY SALARY IN ASCENDING
ORDER.
9. LIST ALL THE EMPLOYEES WHO ARE MANAGERS IN LAHORE.

10. DISPLAY THE NAMES OF ALL MANAGERS AND AUDITORS ALONG WITH THEIR SALARIES.
ALSO, SHOW A 20% INCREMENT ON THEIR SALARIES UNDER TWO NEW ALIASED FIELDS,
“BONUS” AND “NEW SALARY”.

You might also like