Analyze groups to users association

The following SQL query lists all the security groups and the associated users.

SELECT maxgroup.groupname, maxgroup.description, maxuser.userid, maxuser.loginid, maxuser.defsite
FROM maxgroup
JOIN groupuser ON groupuser.groupname=maxgroup.groupname
JOIN maxuser ON maxuser.userid=groupuser.userid
ORDER BY maxgroup.groupname, maxuser.userid;

The best approach to analyze the results is to load them into Excel and create a pivot table.

Labels: ,