2
It is necessary to obtain lines that are not have duplicates in a table, I did some research and found the function DISTINCT
but this does not solve the problem, because it somehow groups the data.
One way to solve it would be by using PHP and checking one by one, but before falling back to this option I want to make sure I don’t have more efficient ones.
An example:
+----------+------+
| Customer | Pets |
+----------+------+
| 20 | 2 |
| 21 | 3 |
| 22 | 3 |
| 23 | 2 |
| 24 | 4 |
| 25 | 8 |
+----------+------+
the return would have to be 4, 8 for they are unique