src/Service/DB/Select.php
public function groupBy($columns, $having = null, $having_params = null)
    {
        $having_params = ($having === null || $having_params === null)
                       ? []
                       : is_array($having_params) ? $having_params : array_slice(func_get_args(), 2);

        $this->group_by = [$columns, $having, $having_params];

        return $this;
    }
public function groupBy($columns, $having = null, $having_params = null)
    {
        $having_params = ($having === null || $having_params === null)
                       ? []
                       : is_array($having_params) ? $having_params : array_slice(func_get_args(), 2);

        $this->group_by = [$columns, $having, $having_params];

        return $this;
    }
group by 条件.

@param array $columns
@param string [$having]
@param mixed... [$having_params]

@return $this

@example
// select foo, count(1) from foobar group by foo having count(1) > 2
$select->setcolumns('foo', new Expr('count(1) as count'))->groupBy('foo', 'count(1) > ?', 2);