private function applySelect() : void
    {
        $group = $this->query->clause('group');
        $group = array_filter($group);
        if (empty($group)) {
            return;
        }

        $this->query->select($group, true);
        $this->query->select([self::GROUP_BY_FIELD => $this->query->func()->count($group[0])]);
    }