SELECT
  Z.Consultant,
  Z.EmployeeCode,
  Z.Vehicle,
  Z.VehiclePurchaseDate,
  Z.VehiclePurchasePrice,
  SUM(Z.Trip) AS TripCount,
  SUM(Z.DistanceTravelled)   AS DistanceTravelled,
  SUM(Z.TravelParkingCost)   AS TravelParkingCost,
  SUM(Z.TravelTollgatesCost) AS TravelTollgatesCost,
  SUM(Z.DistanceAmount)      AS DistanceAmount,
  SUM(Z.ClaimAmount)         AS ClaimAmount
FROM
  (@pInnerSQL) AS Z
GROUP BY
  1,2,3,4,5
ORDER BY
  1