Question: BASIC SQL. Consider the following schema: Suppliers ( sid: integer, sname: string, address: string ) Parts ( pid: integer, pname: string, color: string ) Catalog
BASIC SQL.
Consider the following schema:
Suppliers ( sid: integer, sname: string, address: string )
Parts ( pid: integer, 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:
1) Find the pnames of parts for which there is some supplier.
2) Find the snames of suppliers who supply every part.
3) Find the snames of suppliers who supply every red part.
4) Find the sids of suppliers who supply only red parts.
5) Find the sids of suppliers who supply a red part and a green part.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
