Query to display the lowest average cost of books within a subject and the highest average cost of books within a subject. SELECT Min (AVERAGE_COST) AS "Lowest Avg Cost", Max (AVERAGE_COST) AS "Highest Avg Cost" FROM (SELECT BOOK_SUBJECT,Round(Avg (BOOK_COST),2) AS AVERAGE_COST FROM BOOK GROUP BY BOOK_SUBJECT); I got an error ERROR 1248 (42000) at line 1: Every derived table must have its own alias How can I edit this query to make work? thanks
Query to display the lowest average cost of books within a subject and the highest average cost of books within a subject. SELECT Min (AVERAGE_COST) AS "Lowest Avg Cost", Max (AVERAGE_COST) AS "Highest Avg Cost" FROM (SELECT BOOK_SUBJECT,Round(Avg (BOOK_COST),2) AS AVERAGE_COST FROM BOOK GROUP BY BOOK_SUBJECT); I got an error ERROR 1248 (42000) at line 1: Every derived table must have its own alias How can I edit this query to make work? thanks
Chapter8: Data And Network Communication Technology
Section: Chapter Questions
Problem 17VE
Related questions
Question
Problem 109
Query to display the lowest average cost of books within a subject and the highest average cost of books within a subject.
SELECT Min (AVERAGE_COST) AS "Lowest Avg Cost", Max (AVERAGE_COST) AS "Highest Avg Cost"
FROM (SELECT BOOK_SUBJECT,Round(Avg (BOOK_COST),2) AS AVERAGE_COST FROM BOOK
GROUP BY BOOK_SUBJECT);
I got an error ERROR 1248 (42000) at line 1: Every derived table must have its own alias
How can I edit this query to make work? thanks
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning