Skip to Content
0
Former Member
Jul 30, 2014 at 06:32 PM

How many Customers in a UserGroup?

291 Views

When I search for customers in the hMc under Users, using the criteria Group contains 'mygroupname' I get 3347 as the number of results.

When I open the 'mygroupname' UserGroup and use the Find Members button, I get 3376 as the number of results. This is the same number as I get with the following Flexible Search query

    Select
     {usr:uid}
     from
     {   PrincipalGroupRelation as pgr
         JOIN User as usr
         ON {usr:pk} = {pgr:source}
         JOIN UserGroup as ug
         ON {pgr:target} = {ug:pk}
     }
     where
     {ug:uid} = 'mygroupname'


Where are the extra results coming from?

I thought some might be coming from Employees (who shouldn't be in this group) but I only found two, which doesn't account for the other 37 difference.

Adding a Select distinct makes no difference. Exporting both lists using the Select All from the results pane and exporting as CSV results in a significant proportion of duplicates in both sets of results. Can anyone shed light on why the discrepancy? Is there any way to see what query the hMc is using to find the Users where the criteria for Group contains 'mygroupname'?