Based on the following I thought it would be worth posting the query required to create a collection based on users that are not a member of a particular AD user group. This may come in handy when unpublishing App-V packages for certain users.

from SMS_R_User
where SMS_R_User.ResourceID not in (select SMS_R_USER.ResourceID
from SMS_R_User
where SMS_R_User.UserGroupName like "DOMAIN\\Group")