laravel 按日期分组查询
//按日分组查询
$time_list = Order::query()->from('order as ao')
->where($where)
->select(['ao.orderid', 'ao.create_time', \DB::raw('FROM_UNIXTIME(te_ao.create_time,"%Y-%m-%d") as date_day'), \DB::raw('sum(te_ao.com_amount) as total_amount'), \DB::raw('count(te_ao.orderid) as count')])
->groupBy('date_day')
->orderBy('date_day', 'desc')
->limit($limit)
->get();