Write a select statement that returns three columns

Assignment Help PL-SQL Programming
Reference no: EM13703726

Query 1: Write a SELECT statement that returns three columns: EmailAddress, OrderID, and the order total for each customer. To do this, you can group the result set by the EmailAddress and OrderID columns. In addition, you must calculate the order total from the columns in the OrderItems table.

Query 2: Write a second SELECT statement that uses the first SELECT statement in its FROM clause. The main query should return two columns: the customer's email address and the largest order for that customer. To do this, you can group the result set by the EmailAddress column.

I'm not sure how to answer the question. Can anyone help me?

 

Reference no: EM13703726

Questions Cloud

Difference between x and &x : Suppose x is defined as int x = 5; Explain in your own words what the difference between x and &x.
Write a function named putinorder : Write a function named "PutInOrder" that has 2 double reference parameters (say a and b). The function rearranges the values pointed to by a and b such that a points to the smallest value and b to the largest value.
Correlated sub-query to return one row per customer : Use a correlated sub-query to return one row per customer, representing the customer's oldest order (the one with the earliest date).
Draw the arrow pushing mechanism of reaction : Problem- The combination of sodium chlorite and acetic acid forms hypochlorous acid (HOCl). Draw the arrow pushing mechanism of your reaction, using HOCl as reagent.
Write a select statement that returns three columns : Write a SELECT statement that returns three columns: EmailAddress, OrderID, and the order total for each customer. To do this, you can group the result set by the EmailAddress and OrderID columns.
Explain the average mass of an atom of sodium : Problem- Suppose that the atomic mass unit (amu) had been defined as one-tenth of the average mass of an atom of sodium instead of one-twelfth of the mass of an atom of carbon-12.
Write select statement that returns categoryname : Write a SELECT statement that returns the CategoryName column from the Categories table.
Write a select statement that answers the problem : Write a SELECT statement that answers this problem - Which products have a list price that's greater than the average list price for all products?
What is the concentration of the hcl : Problem- A student pipets 10 mL of HCl into a beaker and dilutes it to 25mL with water He adds .20M NaOH to a burette. The initial reading of the burette is 26.45 mL and the final reading is 10.05 mL several drops of phenolpthalein are added as an..

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Write the sql ddl to create the database

Write a command that will remove the Jones that lives in Orange from the Customer table .Write the SQL DDL to create the database that contains each of the relations shown in the above ERD.

  Create a comparison document

Create a Comparison Document

  Updating column in table after a shopper completes the

after a shopper completes the ordering process a procedure is called to update the following columns in the basket

  Write sql statements for the ten queries

Write SQL statements for the ten queries - find the names of all Tracks that are more than 10 minutes (600,000 ms) long. Result: (name: varchar(255))

  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.

  Trigger named products_update

Create a trigger named Products_UPDATE. This trigger should insert the old data about the product into the ProductsAudit table after the row is updated. Then, test this trigger with an appropriate UPDATE statement.

  A critical analysis of the available literature

Given the time scale and the need to obtain ethical approval for primary research, you are required to undertake secondary research only i.e. research using data from other sources.

  Write sql statement to produce single column

Write an SQL statement to produce a single column called ItemLocation that combines the SKU_Description,the phrase "is located in."

  Suggest three ddl and three dml commands

Describe a specific scenario, situation, or application where using a foreign key would be necessary and explain your reasons, including the characteristics of the data, that necessitate the foreign key.

  Create a plsql block to achieve the following using the hr

create a plsql block to achieve the following using the hr schemaselect the name salary and department of the employee

  Provide a comprehensive record of using sql

Learning Objectives: The purpose of Project 3 is to enable the students to gain extensive experience with using SQL to design and query databases.

  Update stock levels when the order is cancelled

Execute queries to confirm that the basket order status and product stock levels have been appropriately modified by the trigger - the trigger needs to fire when a new status record is added to the BB_BASKETSTATUS table and when the IDSTAGE col..

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