Create a view named customeraddresses

Assignment Help Database Management System
Reference no: EM13949169

1. Create a view named CustomerAddresses that shows the shipping and billing addresses for each customer in the MyGuitarShop database. This view should return these columns from the Customers table: CustomerID, EmailAddress, LastName and FirstName. This view should return these columns from the Addresses table: BillLine1, BillLine2, BillCity, BillState, BillZip, ShipLine1, ShipLine2, ShipCity, ShipState, and ShipZip.

2. Write a SELECT statement that returns these columns from the CustomerAddresses view that you created in exercise 1: CustomerID, LastName, FirstName, BillLine1.

3. Write an UPDATE statement that updates the CustomerAddresses view you created in exercise 1 so it sets the first line of the shipping address to "1990 Westwood Blvd." for the customer with an ID of 8.

4. Create a view named OrderItemProducts that returns columns from the Orders, OrderItems, and Products tables.
This view should return these columns from the Orders table: OrderID, OrderDate, TaxAmount, and ShipDate.
This view should return these columns from the OrderItems table: ItemPrice, DiscountAmount, FinalPrice (the discount amount subtracted from the item price), Quantity, and ItemTotal (the calculated total for the item).
This view should return the ProductName column from the Products table.

5. Create a view named ProductSummary that uses the view you created in exercise 4. This view should return some summary information about each product.
Each row should include these columns: ProductName, OrderCount (the number of times the product has been ordered), and OrderTotal (the total sales for the product).

6. Write a SELECT statement that uses the view that you created in exercise 5 to get total sales for the five best selling products.

Attachment:- Guitar Database.docx

Reference no: EM13949169

Questions Cloud

Examine the many different types of attacks : There are many different types of infrastructure attacks. These include, but are not limited to, malware, insertion, buffer overflow, etc. Examine the many different types of attacks and select the two that you believe are the easiest for succes..
How would you describe the type of location sites : Technical: After developing your regression model, check to make sure the technical assumptions are satisfied. Comment on any points that would concern you based on the diagnostics.
How employees would interact with these devices : Speculate how employees would interact with these devices and the type of emotional reaction that customers and employees will experience while placing a beverage, appetizer or entrée order
Explain what the circuit does : 1. The input to the circuit of Figure P12.76 is a square wave having a period of 2 s, maximum value of 5 V, and minimum value of 0 V. Assume all flip-flops are initially in the RESET state.
Create a view named customeraddresses : Write a SELECT statement that returns these columns from the CustomerAddresses view that you created in exercise 1: CustomerID, LastName, FirstName, BillLine1.
What is the irr of this project : What is the NPV of this project, if the discount rate is 8.6%? Should the firm accept this project? What is the IRR of this project? Should the firm accept this project?
Dbms for the most effective result : Different components and models that may be implemented by a DBMS for the most effective result at a particular company. In this assignment
Problem regarding the odd-parity system : 1. Assume that a parity bit is transmitted for every nibble of data. Design two logic circuits that check a nibble of data and its parity bit to determine if there may have been a data transmission error. Assume first an even-parity system, then a..
The real value of higher education : Instructions: Read the article "The Real Value of Higher Education" by former UNC System President , Tom Ross, (handout) and compose a summary/ response essay that refers to, summarizes, analyzes, and responds to this article, which we have rea..

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd