SQL query - average time of a issues in statuses

Added by der brr 4 months ago

Please tell me how I can generate a sql query to calculate the average time of a issues in statuses for a project and subprojects and find issuess with a large percentage of deviation from the average (for example, more than 50%)