Hello,
I don't use boxi or object queries in reports... I prefer to use SQL queries.
I've a similar report of what you're looking for. The info you want is in the usp_kpi_ticket_data table, it gets populated when you install the kpi_ticket_data_table option.
According to docops: "This table contains data retrieved from CA SDM tickets. The data can be used for reporting on ticket performance, such as how long a ticket was in each state." USP Tables - KPI - CA Service Management - 17.1 - CA Technologies Documentation
So you have the prev and end time of each change of group/status/any other field.
I prefer to use SQL because I have function to get the total business hours (Mon-Fri 8:30-7:30 and not consider holidays) that the ticket was in each group.
Regards!