I have previously made a question here select only when different value and it has been answered. Now my question is how to remove double data so that the usual select query can produce the desired data
For example I have this records:
id | name | price |
---|---|---|
1 | book | 5 |
2 | lamp | 7 |
3 | lamp | 7 |
4 | book | 5 |
5 | book | 5 |
the result I want is:
id | name | price |
---|---|---|
1 | book | 5 |
2 | lamp | 7 |
4 | book | 5 |