Hello, can you please assit me with this. I am struggling to get the code to run correctly without errors: 1. Write a query using a join that displays Department names (not Department_IDs) Employees’ IDs, last & first names Sort your results by department name and employee last and first name. NOTE: INNER JOIN is OK here. NOTE: I suggest you use table aliases. */ /* 2. Write a query using a join that displays Department names (no DEPARTMENT_IDs). Job titles (not Job_IDs) Employees’ IDs, last & first names, Sort your results by department name, job title, and employee last and first name. NOTE: INNER JOIN is OK here. NOTE: I suggest you use table aliases. */ /* 3. Write a query using a self-join to display Employees’ IDs and names along with Their manager’s ID and name. Use column aliases so that it is clear which columns are for the Manager and which columns are for the Employee. Display Manager data first. Sort your results by the managers’ last & first names and then by the employees’ last & first names. NOTE: INNER JOIN is OK here. NOTE: I suggest you use table aliases. */ /* 4. The company would like to identify All of the customers that have never placed an order. Write a query using a join that provides this information. Your results should include all the customer details. Sort your results by the customers’ last & first names. NOTE: INNER JOIN will NOT work here. NOTE: I suggest you use table aliases. */ /* 5. The company needs a list of every Customer and every Book. In addition to Customers who have purchased Books and the Books purchased, This report should also include Customers who have not purchased Books Books that have not been purchased. NOTE: This should NOT be a Cartesian Product. The managers need to see: Customer_Id Last_Name First_Name ISBN Book_Title Book_Price For those Books that have been purchased, they also need to see: Order_Number Order_Date Unit_Price Quantity Sort your results by cistomer last and first name, book title, and order date NOTE: INNER JOIN will NOT work here. NOTE: I suggest you use table aliases.
Hello, can you please assit me with this. I am struggling to get the code to run correctly without errors:
1. Write a query using a join that displays
Department names (not Department_IDs)
Employees’ IDs, last & first names
Sort your results by department name and employee last and first name.
NOTE: INNER JOIN is OK here.
NOTE: I suggest you use table aliases.
*/
/*
2. Write a query using a join that displays
Department names (no DEPARTMENT_IDs).
Job titles (not Job_IDs)
Employees’ IDs, last & first names,
Sort your results by department name, job title, and employee last and first name.
NOTE: INNER JOIN is OK here.
NOTE: I suggest you use table aliases.
*/
/*
3. Write a query using a self-join to display
Employees’ IDs and names along with
Their manager’s ID and name.
Use column aliases so that it is clear which columns are for the Manager and which columns are for the Employee.
Display Manager data first.
Sort your results by the managers’ last & first names and then by the employees’ last & first names.
NOTE: INNER JOIN is OK here.
NOTE: I suggest you use table aliases.
*/
/*
4. The company would like to identify
All of the customers that have never placed an order.
Write a query using a join that provides this information.
Your results should include all the customer details.
Sort your results by the customers’ last & first names.
NOTE: INNER JOIN will NOT work here.
NOTE: I suggest you use table aliases.
*/
/*
5. The company needs a list of every Customer and every Book.
In addition to
Customers who have purchased Books and the Books purchased,
This report should also include
Customers who have not purchased Books
Books that have not been purchased.
NOTE: This should NOT be a Cartesian Product.
The managers need to see:
Customer_Id
Last_Name
First_Name
ISBN
Book_Title
Book_Price
For those Books that have been purchased, they also need to see:
Order_Number
Order_Date
Unit_Price
Quantity
Sort your results by cistomer last and first name, book title, and order date
NOTE: INNER JOIN will NOT work here.
NOTE: I suggest you use table aliases.
*/
Trending now
This is a popular solution!
Step by step
Solved in 7 steps