Question: Here are two relations, ( primary keys are in bold ) : Goods ( gid , g _ name, price ) Supply ( supplyid ,

Here are two relations, (primary keys are in bold):
Goods(gid, g_name, price)
Supply(supplyid, gid, cost)
Clarification: Each price in Goods measures the unit price of a gid, we assume each (supplyid, gid) pair is one unit of
gid.
Write SQL queries for the following English descriptions using the same relationships.
Find the total price of goods if all supplies are sold.
Create a table Supcount by finding the total number of suppliers providing each good. The Supcount table shall
contain two columns (gid, c)
Use only the Supcount table you created and the Goods table to compute the total price of goods if all supplies
are sold.
Here are two relations, ( primary keys are in

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 Programming Questions!