Yurttas/PL/DBL/mysql-f-2010/01/PC/q03.sql

From ZCubes Wiki
Revision as of 02:10, 4 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">/* REM REM q03.sql REM REM Find the model number and price of all products REM (of any type) made by manufacturer 'B'....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1/*
 2REM
 3REM q03.sql
 4REM
 5REM Find the model number and price of all products
 6REM (of any type) made by manufacturer 'B'.
 7REM
 8*/
 9
10\. set-db.sql
11
12(SELECT PC.model, price
13 FROM Product P, PC
14 WHERE maker='B'
15   AND P.model=PC.model )
16UNION
17(SELECT L.model, L.price
18 FROM Product P, Laptop L
19 WHERE maker='B'
20   AND P.model=L.model)
21UNION
22(SELECT R.model, R.price
23 FROM Product P, Printer R
24 WHERE P.maker='B'
25   AND P.model=R.model);