framework/db/Query.php
public function having($condition, $params = [])
    {
        $this->having = $condition;
        $this->addParams($params);
        return $this;
    }
public function having($condition, $params = [])
    {
        $this->having = $condition;
        $this->addParams($params);
        return $this;
    }
public function having ( $ condition , $ params = [ ] ) { $ this -> having = $ condition ; $ this -> addParams ( $ params ) ; return $ this ; }
Sets the HAVING part of the query.
@param string|array|ExpressionInterface $condition the conditions to be put after HAVING.
Please refer to [[where()]] on how to specify this parameter.
@param array $params the parameters (name => value) to be bound to the query.
@return $this the query object itself
@see andHaving()
@see orHaving()
Sets the HAVING part of the query .