modificat service event query group by