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

From ZCubes Wiki
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');