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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started