Question: 1. Consider the following schema: Suppliers(sid: integer, sname: string, address: string) Parts(pid: interger, pname: string, color: string) Catalog(sid: integer, pid: integer, cost: real) The Catalog

1. Consider the following schema:

Suppliers(sid: integer, sname: string, address: string)

Parts(pid: interger, pname: string, color: string)

Catalog(sid: integer, pid: integer, cost: real)

The Catalog relation lists the prices charged for parts by Suppliers. Write the following queries in SQL:

ANSWER ALL PLEASE

(a) Increase price of all green parts by 5% sold by supplier named Gordon. [Hint: update]

(b) Find pnames of parts for which there is some suppliers.

(c) Find the names of the suppliers who supply a red part that costs less than 100 dollars. (Hint: nested subquery)

(d) For every suppliers, print sid, name and price of the most expensive part that she supplies. [HItns: Group by]

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!