finally implemented real-time analytics with hour, minute, and second granularity