Query time in queue after queue change

Hello all,

Thanks for reading this.

I am attempting to figure out a way to query whether mysql query or through the web gui how long a ticket spent in a queue.

For example - I have a workflow which takes tickets between multiple queues. For reporting on the workflow effectiveness I want to see how long a ticket spent in each queue.

Does anyone have any ideas regarding?

Thank you!
Nick Adams