Here, my currently working query is

```
$results = DB::table('amenities as a')
->leftJoin('amenity_values as av','av.amenity_id','=','a.id')
->leftJoin('units_amenities_values as uav','uav.amenity_value_id','=','av.id')
->leftJoin('units as u','uav.unit_id','=','u.id')
->leftJoin('amenity_pricing_reviews as apr','apr.unit_id','=','u.id')
->select('a.id as amenity_id','a.amenity_name','a.category_id', 'av.amenity_value','u.id as unit_id','u.unit_number','apr.dom','apr.building_id')
->where('a.property_id', $data['property_id'])
->whereIn('apr.building_id', $data['building_ids'])
->whereNull('apr.deleted_at')
->whereNull('u.deleted_at')
->whereNull('av.deleted_at')
->whereNull('a.deleted_at')
->orderBy('a.amenity_name','asc')
->get()
->groupBy(['category_id','unit_id']);

```

Here, I have joined to a table `amenity_pricing_reviews`. In this relationship whenever it could not find the related rows in the `amenity_pricing_reviews` table it is discarding the full rows:

However, I want to get these rows with an empty value for those columns from that table. Something like:

```
amenity_id  => value
amenity_name => value
category_id => value
amenity_value => value
unit_id => value
unit_number => value
dom => 
building_id => 

```

Also, I have done a lot of other things based on the result of this query so I want to make minimal changes to the structure of the end result.