Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following schema: Supplier(sid, sname, address) Part (pid, pname, color) Catalog (sid, pid, cost) The kev fields are underlined. The Catalog relation list the

image text in transcribed

Consider the following schema: Supplier(sid, sname, address) Part (pid, pname, color) Catalog (sid, pid, cost) The kev fields are underlined. The Catalog relation list the process charged for parts by supplies. Write each of the following queries in SQL 1. Find the sids of suppliers who supply every red or supply every green part 2. Find pairs of sids such that the supplier with the first sid charges more for some part than the supplier with the second sid. 3. Find the pids of parts supplied by at least two different suppliers. 4. Find the pids of the most expensive parts supplied by suppliers named Ahmed 5. Find the pids of parts supplied by every supplier at less than 200 Dollars. (If any supplier does not supply the part or charges more than 200 Dollars for it, the part is not selected.)

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_2

Step: 3

blur-text-image_3

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

Students also viewed these Databases questions

Question

2. What is the business value of security and control?

Answered: 1 week ago