After searching through answers and trying multiple approaches I still cannot figure this out.
I am trying to search my database for rows that have duplicate listings in 3 fields. (not the whole row). I can get the duplicates to list just fine, problem is it is only listing the first occurrence and not the entire list. I need to see all the duplicates listed!!!
This is what I am currently using
SELECT * FROM resumes group by LAST_NAME, FIRST_NAME, JOB_TITLE having count(*) > 1
I have tried things like
SELECT *, COUNT(LAST_NAME&&FIRST_NAME&&JOB_TITLE) occurrences FROM resumes GROUP BY LAST_NAME,FIRST_NAME,JOB_TITLE HAVING occurrences > 1
but of course that does the same thing...I've also tried to do a simpler single field search using distinct
SELECT distinct (a.LAST_NAME, a.RESUME_ID from resumes a join resumes b on (a.LAST_NAME=b.LAST_NAME and a.RESUME_ID <> b.RESUME_ID) GROUP BY LAST_NAME
but running the last causes the server to hang and obviously is only using the LAST_NAME field.
please help 😕