take max timestamp when generate daily table