Enhanced query to return Set of attribute values. Updated examples to use it.