Можно так:
$vendors = Vendor::with(['services' => function($query) {
$query->selectRaw('SUM(price) as sum, vendor_id, type')
->groupBy('vendor_id')
->groupBy('type')
->orderBy('sum', 'desc');
}])
->selectRaw('*, (SELECT SUM(price) FROM service WHERE service.vendor_id = vendor.id) as sum')
->orderBy('sum', 'desc')
->get();
При этом можно во вью получить такой результат:
@foreach($vendors as $vendor)
<p><strong>{{ $vendor->title }} - сумма: {{ $vendor->sum }}</strong></p>
@foreach($vendor->services as $service)
<p>--- {{$service->type}}: {{ $service->sum }}</p>
@endforeach
@endforeach
Vendor 1 - сумма: 3000
--- development: 2000
--- testing: 1000
Vendor 2 - сумма: 2600
--- development: 1800
--- testing: 800
Vendor 3 - сумма: 2200
--- development: 1600
--- testing: 600