I have a MySQL table like this:
id | user_id | title | slug ------------------------------ 1 | 1 | hello | hello 2 | 1 | hello | hello-1 3 | 2 | bye | bye 5 | 3 | bye | bye-1 I want to find duplicated entries. Entries with the same user_id, title and the slug which is ends with "-1".
These are duplicates:
1 | 1 | hello | hello 2 | 1 | hello | hello-1 And these are not, because the user_id's are different:
3 | 2 | bye | bye 5 | 3 | bye | bye-1 How can I find these duplicates?