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

DBMS Lab 4

The document outlines a series of tasks for a Database Management System lab, focusing on SQL queries and joins. It includes specific problems to solve, such as employee and manager relationships, employee details in Toronto, and filtering employees based on commission. The tasks emphasize practical application of SQL skills for database analysis and manipulation.

Uploaded by

ghauri4600302
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)
14 views6 pages

DBMS Lab 4

The document outlines a series of tasks for a Database Management System lab, focusing on SQL queries and joins. It includes specific problems to solve, such as employee and manager relationships, employee details in Toronto, and filtering employees based on commission. The tasks emphasize practical application of SQL skills for database analysis and manipulation.

Uploaded by

ghauri4600302
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

CT-067

Khansa Khan Ghauri

DBMS LAB 4
1. Complete the ‘Basic Joins’ section of SQL 50 Badge on leetcode.
1378. Replace Employee ID with the Unique Identifier

1068. Product Sales Analysis I

1581. Customer Who Visited But Did not Make Any Transactions

Database Management System


CT-067
Khansa Khan Ghauri

197. Rising Temperature

1661. Average Time of Process per Machine

577. Employee Bonus

Database Management System


CT-067
Khansa Khan Ghauri

1280. Students and Examinations

570. Managers with atleast 5 direct reports

1934. Confirmation rate

Database Management System


CT-067
Khansa Khan Ghauri

2. Study Self Join and solve the following question:


Display the employee last name and employee id along with their manager’s last
name and manager id. Label the columns as Employee_ID, Emp_LN , Manager_ID,
and Mgr_LN.

3. Write a query to display the last name, job, department number, and department name
for all employees who work in Toronto.

Database Management System


CT-067
Khansa Khan Ghauri

4. Display the employee full name and department name for all employees who have an
i (lowercase) in their full names.

5. Write a query to display the employee last name, department name, location ID, and
city of all employees who earn a commission.

Database Management System


CT-067
Khansa Khan Ghauri

6. Display the names and hire dates for all employees who were hired before their
managers, along with their manager’s names and hire dates. Label the columns
Employee, Emp_Hired, Manager, and Mgr_Hired. Order the results in descending by
the employee number.

Database Management System

You might also like