Average time to solve a ticket - JIRA datasource

HI, im using grafana cloud on windows 10.

I’m trying to calculate the average time to solve a ticket. I have two labels, so two things i want the query to return: Created and Resolved.
I want the final result to be a stat panel which display something like “1.2 days” or “5.5 hours”.
What should I do to achieve this?