/build/static/layout/Breadcrumb_cap_w.png

KACE Product Support Question


Only Select Specific Technicians on a Report

11/14/2017 579 views
I have this as my SQL statement and it works great but can't seem to get it to work for just specific technicians

SELECT USER.USER_NAME as OWNER, count(HD_TICKET.ID) as NUMBER_OF_TICKETS,
ROUND((AVG(TIMESTAMPDIFF(DAY, 
                          HD_TICKET.CREATED, 
                          TIME_CLOSED)
           )), 1) AS "Avg Days Open"
from HD_TICKET
JOIN HD_STATUS on (HD_STATUS.ID = HD_TICKET.HD_STATUS_ID)
LEFT JOIN USER on (USER.ID = HD_TICKET.OWNER_ID)
where HD_STATUS.STATE ='closed'
and HD_TICKET.TIME_CLOSED > DATE_SUB(NOW(), INTERVAL 30 DAY)
and HD_TICKET.HD_QUEUE_ID in (1) /*add queue numbers here*/
GROUP BY OWNER
2 Comments   [ + ] Show comments

Comments

  • Hard code the names
  • I have done this in the past for other reports but for some reason on this one I keep getting SQL error message with multiple names and if I use 1 name I get zero data
    • Post your query that fails, please.

All Answers

0
How do you want to select the technicians? It can be static and you can hard code the names, or you can use a label to make it dynamic.

Answered 11/14/2017 by: chucksteel
Red Belt

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ