Yurttas/PL/DBL/postgres/F/01/PC/q09.sql

From ZCubes Wiki
Revision as of 23:48, 4 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">→‎REM REM q09.sql REM REM Find the maker of the color printer with the lowest price. REM: SELECT current_schema();...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1/*
 2REM
 3REM q09.sql
 4REM
 5REM Find the maker of the color printer with the lowest price.
 6REM
 7*/
 8
 9SELECT current_schema();
10SET search_path to "pc";
11
12SELECT P.maker, R.price
13FROM Product P, Printer R
14WHERE P.model=R.model
15  AND R.price IN (SELECT MIN(price)
16                  FROM Printer
17                  WHERE color='true');