Write a query to display the lowest average cost of books within a subject and the highest
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a query to display the lowest average cost of books within a subject and the highest average cost of books within a subject (Figure P7.109). FOR THIS PROBLEM
MY QUERY IS: SELECT ROUND(Max(Avg_Cost),2) AS "Highest Avg Cost", ROUND(Min(Avg_Cost),2) AS "Lowest Avg Cost" FROM
( SELECT AVG(BOOK.BOOK_COST) AS Avg_Cost
FROM BOOK
GROUP BY BOOK.BOOK_SUBJECT);
Related Book For
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris
Posted Date: