added the data aggregater code for trend analytics for summary and device