I am trying to find duplicates in my SQL table with this query
SELECT a.*
FROM transactions a
JOIN (SELECT user_id, details, COUNT(*)
FROM transactions
GROUP BY user_id, details
HAVING count(*) > 1 ) b
ON a.user_id= b.user_id
AND a.details= b.details
ORDER BY a.user_id
The problem is I am trying to narrow it down with a WHERE condition and I just could not get my way around it
@Agbaje ok let me give it a shot. What kind of data is in details? I assume just want to know the user_id + details that's is duplicated so you can find them afterwards