Ok, I will remove time_id from group by.

What do you mean saying "not large number of users" ? I think, sometimes it can be around 200 user ids.