I am suffering with duplicate data in the database and need to list them to check them and delete them. Consider as duplicate data when the value and the date coincide, as in the example below, the values A and C are duplicated.
A: 2017-08-10 - 10.00
B: 2017-08-10 - 10.01
C: 2017-08-10 - 10.00
D: 2017-08-11 - 10.00
Through a precise query, only A and C appear.
A: 2017-08-10 - 10.00
C: 2017-08-10 - 10.00
I tried this way, but to no avail:
SELECT data, valor FROM tabela
WHERE data > '2017-04-17'
HAVING COUNT(valor) > 1
Unfortunately this way the data is grouped. I tried to GROUP BY primary_key
unsuccessfully.
Note: MySQL 5.7