LOAD Customer,min(Date,2)-min(Date) as "days between the first two dates",max(Date) -min(Date) as "days between the first date and last date",max(Date) -max(Date,2) as "days between the last two dates",some other expression for whatever two dates you wanted as "days between some other two dates"RESIDENT [Customer and Date Table]GROUP BY Customer;