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

  Display cname of the customer table in alphabetical order

DISPLAY CNAME OF THE CUSTOMER TABLE IN ALPHABETICAL ORDER. DISPLAY WAREHOUSENO OF THE WAREHOUSE TABLE WHOSE WCITY IS ‘HUBLI'.

  Changes require to make-premiere products database

Point out the changes you require to make to Premiere Products database to support following situation: A customer is not necessarily represented by a single sales rep but can be represented by several reps.

  Imagine that you work for a finance industry-based

imagine that you work for a finance industry-based organization. your organization is looking to submit its database

  Creating use case to describe typical sales process

Create use case to describe a typical sales process. Then make a sequence diagram for use case.

  Which group functions can be used on date values

If the "greater than" comparison operator is used with a multiple-row subquery, what type of result will be returned?

  Find all governors general of australia

Find all Governors General of Australia who were Barons at the time and Restrict your query to Governors General who were Barons at the time of their appointment

  Conceptual database scheme for the csrss

Develop an E/R diagram to represent the conceptual database scheme for the CSRSS and list the information of all doctors who are specialized is heart surgery.

  Effect of stunting growth later in life

Several male athletes have reported having growth spurts well into their college years. Why is this phenomenon more likely for males then females?

  Implement a database of courses and students for a school

implement a database of courses and students for a school keeping track of which students are taking which courses.

  Identify the primary keys and creating foreign keys

In class practice: Turn each ER diagram into a database diagram by identify the primary keys and creating foreign keys. Insert new columns or tables as needed. Also, if necessary, specify what must be done to enforce maximum and minimum cardinalit..

  Basic component of a database system

Which of the following is not a basic component of a database system? Which of the following terms is synonymous with "tuple"

  What is the output when the following script is executed

Determine the answer (expected result) based on your reading of from text book: -  Just show the expected output when you run the syntax.

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