Create a view named customer_addresses that shows the shipping and billing.

Dr. Clayton Christensen is a Harvard Business School professor, cancer survivor, man of faith, and expert on innovation. What was the best piece of advice Christensen gave?
August 7, 2017
What distinguishes a public organization from a private organization?
August 7, 2017
Show all

Create a view named customer_addresses that shows the shipping and billing.

 For this assignment, you will use the create my guitar shop SQL database. This work has assignments for Chapters 12 and 13. Submit your scripts in a Notepad document and be sure to identify each script with chapter and exercise number. Save your Notepad document with a .sql file extension.1) Create a view named customer_addresses that shows the shipping and billing addresses for each customer.This view should return these columns from the Customers table: customer_id, email_address, last_name and first_name.This view should return these columns from the Addresses table: bill_line1, bill_line2, bill_city, bill_state, bill_zip, ship_line1, ship_line2, ship_city, ship_state, and ship_zip.The rows in this view should be sorted by the last_name and then first_name columns.2) Write a SELECT statement that returns these columns from the customer_addresses view that you created in exercise 1: customer_id, last_name, first_name, bill_line1.3) Write an UPDATE statement that updates the Customers table using the customer_addresses view you created in exercise 1. Set the first line of the shipping address to “1990 Westwood Blvd.” for the customer with an ID of 8.

Leave a Reply

Your email address will not be published. Required fields are marked *