consider the following relations s s sname


Consider the following relations:

 S (S#, SNAME, STATUS, CITY)

 SP (S#, P#, QTY)

 P (P#, PNAME, COLOR, WEIGHT, CITY)

Give an expression within SQL for each of queries below:

(i) Get supplier names for supplier who supply at least one red part

(ii) Get supplier names for supplier who do not supply part P2.

(i) SELECT SNAME FROM S

WHERE S# IN (SELECT S# FROM SP

WHERE P# IN (SELECT P# FROM P

WHERE COLOR = RED'))

(ii) SELECT SNAME FROM S

WHERE S# NOT IN (SELECT S# FROM SP WHERE P# = 'P2')

Request for Solution File

Ask an Expert for Answer!!
Database Management System: consider the following relations s s sname
Reference No:- TGS0277227

Expected delivery within 24 Hours