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

  Write sql statement which creates stored procedure

Write SQL statement which creates stored procedure with one int input parameter. Stored procedure selects supplierId field and total of all Count field values for each group of supplierId's from Part table.

  Write sql commands to implement profile

Write SQL commands which would implement this profile. Next, write query that would list profile, profile resource name, and limit value for the new profile.

  Write sql statement-display major of student-no duplications

Write a SQL statement to display the Major of the student with no duplications. Write a SQL statement to display the First and Last name of students who live in the Zip code 88888.

  Script that creates and calls a function

Write a script that creates and calls a function named fnItemTotal that calculates the total amount of an item in the OrderItems table (discount price multiplied by quantity)

  Explaining sql insert statement to insert new row in cds

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

  Select distinct cmdclient

SELECT DISTINCT CMDclient.'Client Code SCA' as GuestCode, CMDextras.ArrivalDate as arr, CMDextras.DepartureDate as dep, CMDapr.FirstName as fname, CMDapr.Surname as lname

  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

  Create a database model

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

  Write command to list all the employees in year

Write the command to list all the employees hired in 2003 and 2004. Sort the rows by the hire_date column in descending order.

  Table called transactionlog

Create a table called TransactionLog. Create a trigger, which inserts a new record (user CardNo, ISBN, date) into the TransactionLog table whenever the a borrower checks out a book or returns a book.

  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).

  Write statement which creates table named part

Write the statement which creates table named Part, with Id field as an int idendity PK, a SupplierId int field, a Description string field of size 25, a Count int field, a Class string field

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