Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can anyone solve question 1 until 5 ? constraint in the ER diagram n Question: 3(20 Marks) Consider the following schema: Suppliers (sid: integer, sname:
Can anyone solve question 1 until 5 ?
constraint in the ER diagram n Question: 3(20 Marks) 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(just write the sql select statements ): 1. Find the snames of suppliers who supply every red part. 2. Find the sids of suppliers who charge more for some part than the average cost of that part (averaged over all the suppliers who supply that part). 3. for each part, find the sname of the supplier who charges the most for that part. 4. Find the sids of suppliers who supply a red part and a green part. 5. for every supplier that supplies a green part and a red part, print the name and price of the most expensive part that she supplies. (5*4-20 Marks) ****All the best**** 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