Question: DATABASE SYSTEMS Transform the following nested query into an unnested query: SELECT DISTINCT Essn FROM WORKS_ON WHERE (Pno, Hours) IN ( SELECT Pno, Hours FROM
DATABASE SYSTEMS


Transform the following nested query into an unnested query: SELECT DISTINCT Essn FROM WORKS_ON WHERE (Pno, Hours) IN ( SELECT Pno, Hours FROM WORKS_ON WHERE Essn = '123456789' ); Transform the following unnested query into a nested query (to understand what this query does take a look at Q2 at page 189 in the book): SELECT P.Pnumber, P.Dnum, E.Lname FROM PROJECT AS P, EMPLOYEE AS E, DEPARTMENT AS D WHERE P.Dnum = D.Dnumber AND D.Mgr_ssn = E.Ssn AND P.Plocation = 'Stafford'A Transform Q7 (page 213) SELECT Fname, Lname FROM EMPLOYEE WHERE EXISTS (SELECT * FROM DEPENDENT WHERE Ssn = Essn) EXISTS (SELECT * FROM DEPARTMENT WHERE Ssn = Mgr_ssn); first into a query that uses only one nested query and then into a query that uses no nested queries
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
