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

analytics report to show data with user and there manager details

Growit
New Contributor
New Contributor

analytics report query to show data with user and there manager details

pls help

3 REPLIES 3

rushikeshvartak
All-Star
All-Star

SELECT u1.username  AS "User Name",
       u1.firstname AS "User First Name",
       u1.lastname  AS "User Last Name",
       u1.email     AS "User Email",
       u2.username  AS "Manager User Name",
       u2.firstname AS "Manager First Name",
       u2.lastname  AS "Manager Last Name",
       u2.email     AS "Manager Email"
FROM   users u1
       LEFT JOIN users u2
              ON u1.manager = u2.userkey
WHERE  u1.statuskey = 1 


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

Growit
New Contributor
New Contributor

I have a list of users , i need the data of the managers of that particular users .pls share that query

Hey @Growit  You can learn basic of SQL from below website https://www.w3schools.com/sql/ 

SELECT u1.username  AS "User Name",
       u1.firstname AS "User First Name",
       u1.lastname  AS "User Last Name",
       u1.email     AS "User Email",
       u2.username  AS "Manager User Name",
       u2.firstname AS "Manager First Name",
       u2.lastname  AS "Manager Last Name",
       u2.email     AS "Manager Email"
FROM   users u1
       LEFT JOIN users u2
              ON u1.manager = u2.userkey
WHERE  u1.statuskey = 1 

AND u1.username in ('ABCD','Rushi')

ABCD & Rushi is username of users


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