Getting a list of users in a particular user group
The below example shows a SQL query that may be used to retrieve a list of users for a particular user group. In this example, the result of the SQL query would show a list of users for a user group named "Administrator".
U.NAME, U.USERGROUPIDS, G.NAME, G.ID
CDBUSER AS U CROSS JOIN CDBUSERGROUP AS G
G.ID IN ( U.USERGROUPIDS ) AND G.NAME = 'Administrator'