HAVING approach is also consistent operating one

One method is a coherent HAVING operation, a method for fitting group results from the completion of the screening packet (polymerization conditions typically) data.

having a single parameter, and only in the string, for example:

  1. $this->field('username,max(score)')->group('user_id')->having('count(test_time)>3')->select();

Generated SQL statement is:

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

Marble members

 

Guess you like

Origin www.cnblogs.com/furuihua/p/11804329.html