laravel聚合函数使用查询构建器 $data = DB::connection('mysql_1')->table('promoter_info') ->select(DB::raw("max(agent_count) as agent_count")) ->where([['date','>=',$start_time],['date','<=',$end_time]]) ->groupBy('gameid','ptel') ->paginate(5);