binita2908
Programmer
Hi ,
I am quite a baby in sql programming , please help me.
I have a table as follows :
mysql> select * from PC;
+------+-------+-------+------+------+------+-------+
| code | model | speed | ram | hd | cd | price |
+------+-------+-------+------+------+------+-------+
| 1 | 1232 | 500 | 64 | 5 | 12x | 600 |
| 2 | 1121 | 750 | 128 | 14 | 40x | 850 |
| 3 | 1233 | 500 | 64 | 5 | 12x | 600 |
| 4 | 1121 | 600 | 128 | 14 | 40x | 850 |
| 5 | 1121 | 600 | 128 | 8 | 40x | 850 |
| 6 | 1233 | 750 | 128 | 20 | 50x | 950 |
| 8 | 1232 | 450 | 64 | 8 | 24x | 350 |
| 9 | 1232 | 450 | 32 | 10 | 24x | 350 |
| 10 | 1260 | 500 | 32 | 10 | 12x | 350 |
| 11 | 1233 | 900 | 128 | 40 | 40x | 980 |
| 7 | 1232 | 500 | 32 | 10 | 12x | 400 |
+------+-------+-------+------+------+------+-------+
11 rows in set (0.14 sec)
Find the hard drive (hd) sizes that are equal among two or more PCs.
Result set: hd
The result set shuould be as follows :
hd
5
8
10
14
I am quite a baby in sql programming , please help me.
I have a table as follows :
mysql> select * from PC;
+------+-------+-------+------+------+------+-------+
| code | model | speed | ram | hd | cd | price |
+------+-------+-------+------+------+------+-------+
| 1 | 1232 | 500 | 64 | 5 | 12x | 600 |
| 2 | 1121 | 750 | 128 | 14 | 40x | 850 |
| 3 | 1233 | 500 | 64 | 5 | 12x | 600 |
| 4 | 1121 | 600 | 128 | 14 | 40x | 850 |
| 5 | 1121 | 600 | 128 | 8 | 40x | 850 |
| 6 | 1233 | 750 | 128 | 20 | 50x | 950 |
| 8 | 1232 | 450 | 64 | 8 | 24x | 350 |
| 9 | 1232 | 450 | 32 | 10 | 24x | 350 |
| 10 | 1260 | 500 | 32 | 10 | 12x | 350 |
| 11 | 1233 | 900 | 128 | 40 | 40x | 980 |
| 7 | 1232 | 500 | 32 | 10 | 12x | 400 |
+------+-------+-------+------+------+------+-------+
11 rows in set (0.14 sec)
Find the hard drive (hd) sizes that are equal among two or more PCs.
Result set: hd
The result set shuould be as follows :
hd
5
8
10
14