text: SELECT 
  	 [at].AccountId
  	,CONCAT(a.FirstName, ' ', a.LastName) AS FullName
  	,MAX(DATEDIFF(DAY, t.ArrivalDate, t.ReturnDate)) AS LongestTrip
  	,MIN(DATEDIFF(DAY, t.ArrivalDate, t.ReturnDate)) AS ShortestTrip
  FROM Accounts AS a
  JOIN AccountsTrips AS [at] ON a.Id = [at].AccountId
  JOIN Trips AS t ON [at].TripId = t.Id
  WHERE a.MiddleName IS NULL AND t.CancelDate IS NULL
  GROUP BY [at].AccountId, a.FirstName, a.LastName
  ORDER BY LongestTrip DESC, ShortestTrip