postgresql7.1 select trunc(current_timestamp - max(coalesce(modified_date, insertion_date))) from robots