How do I determine the avg response time before a ticket it picked up

How do I determine the avg response time before a ticket it picked up

I am needing to run a script on the MSSQL to determine how long it takes before a ticket is picked up from a customer.
 
I am running Version 6.0.0.
Build 6014
 
 

                  New to ADSelfService Plus?