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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started