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')