聚合操作
count
$this->db()->table('user')->count('id');
max
$this->db()->table('user')->max('id');
min
$this->db()->table('user')->min('id');
sum
$this->db()->table('user')->sum('id');
avg
$this->db()->table('user')->avg('id');
原文: http://doc.cmlphp.com/devintro/model/mysql/aggregation.html