Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 2 (5 points). Consider the following schema: Suppliers( sid: integer, sname: string, address: String) Parts(pid: integer, pname: string, color:string) Catalog( sid: integer, pid: integer,

image text in transcribed

Question 2 (5 points). 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 pnames of parts supplied by Acme Widget Suppliers and no one else. 5. Find the sids of suppliers who supply only red parts. 6. Find the sids of suppliers who supply a red part and a green part. 7. Find the sids of suppliers who supply a red part or a green part

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago