Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Report of Rehired employees with multiple Saviynt users and improper AD linkage

MA
New Contributor
New Contributor

Hi all,

I need help to build SQL query which will fetch the report of rehired employees with multiple Saviynt users. Suppose we have one user, but he has two different usernames and has 2 separate entries in Saviynt.

Appreciating your help.

3 REPLIES 3

rushikeshvartak
All-Star
All-Star
  • How to know user is rehire ?
  • What will be common attribute between 2 users ?

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

MA
New Contributor
New Contributor

firstname, lastname will be same for both the users and customproperty44 should not be null

SELECT e1.firstname, e1.lastname, e1.username AS username1, e2.username AS username2, e1.customproperty44
FROM users e1
JOIN users e2
ON e1.firstname = e2.firstname
AND e1.lastname = e2.lastname
AND e1.username <> e2.username
WHERE e1.customproperty44 IS NOT NULL
AND e2.customproperty44 IS NOT NULL


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.