Yurttas/PL/DBL/mssql/F/01/PC/q18.sql
Revision as of 04:36, 3 November 2013 by MassBot1 (talk | contribs) (Created page with "<syntaxhighlight lang="sql" line start="1" enclose="div">→REM REM q18.sql REM REM Find the manufacturers who sell exactly three different REM models of PC. REM: SELECT P....")
1/*
2REM
3REM q18.sql
4REM
5REM Find the manufacturers who sell exactly three different
6REM models of PC.
7REM
8*/
9
10SELECT P.maker
11FROM Product P, PC
12WHERE P.model=PC.model
13GROUP BY P.maker
14HAVING COUNT(DISTINCT PC.model)=3;