Question: Write a query to display the book number, title, subject, average cost of books within that subject, and the difference between each books cost and

Write a query to display the book number, title, subject, average cost of books within that subject, and the difference between each book’s cost and the average cost of books in that subject. Sort the results by book title (Figure P7.107). 

Figure P7.107 Books with Average Cost by Subject BOOK NUM 5235 Beginner's Guide to JAVA 5236 Database in the

Figure P7.107 Books with Average Cost by Subject BOOK NUM 5235 Beginner's Guide to JAVA 5236 Database in the Cloud BOOK_TITLE 5237 Mastering the database environment 5238 Conceptual Programming 5239 J++ in Mobile Apps 5240 iOS Programming 5241 JAVA First Steps 5242 C# in Middleware Deployment 5243 DATABASES in Theory 5244 Cloud-based Mobile Applications 5245 The Golden Road to Platform independence BOOK SUBJECT AVGCOST DIFFERENCE Programming Cloud Database Programming Programming Programming Programming Middleware Database Cloud Middleware Cloud 5246 Capture the Cloud 5247 Shining Through the Cloud: Sun Programming Programming 5248 What You Always Wanted to Know About Database, But Were Afraid to Ask Database 5249 Starlight Applications Cloud 5250 Reengineering the Middle Tier 5251 Thoughts on Revitalizing Ruby 5252 Beyond the Database Veil 5253 Virtual Programming for Virtual Environments 5254 Coding Style for Maintenance Middleware Programming Database Programming Programming 66.62 72.45 84.95 66.62 66.62 66.62 66.62 89.95 84.95 72.45 89.95 72.45 66.62 84.95 72.45 89.95 66.62 84.95 66.62 66.62 -6.67 7.5 5 -6.67 -16.67 13.33 -16.67 -30 45 -2.5 30 -2.5 43.33 -35 -2.5 0 -6.67 -15 13.33 -16.67

Step by Step Solution

3.54 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To achieve this you can use the following SQL query WITH BookCosts A... View full answer

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 Database Systems Design Implementation Questions!