Updating SQL to use UserGroup instead of Group