Question: Draw the initial query tree for this query show how the query tree is optimized (one rule at a time) and write the SQL query

Draw the initial query tree for this query show how the query tree is optimized (one rule at a time) and write the SQL query for the final optimized query tree.

Q2: List the name of publisher and the total number of books from that publisher in inventory from branches that are located in Eastshore Mall.

SELECT p.PublisherName as Publisher, Sum(i.OnHand) as TotalBooks FROM Publisher p, Book b, Inventory i, Branch r WHERE p.PublisherCode = b.PublisherCode and b.BookCode = i.BookCode and i.BranchNum = r.BranchNum and r.BranchLocation = 'Eastshore Mall' GROUP BY p.PublisherName;

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!