def aggregate(self, this, metrics, by=None, having=None):
    if (len(self.selections) > 0):
        return Aggregation(this, metrics, by=by, having=having)
    else:
        helper = AggregateSelection(this, metrics, by, having)
        return helper.get_result()
def aggregate(self, this, metrics, by=None, having=None):
    if (len(self.selections) > 0):
        return Aggregation(this, metrics, by=by, having=having)
    else:
        helper = AggregateSelection(this, metrics, by, having)
        return helper.get_result()