Question: Oracle SQL Question: Write a query that returns three columns for each order: email_address of the customer, order_id, and the order total. To do this,

Oracle SQL Question:

Write a query that returns three columns for each order: email_address of the customer, order_id, and the order total. To do this, group the result set by the email_address and order_id columns. In addition, you must calculate the order total from the columns in the Order_Items table. (You will not need subqueries to complete this exercise.)

Sort the results in descending sequence by order total.

Write a query that uses the query you created in the previous exercise in a subquery factoring clause. The main query should return the order_id and customer's email_address for orders whose total is greater than the average of the order totals.

Order the results by order_id in ascending order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!