Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

1. How do listening and hearing diff er?

Answered: 1 week ago

Question

Write short notes on Interviews.

Answered: 1 week ago

Question

Define induction and what are its objectives ?

Answered: 1 week ago