一、聚合查询 1、使用count()方法,可以求出所查询数据的数量 return Db::table('students')->count() 2、count()可设置指定id,比如有空值(null)的create_time,不会计算数量 Db::table('students')->count('create_time'); 3、使用max()方法,求出所查询数据字段的最大值 Db::table('students')->max('price'