Search the Community
Showing results for tags 'average'.
Found 2 results
I am trying to create a widget that updates the average SLA times per team each month, I am aware I can do it as a measure and then put it into a widget however this will take me twice as long. Is there a way to create a widget so I can see the average SLA times for our p1, p2, p3 and p4 SLAS This is the SQL I have written so far: SELECT h_requesttype, h_dateresolved, h_resolvedby_team_id, h_status, h_fk_priorityname, h_withinfix, AVG(h_fixtime) as AverageResolveTime FROM h_itsm_requests WHERE h_fk_priorityname= 'p4' AND (h_status= 'status.closed' OR h_status= 'status.resolved') AND h_withinfix= '1' AND (h_dateresolved >= (CURDATE() - INTERVAL (Month(CURDATE())) DAY)) AND h_requesttype ='incident' GROUP BY h_fk_priorityname However I cannot get the Convert or Declare functions to work, I need to get a average resolve time (h_fixtime) result for all P4's in the month of December so far. However it is only giving me the average for the 06/12/2017 does anyone know what I can do so that it gives me a average resolve time for all p4's in December and for it to convert to HH:MM:SS instead of just seconds? Hayley.