having (chain operation 10)


having method has only one parameter and can only use strings, for example:

Db::table('score')
    ->field('username,max(score)')
    ->group('user_id')
    ->having('count(test_time)>3')
    ->select();

The generated SQL statement is:

SELECT username,max(score) FROM score GROUP BY user_id HAVING count(test_time)>3