Query to find various groupings of security roles
Hi, I need help on building a SQL query that will give me users and user counts with the same security roles in PSROLEUSER. So if user 1 has 3 roles and user 2 has the same 3 roles then my count is 2 else is 1 and 1. In other words, I am trying to figure out a query that will give me unique grouping of security roles. So various roles in psroleuser will form a group and want to find out all distinct possibilities of role groupings. Help please? I suspect use of partitioning in the query but I need help in designing the query.