Yurttas/PL/DBL/postgres/F/01/PC/q18.sql
Jump to navigation
Jump to search
1/*
2REM
3REM q18.sql
4REM
5REM Find the manufacturers who sell exactly three different
6REM models of PC.
7REM
8*/
9
10SELECT current_schema();
11SET search_path to "pc";
12
13SELECT P.maker
14FROM Product P, PC
15WHERE P.model=PC.model
16GROUP BY P.maker
17HAVING COUNT(DISTINCT PC.model)=3;