Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

VIEWS / MYSQL Hi, I need some help checking mysql queries, any help would be greatly appreciated: Create a view named customer_address that shows the

VIEWS / MYSQL

Hi, I need some help checking mysql queries, any help would be greatly appreciated:

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_line1, ship_line2, ship_city, ship_state, and ship_zip. Write a SELECT statement that returns these columns from the customer_address view: customer_id, last_name, first_name, ship_city and ship_state.

/* 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. */

image text in transcribed

image text in transcribed

Create a view that lists the product ID and product name for each product along with the first name and phone number of the person to contact if the product needs to be reordered. Name the view reorder_info. Write a SELECT statement that returns all the columns from the reorder_info view.

disabled store id store id region_id region_name order id customer id employee_id store_id order_date ship_amount tax_amount ship_date shipping_address_idINT(4) card type card_number card_expires billing_address_id orderid VARCHAR(10) VARCHAR(3) CHAR(5) CHAR(5) CHAR(25) INT(4) INT(4) INT(4) VARCHAR(3) DATETIME DECIMAL(10,2) DECIMAL(10,2) DATETIME STORE PK PK FK FK FK ORDERS CUSTOMER EMPLOYEE STORE VARCHAR(50) CHAR(16) VARCHAR(7) INT(4) INT(4) ORDERITEMS PK ORDERS FK itemid product_id quantit item_price discount amount employee_id store_id first name last name phone email salary mgr INT(4) INT(4) INT(3) DECIMAL(10,2) DECIMAL(10,2) INT(4) VARCHAR(3) CHAR(25) CHAR(25) CHAR(12) VARCHAR(100) DECIMAL(10,2) INT(4) INT VARCHAR(255) CHAR(255) CHAR(255) CHAR(255) FK PRODUCT EMPLOYEE PK FK STORE UNIQUE ADMINISTRATORS admin id PK email_address password first name last_name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Liquids have a definite volume and indefinite shape O True O False

Answered: 1 week ago