How to check for duplicates

Make a note of all affiliations (collaborator, co-supervisor etc.) before you delete a duplicate; report details on the profile you keep.

SQL code to find duplicates:

SELECT p.id AS "PI_ID", p.surname AS "PI_Surname", p.forenames AS "PI_Forenames", p2.id AS "Researcher_ID", p2.surname AS "Researcher_Surname", p2.forenames AS "Researcher Forenames"
FROM person p
JOIN `pi`
ON p.id = pi.person_id
AND p.department_id=1
JOIN person p2
ON p.surname = p2.surname
AND p.forenames = p2.forenames
AND p2.department_id=1
JOIN researcher r
ON p2.id = r.person_id