$collection = OrderEntity::with(['purchaser' => function ($query) {
$query
->withCount('orders')
->withSum('orders as order_sum', 'total')
->withAvg('orders as order_average', 'total');
}])->get();
The column has to be as a second parameter.