I want to know if my database contains duplicates. If not, I know that my code is working.
My database looks like this:
----------------------------
| id | name | price | link |
|---------------------------|
| 202| test | 34.00 | googl |
| 203| halo | 22.00 | bing |
| 204| hovo | 31.00 | link |
| 205| test | 34.00 | googl |
-----------------------------
You can see that the values of name, price and link are they same but the id is different. I thought about something like group the name, price and link and count it with having. Like this for example:
SELECT email,
COUNT(email) AS NumOccurrences
FROM users
GROUP BY email
HAVING ( COUNT(email) > 1 )
But my problem is how can I group by 3 attributes like in my table. By name, price and link?