expanding table and calculating tdiff on insert