Query to List down Account and corresponding sites and its requesters (MSSQL & PGSQL)

Query to List down Account and corresponding sites and its requesters (MSSQL & PGSQL)


*Tested in builds from PGSQL (14300) or MSSQL (14306)
*Applicable for 14500 builds


For Accounts and Site:
select adef.org_name "Account",sdo.name "Site Name" from accountdefinition adef
left join accountsitemapping asm on adef.org_id=asm.accountid
Left Join Sitedefinition sdef on asm.siteid=sdef.siteid
LEFT JOIN sdorganization sdo on sdef.siteid=sdo.org_id  order by adef.org_id

To get the requester details of the corresponding Account / Sites.

For Requesters:
Goto Reports -> New custom report -> Select a module -> CMDB -> select User (filterby) -> Proceed.

Now choose Account / Site / CI name in the columns and run the report



                  New to ADSelfService Plus?