Yurttas/PL/DBL/mysql/F/01/00/PC/q16.sql
1/*
2REM
3REM q16.sql
4REM
5REM Find those pairs of PC models that have both
6REM the same speed and RAM. A pair should be listed only once;
7REM e.g., list(i,j) but not (j,i).
8REM
9*/
10
11\. set-db.sql
12
13SELECT DISTINCT P1.model, P2.model
14FROM PC P1, PC P2
15WHERE P1.ram=P2.ram
16 AND P1.speed=P2.speed
17 AND P1.model>P2.model;