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

Lab 9

The document contains a list of 8 queries to be written for a database systems course assignment submitted by 4 students - Fatima Mumtaz, Fatima Nisar, Hajra Babar, and Maryam Khalid. The queries involve displaying employee data such as name, department, job, location, manager, and employees in the same department from various tables in the database. The students are asked to write SQL queries to retrieve and display the specified data according to the descriptions provided for each query.

Uploaded by

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

Lab 9

The document contains a list of 8 queries to be written for a database systems course assignment submitted by 4 students - Fatima Mumtaz, Fatima Nisar, Hajra Babar, and Maryam Khalid. The queries involve displaying employee data such as name, department, job, location, manager, and employees in the same department from various tables in the database. The students are asked to write SQL queries to retrieve and display the specified data according to the descriptions provided for each query.

Uploaded by

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

Department of Computer Science

Course Title:
Database Systems
Submitted To:
Mam Mehwish
Submitted By:
Fatima Mumtaz (009)
Fatima Nisar (010)
Hajra Babar (013)
Maryam Khalid (074)
1) Write a query to display the last name, department number, and
department name for all employees.
2) Create a unique listing of all jobs that are in department 30. Include the
location of department 40 in the output.

3) Write a query to display the employee name, department name and


location of all employees who earn a commission.
4) Display the employee name and department name for all employees who
have an ‘a’ in their name.

5) Write a query to display the employee name, job, department number and
department name for all employees who work in ‘DALLAS’.

6) Display the employee name and employee number along with their
manager name and manager number. Label the columns Employee, Emp #,
Manager and Mgr # respectively.
7) Modify the above query to display all employees including King, who has
no manager. Order the results by employee number.

8) Create a query that displays the employee name, department number, and
all the employees who work in the same department as a given employee.
Given each employee an appropriate label.

You might also like