Question: 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;
 You have a table called ORDERITEMS, which contains an ISBN (book

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!