def substitute_table(self, table_expr):
    return Aggregation(table_expr, self.metrics, by=self.by, having=self.having)
def substitute_table(self, table_expr):
    return Aggregation(table_expr, self.metrics, by=self.by, having=self.having)