}
$attrs->{select} = $group_by;
- $attrs->{from} = (ref $self)->new($self->result_source, $attrs)->cursor->as_query;
+ $attrs->{from} = [ { 'mesub' => (ref $self)->new($self->result_source, $attrs)->cursor->as_query } ];
}
$attrs->{select} = { count => '*' };