SQL code to get Freepbx queue hold time

Cancelled

Job Description

Need SQL code for Freepbx to calculate average hold time of queue X in last Y days. X and Y will be parameters can be changed in SQL code.

Freepbx 2.9.0.7