Yurttas/PL/DBL/oracle/F/01/PC/q06.sql
Jump to navigation
Jump to search
1REM
2REM q06.sql
3REM
4REM Find those manufacturers of at least two different
5REM computers (PC's or laptops) with speeds of at least 133.
6REM
7
8SELECT maker
9FROM Product
10WHERE model IN ( (SELECT P.model
11 FROM Product P, PC
12 WHERE P.model=PC.model
13 AND PC.speed>=133)
14 UNION
15 (SELECT P.model
16 FROM Product P, Laptop L
17 WHERE P.model=L.model
18 AND L.speed>=133) )
19GROUP BY maker
20HAVING COUNT(model)>=2;