Create a view named productsummary

Assignment Help PL-SQL Programming
Reference no: EM13167093

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: EM13167093

Questions Cloud

Data analysis assignment : STATS 201 / 208 Data Analysis, The data sets for the assignment available on Cecil and include header lines. It is your responsibility to back up your computer files. If you are using your own computer, it is your responsibility to ensure that you ca..
Show the design of a modulo 7 asynchronous counter : Using positive edge triggered flip flops, show the design of a modulo 7 asynchronous counter that counts: 7,6...1,7, etc. You may assume that your flip flops have asynchronous Set and Reset inputs available. (Hint: Connect Q to the clock input of the..
C programs hat print out the max, min, and the average value : Write three C programs that print out the max, min, and the average values of the data file included below. Be sure to include the outputs of the programs in your solutions. Use three data file structures (counter, sentinel, and neither counter/senti..
How can these be used to compare : Using the Internet, search for commercial IDPS systems. What classification systems and descriptions are used? How can these be used to compare the features and components of each IDPS? Breifly compare the different classifications of systems you ..
Create a view named productsummary : Create a view named ProductSummary that uses the view you created in exercise 4. This view should return some summary information about each product.
Regular expression and regular sets that is not solvable : Give an example of a problem about FSAs, Regular Expression and Regular Sets that is not solvable?
Add three rows to the downloads : Add three rows to the Downloads table: one row for user 1 and product 2; one for user 2 and product 1; and one for user 2 and product 2. Use the GETDATE function to insert the current date and time into the DownloadDate column.
Write a program in which a ball is released : Write a program in which a ball is released from a user-defined height and free-falls to the ground. The ball is pulled by earth's gravity of 9.8 m/sec 2 . Assume that each pixel represents 1 cm. Once the ball hits the ground
For each of these four modifications : For each of these four modifications, compute and graph the effects on the original system. Explain in words the effect when the multiprogramming level, N , is small and when N is large.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  The cast function to return the date added column

A column that uses the CAST function to return the DateAdded column with its full time only (hour, minutes, seconds, and milliseconds)

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

  Write programme in oracle to make employee table

List the employee_id and employee_name of the employees form the l_employees table with the top 4 credit limits.

  Create student sorting table

Student.txt in the attachment contains the roster of a class. Each student object has the following fields: student id, last name, first name, academic level.Create a RosterClass to store the student database in vector.

  Write sql statement to add new record to part table

Write SQL statement which creates the stored procedure which adds new record to the Part table, and returns value of newly created PartID PK value in out parameter.

  Script below to create an updateable

Use the script below to create an updateable view named balance_due_view. Then, create and test an INSTEAD OF trigger named invoices_instead_of_insert that lets the user update the columns in the view by directly updating the Invoices table.

  Convert requirement to logic and then to sql

Prepare the SQL query for each of given requirements. Convert requirement to logic, then to SQL. Illustrate the names of all products which have been sold.

  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

  Write a select statement that returns these columns

Write a SELECT statement that returns these columns from the Products table: The date_added column A column that uses the CAST function to return the date_added column with its date only (year, month, and day)

  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.

  Create a view named customer addresses

Create a view named CustomerAddresses that shows the shipping and billing

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