Answered step by step
Verified Expert Solution
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
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
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