Yurttas/PL/DBL/oracle/F/01/PC/q03.sql

From ZCubes Wiki
Jump to navigation Jump to search
 1REM
 2REM q03.sql
 3REM
 4REM Find the model number and price of all products
 5REM (of any type) made by manufacturer 'B'.
 6REM
 7
 8(SELECT PC.model, price
 9 FROM Product P, PC
10 WHERE maker='B'
11   AND P.model=PC.model )
12UNION
13(SELECT L.model, L.price
14 FROM Product P, Laptop L
15 WHERE maker='B'
16   AND P.model=L.model)
17UNION
18(SELECT R.model, R.price
19 FROM Product P, Printer R
20 WHERE P.maker='B'
21   AND P.model=R.model);