customizable query for friend groups