code: def aggr(self, group, **named_attributes):
          
          return (
              GroupBy.create(self, group=group, keep_all_rows=False, attributes=(), named_attributes=named_attributes)
              if self.primary_key else
              Projection.create(group, attributes=(), named_attributes=named_attributes, include_primary_key=False))
docs: Aggregation of the type U('attr1','attr2').aggr(group, computation="QueryExpression")
          has the primary key ('attr1','attr2') and performs aggregation computations for all matching elements of `group`.
          :param group:  The query expression to be aggregated.
          :param named_attributes: computations of the form new_attribute="sql expression on attributes of group"
          :return: The derived query expression