Create a view named customer addresses

Assignment Help PL-SQL Programming
Reference no: EM13167081

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.

 

 

Reference no: EM13167081

Questions Cloud

The goal of this project is to create : The goal of this project is to create a simple command line program that reads in a single word from the command line (use the "int argc, char * argv[]" approach discussed in class and in previous projects) and stores the unique letters of that wo..
Write a program that reads an array with wind-tunnel test : write a program that reads an array with wind-tunnel test data then allowss the user to enter a flight-path angle. If the angle is within the bounds of the data set, the program should then use linear inteerpolation to compute the corresponding coeff..
Generate a two-dimensional array : Generate a two-dimensional array of integers of 10 rows by 10 columns that contains 100 random numbers between 0 and 9. Print out the array (well formatted) and do the following computations
End to end encryption : How is end to end encryption different from other types of encryption? At what layer does it take place?
Create a view named customer addresses : Create a view named CustomerAddresses that shows the shipping and billing
Create a job class that holds a job id : Create a Job class that holds a Job ID number and the cost of the Job. Include insertion and extraction operators. Create a JobException class that holds a Job and an error message
Write a method that accepts a string : Write a method that accepts a String object as an argument and displays its contents backward. For instance, if the string argument is "gravity" the method should display - "ytivarg". Demonstrate the method in a program that asks the user to input..
Using positive edge triggered t : Using positive edge triggered T flip flops, show the design of a modulo 7 asynchronous counter that counts 0,1...6,0, etc. You may assume that your flip flop
Write a method called rectsum : Write a method called rectSum that will get the sum of a rectangle of elements within a 2D array of ints

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

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