Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have a table called ORDERITEMS, which contains an ISBN ( book code ) , QUANTITY and PAIDEACH ( the amount paid for each book

You have a table called ORDERITEMS, which contains an ISBN (book code), QUANTITY and PAIDEACH (the amount paid for each book). You want to know which books generated the most revenue going from highest to lowest, only including books whose total revenue exceeds $100. Which of the following is INCORRECT?
SELECT isbn, sum(quantity * paideach) as "Total"
FROM orderitems
GROUP BY isbn
HAVING sum(quantity * paideach)>100
ORDER BY 2 DESC;
12
SELECT isbn, sum(quantity * paideach) as "Total"
FROM orderitems
GROUP BY isbn
HAVING sum(quantity * paideach)>100
ORDER BY sum(quantity * paideach) DESC;
SELECT isbn, sum(quantity * paideach) as "Total"
FROM orderitems
GROUP BY isbn
HAVING sum(quantity * paideach)>100
ORDER BY "Total" DESC;
image text in transcribed

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_2

Step: 3

blur-text-image_3

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

Data Science Project Ideas In Health Care Volume 1

Authors: Zemelak Goraga

1st Edition

B0CPX2RWPF, 979-8223791072

More Books

Students also viewed these Databases questions

Question

If ( A^2 - A + I = 0 ), then inverse of matrix ( A ) is?

Answered: 1 week ago

Question

What is computer neworking ?

Answered: 1 week ago