[Solved] DBS301-Lab 5 Joins

$25

File Name: DBS301-Lab_5_Joins.zip
File Size: 169.56 KB

SKU: [Solved] DBS301-Lab 5 Joins Category: Tag:
5/5 - (1 vote)

This weeks lab continues using the SELECT command in addition to now incorporating multiple tables in the FROM statement to gather information together.

Tasks

Part-A Simple Joins

(FROM <table1, table2>)

  1. Display the department name, city, street address and postal code for departments sorted by city and department name.
  2. Display full name of employees as a single field using format of Last, First, their hire date, salary, department name and city, but only for departments with names starting with an A or S sorted by department name and employee name.
  3. Display the full name of the manager of each department in states/provinces of Ontario, New Jersey and Washington along with the department name, city, postal code and province name. Sort the output by city and then by department name.
  4. Display employees last name and employee number along with their managers last name and manager number. Label the columns Employee, Emp#, Manager, and Mgr# respectively.

Part-B Non-Simple Joins

Using the JOIN statement

  1. Display the department name, city, street address, postal code and country name for all Departments. Use the JOIN and USING form of syntax. Sort the output by department name descending.
  2. Display full name of the employees, their hire date and salary together with their department name, but only for departments which names start with A or S.
    1. Full name should be formatted: First / Last.
    2. Use the JOIN and ON form of syntax.
    3. Sort the output by department name and then by last name.
  3. Display full name of the manager of each department in provinces Ontario, New Jersey and Washington plus department name, city, postal code and province name.
    1. Full name should be formatted: Last, First.
    2. Use the JOIN and ON form of syntax.
    3. Sort the output by city and then by department name.
  4. Display the department name and Highest, Lowest and Average pay per each department. Name these results High, Low and Avg.
    1. Use JOIN and ON form of the syntax.
    2. Sort the output so that department with highest average salary are shown first.
  5. Display the employee last name and employee number along with their managers last name and manager number. Label the columns Employee,
    1. Emp#, Manager, and Mgr#, respectively.
    2. Include also employees who do NOT have a manager and also employees who do NOT supervise anyone (or you could say managers without employees to supervise).

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] DBS301-Lab 5 Joins
$25