laravel 按日期分组查询
$shop_trend = ShopTrend::where($where)
->select([DB::raw('FROM_UNIXTIME(created_at,"%Y-%m-%d") as date_day'), DB::raw('SUM(month_rent) as total_rent'), DB::raw('COUNT(trend_id) as count'), DB::raw('GROUP_CONCAT(shop_id) as shop_ids')])
->groupBy('date_day')
->orderBy('date_day', 'asc')
->get();