I think that may be tricky
The reason I say it may be tricky is because if you looking at ticket that has had multiple staff replies then that first reply is no longer stored in the 'ticket' table. You have to go through 'ost_ticket_response' table and find the earliest response... then do a TIMEDIFF with the create date.
I wrote some reporting queries which try to determine what tickets were active during a certain week where I ran a query across that same table. I could see if any of that logic would work for you.