It is necessary to get rows that do not have duplicates in a table, I did searches and found the DISTINCT
function, but this does not solve the problem, because it somehow groups the data.
One way to solve this would be to use PHP and check one by one, but before returning to this option, I want to make sure I do not have any other ones that are more efficient.
An example:
+----------+------+
| Customer | Pets |
+----------+------+
| 20 | 2 |
| 21 | 3 |
| 22 | 3 |
| 23 | 2 |
| 24 | 4 |
| 25 | 8 |
+----------+------+
The return would have to be 4, 8 because they are unique