Professional Documents
Culture Documents
Hamza Nazir (2872) DB LAB 11-Bscs EVE
Hamza Nazir (2872) DB LAB 11-Bscs EVE
DATA BASE
LAB REPORT: 11
Submitted By: Hamza Nazir (2872)
Submitted To: Sir Yasir
DATE:——-
location table
department table
SQL Query:
Output:
This query retrieves the job history for each employee, including their start date and end date for each position held.
SQL Query:
Output:
It provides the location details for each department, including the location ID and city where each department is situated.
SQL Query:
Output:
This query combines employee data with their respective job titles and departments, providing a comprehensive view of
each employee's role within the organization.
1. All employees and their job histories (including employees without job history):
SQL Query:
Output:
It retrieves the job history for each employee, including those who do not have any job history records.
SQL Query:
Output:
This query provides a list of all departments, including those without any assigned employees, along with the names of
employees assigned to each department.
3. Employees and their managers and departments (including employees without managers or departments):
SQL Query:
Output:
It lists all employees along with their managers and departments, even including employees without assigned managers or
departments.
SQL Query:
Output:
This query provides a list of all locations, including those without any assigned departments, along with the names of
departments assigned to each location.
SQL Query:
Output:
It lists all departments, including those without any assigned employees or locations, along with the names of employees
and city names where each department is located.