Question: Objectives This assignment focuses on how to create and use views and indexes This assignment uses the tables associated with the bookstore database. Write SQL



Objectives This assignment focuses on how to create and use views and indexes This assignment uses the tables associated with the bookstore database. Write SQL statements to perform the following queries: Query 1:Create a view named customer_address that shows the shipping for each customer. This view should return these columns from the CUSTOMER table: customer_id, email_address, last_name, and first_name. This view should return these columns from the ADDRESS table: ship_linel, ship_line2, ship_city, ship state, and ship zip. Write a SELECT statement that returns these columns from the customer adress view: customer_id, last name, first_name, ship_city and ship_state. Query 2:Write an SQL statement that updates the customer table using the customer_address view you created in query 1. Set the first line of the shipping address to "1990 Westwood Blvd." for the customer with an ID of 11119. Query 3:Create a view named product summary. This view should return summary information about each product. Each row should include product_id, order_count (the number of times the product has been ordered) and order_total (the total sales for the product). Write a SELECT statement that returns all the columns from the product summary view Query 4: Creates a view named cheap_products whose subquery retrieves products only where the price is less than $50. Add a CHECK OPTION constraint. Wica SELECT salment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
